Bug 271881 - The jsdt extension of the navigatorContent is activated even if the project doesn't have the jsdt facet
Summary: The jsdt extension of the navigatorContent is activated even if the project d...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: contributed, performance
: 273859 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-10 06:45 EDT by Dimo Stoilov CLA
Modified: 2010-03-03 11:18 EST (History)
3 users (show)

See Also:
thatnitind: review+


Attachments
Updates plugin.xml (1.43 KB, patch)
2009-04-21 17:23 EDT, Chris Jaun CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimo Stoilov CLA 2009-04-10 06:45:58 EDT
May be the reason is that it is triggered on one of the following conditions:
<or>
  <adapt type="org.eclipse.core.resources.IProject" >
    <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.wst.jsdt.core.jsNature"/>
  </adapt>
  <instanceof value="org.eclipse.core.resources.IResource" />
  <instanceof value="org.eclipse.wst.jsdt.core.IJavaScriptElement" />
  <instanceof value="org.eclipse.wst.jsdt.core.IJarEntryResource" />
  <instanceof value="org.eclipse.wst.jsdt.internal.ui.packageview.PackageFragmentRootContainer" />
</or>

which means each time when the element is instance of IResource (and not only the jsdt case). - see the trigger points of the navigatorContent extension with id: org.eclipse.wst.jsdt.java.ui.javaContent, plugin:org.eclipse.wst.jsdt.ui
Comment 1 Chris Jaun CLA 2009-04-13 17:56:39 EDT
It may be possible to remove IResource from the trigger points, but I need to do more testing to make sure its safe to do so. A quick test showed no ill side effects.

Our trigger point does not look at the JSDT facet. It only checks for the existence of the jsNature. That nature is automatically added to all new web projects regardless of the JSDT facet.
Comment 2 Chris Jaun CLA 2009-04-21 17:23:10 EDT
Created attachment 132679 [details]
Updates plugin.xml
Comment 3 Chris Jaun CLA 2009-04-21 17:25:15 EDT
Updates the trigger points statement to:

<triggerPoints>
     <and>
	<adapt type="org.eclipse.core.resources.IProject" >
	     <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.wst.jsdt.core.jsNature"/>
	</adapt>
        <or>
	     <instanceof	value="org.eclipse.core.resources.IResource" />
	     <instanceof value="org.eclipse.wst.jsdt.core.IJavaScriptElement" />
	     <instanceof value="org.eclipse.wst.jsdt.core.IJarEntryResource" />
	     <instanceof value="org.eclipse.wst.jsdt.internal.ui.packageview.PackageFragmentRootContainer" />
	 </or>
     </and>
</triggerPoints>


This should be fixed in 3.0.5 and 3.1.
Comment 4 Nitin Dahyabhai CLA 2009-04-23 02:33:01 EDT
Applied, thanks, Chris.
Comment 5 Dimitar Giormov CLA 2009-04-30 04:06:26 EDT
*** Bug 273859 has been marked as a duplicate of this bug. ***