NEW - bug 223750: JSDT facet install listener triggers a UI plugin load
https://bugs.eclipse.org/bugs/show_bug.cgi?id=223750
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml b/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
index 623cbea..9a3a91f 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
+++ b/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
@@ -145,6 +145,12 @@
</run>
</validator>
</extension>
-
+
+ <extension point="org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer">
+ <JsGlobalScopeContainerInitializer
+ class="org.eclipse.wst.jsdt.web.core.internal.project.WebProjectJsGlobalScopeContainerInitializer"
+ id="org.eclipse.wst.jsdt.launching.WebProject">
+ </JsGlobalScopeContainerInitializer>
+ </extension>
</plugin>
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectJsGlobalScopeContainerInitializer.java
similarity index 90%
rename from bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java
rename to bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectJsGlobalScopeContainerInitializer.java
index 025a8bb..fb456f3 100644
--- a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectJsGlobalScopeContainerInitializer.java
@@ -1,21 +1,18 @@
/**
*
*/
-package org.eclipse.wst.jsdt.web.ui;
+package org.eclipse.wst.jsdt.web.core.internal.project;
import java.net.URI;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer;
-import org.eclipse.wst.jsdt.core.IJsGlobalScopeContainer;
import org.eclipse.wst.jsdt.core.IClasspathEntry;
import org.eclipse.wst.jsdt.core.IJavaProject;
+import org.eclipse.wst.jsdt.core.IJsGlobalScopeContainer;
+import org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer;
import org.eclipse.wst.jsdt.core.compiler.libraries.LibraryLocation;
-import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension;
-import org.eclipse.wst.jsdt.web.core.internal.project.JsWebNature;
import org.eclipse.wst.jsdt.web.core.javascript.JsNameManglerUtil;
import org.eclipse.wst.jsdt.web.core.javascript.WebRootFinder;
@@ -23,7 +20,7 @@
* @author childsb
*
*/
-public class WebProjectJsGlobalScopeContainerInitializer extends JsGlobalScopeContainerInitializer implements IJsGlobalScopeContainerInitializerExtension {
+public class WebProjectJsGlobalScopeContainerInitializer extends JsGlobalScopeContainerInitializer {
private static final String CONTAINER_DESCRIPTION = Messages.getString("WebProjectJsGlobalScopeContainerInitializer.0"); //$NON-NLS-1$
public static final char[] LIB_NAME = {'b','r','o','w','s','e','r','W','i','n','d','o','w','.','j','s'};
@@ -139,12 +136,7 @@
public IPath getPath() {
return new Path(JsWebNature.VIRTUAL_CONTAINER);
}
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitialzerExtension#getImage(org.eclipse.core.runtime.IPath, java.lang.String, org.eclipse.wst.jsdt.core.IJavaProject)
- */
- public ImageDescriptor getImage(IPath containerPath, String element, IJavaProject project) {
- return ImageDescriptor.createFromFile(this.getClass(),"web1.JPG"); //$NON-NLS-1$
- }
+
public IClasspathEntry[] getClasspathEntries() {
//IClasspathEntry entry=null;
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/messages.properties b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/messages.properties
index c911466..fefe5d3 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/messages.properties
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/messages.properties
@@ -6,3 +6,4 @@
JsNatureInstaller.3=Error installing runtime\! JavaScript Development Tools could not be added..
JsWebNature.5=Error checking sourcepath:
JsWebNature.6=Error checking sourcepath:
+WebProjectJsGlobalScopeContainerInitializer.0=Web Project support for JSDT
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchScope.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchScope.java
index eb33c9d..a3bfd01 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchScope.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchScope.java
@@ -127,7 +127,7 @@
*/
public boolean shouldExclude(String container, String resourceName) {
// TODO Auto-generated method stub
- System.out.println("Unimplemented method:JsSearchScope.shouldExclude"); //$NON-NLS-1$
+ //System.out.println("Unimplemented method:JsSearchScope.shouldExclude"); //$NON-NLS-1$
return false;
}
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml b/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
index e0665b5..d44e576 100644
--- a/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
@@ -688,14 +688,15 @@
</enablement>
</renameParticipant>
-
- </extension>
- <extension point="org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer">
- <JsGlobalScopeContainerInitializer
- class="org.eclipse.wst.jsdt.web.ui.WebProjectJsGlobalScopeContainerInitializer"
- id="org.eclipse.wst.jsdt.launching.WebProject">
- </JsGlobalScopeContainerInitializer>
- </extension>
+ </extension>
+ <extension point="org.eclipse.wst.jsdt.ui.JsGlobalScopeUIInitializer">
+ <JsGlobalScopeUIInitializer
+ id="org.eclipse.wst.jsdt.launching.WebProject"
+ class="org.eclipse.wst.jsdt.web.ui.WebProjectJsGlobalScopeUIInitializer">
+ </JsGlobalScopeUIInitializer>
+ </extension>
+
+
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java
new file mode 100644
index 0000000..f0eb5a5
--- /dev/null
+++ b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java
@@ -0,0 +1,22 @@
+/**
+ *
+ */
+package org.eclipse.wst.jsdt.web.ui;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.wst.jsdt.core.IJavaProject;
+import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension;
+
+/**
+ * @author childsb
+ *
+ */
+public class WebProjectJsGlobalScopeUIInitializer implements IJsGlobalScopeContainerInitializerExtension{
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitialzerExtension#getImage(org.eclipse.core.runtime.IPath, java.lang.String, org.eclipse.wst.jsdt.core.IJavaProject)
+ */
+ public ImageDescriptor getImage(IPath containerPath, String element, IJavaProject project) {
+ return ImageDescriptor.createFromFile(this.getClass(),"web1.JPG"); //$NON-NLS-1$
+ }
+}