Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.web.core')
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/plugin.xml8
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectClassPathContainerInitializer.java148
4 files changed, 4 insertions, 156 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF
index b30ba1f989..d825042643 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Export-Package: org.eclipse.wst.jsdt.web.core.internal;x-friends:="org.eclipse.w
org.eclipse.wst.jsdt.web.core.internal.java;x-friends:="org.eclipse.wst.jsdt.web.ui",
org.eclipse.wst.jsdt.web.core.internal.java.search;x-friends:="org.eclipse.wst.jsdt.web.ui",
org.eclipse.wst.jsdt.web.core.internal.modelhandler;x-friends:="org.eclipse.wst.jsdt.web.ui",
+ org.eclipse.wst.jsdt.web.core.internal.project,
org.eclipse.wst.jsdt.web.core.internal.provisional.contenttype;x-friends:="org.eclipse.wst.jsdt.web.ui",
org.eclipse.wst.jsdt.web.core.internal.provisional.text;x-friends:="org.eclipse.wst.jsdt.web.ui",
org.eclipse.wst.jsdt.web.core.internal.tasks;x-friends:="org.eclipse.wst.jsdt.web.ui",
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml b/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
index c3cc89143a..0afff3a1b8 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
+++ b/bundles/org.eclipse.wst.jsdt.web.core/plugin.xml
@@ -30,13 +30,7 @@
<builder id="org.eclipse.wst.jsdt.web.core.embeded.javascript"/>
</extension>
- <extension point="org.eclipse.wst.jsdt.core.classpathContainerInitializer">
- <classpathContainerInitializer
- class="org.eclipse.wst.jsdt.web.core.internal.project.WebProjectClassPathContainerInitializer"
- id="org.eclipse.wst.jsdt.launching.WebProject">
- </classpathContainerInitializer>
- </extension>
-
+
<!--
Not using this at the moment, but everythings in place if we need in the future.
-->
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
index 45ed981961..f000e697d7 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
@@ -27,7 +27,8 @@ public class JsWebNature implements IProjectNature {
private static final String NATURE_IDS[] = { JavaCore.NATURE_ID };
public static final IPath VIRTUAL_BROWSER_CLASSPATH = new Path("org.eclipse.wst.jsdt.launching.baseBrowserLibrary");
- public static final IClasspathEntry VIRTUAL_SCOPE_ENTRY = JavaCore.newContainerEntry(new Path(WebProjectClassPathContainerInitializer.VIRTUAL_CONTAINER));
+ public static final String VIRTUAL_CONTAINER = "org.eclipse.wst.jsdt.launching.WebProject";
+ public static final IClasspathEntry VIRTUAL_SCOPE_ENTRY = JavaCore.newContainerEntry(new Path(VIRTUAL_CONTAINER));
private static final String SUPER_TYPE_NAME = "Window";
private static final String SUPER_TYPE_LIBRARY = "org.eclipse.wst.jsdt.launching.baseBrowserLibrary";
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectClassPathContainerInitializer.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectClassPathContainerInitializer.java
deleted file mode 100644
index 191e20577e..0000000000
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectClassPathContainerInitializer.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- *
- */
-package org.eclipse.wst.jsdt.web.core.internal.project;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.jsdt.core.ClasspathContainerInitializer;
-import org.eclipse.wst.jsdt.core.IClasspathContainer;
-import org.eclipse.wst.jsdt.core.IJavaProject;
-import org.eclipse.wst.jsdt.core.compiler.libraries.LibraryLocation;
-import org.eclipse.wst.jsdt.core.compiler.libraries.SystemLibraryLocation;
-
-
-import org.eclipse.wst.jsdt.web.core.internal.JsCorePlugin;
-import org.eclipse.wst.jsdt.web.core.internal.java.JsNameManglerUtil;
-
-/**
- * @author childsb
- *
- */
-public class WebProjectClassPathContainerInitializer extends ClasspathContainerInitializer {
- private static final String CONTAINER_DESCRIPTION = "Web Project support for JSDT";
-
- public static final char[] LIB_NAME = {'b','r','o','w','s','e','r','W','i','n','d','o','w','.','j','s'};
- /* Some tokens for us to identify mangled paths */
- private static final String MANGLED_BUTT1 = "htm";
- private static final String MANGLED_BUTT2 = ".js";
- public static final String VIRTUAL_CONTAINER = "org.eclipse.wst.jsdt.launching.WebProject";
-
- private static String getUnmangedHtmlPath(String containerPathString) {
- if (containerPathString == null) {
- return null;
- }
- if (containerPathString.toLowerCase().indexOf(WebProjectClassPathContainerInitializer.MANGLED_BUTT1) != -1 && containerPathString.toLowerCase().indexOf(WebProjectClassPathContainerInitializer.MANGLED_BUTT2) != -1) {
- return JsNameManglerUtil.unmangle(containerPathString);
- }
- return null;
- }
- public LibraryLocation getLibraryLocation() {
- return new WebBrowserLibLocation();
- }
-
- class WebBrowserLibLocation extends SystemLibraryLocation {
- WebBrowserLibLocation() {
- super();
- }
-
-
- public char[][] getLibraryFileNames() {
- //return new char[][] { WebProjectClassPathContainerInitializer.LIB_NAME };
- return new char[0][];
- }
-
-
- protected String getPluginId() {
- return JsCorePlugin.PLUGIN_ID;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath,
- * org.eclipse.wst.jsdt.core.IJavaProject)
- */
-
- public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) {
- /* dont remove from this project */
- return false;
- }
-
-
- protected IClasspathContainer getContainer(IPath containerPath, IJavaProject project) {
- return this;
- }
-
-
- public String getDescription() {
- return WebProjectClassPathContainerInitializer.CONTAINER_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.core.ClasspathContainerInitializer#getDescription(org.eclipse.core.runtime.IPath,
- * org.eclipse.wst.jsdt.core.IJavaProject)
- */
-
- public String getDescription(IPath containerPath, IJavaProject project) {
- if (containerPath.equals(new Path(WebProjectClassPathContainerInitializer.VIRTUAL_CONTAINER))) {
- return WebProjectClassPathContainerInitializer.CONTAINER_DESCRIPTION;
- }
- String containerPathString = containerPath.toString();
- String unmangled = WebProjectClassPathContainerInitializer.getUnmangedHtmlPath(containerPathString);
- if (unmangled != null) {
- IPath projectPath = project.getPath();
- /* Replace the project path with the project name */
- if (unmangled.indexOf(projectPath.toString()) >= 0) {
- unmangled = project.getDisplayName() + ":" + unmangled.substring(projectPath.toString().length());
- }
- return unmangled;
- }
- return containerPathString;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.core.ClasspathContainerInitializer#getHostPath(org.eclipse.core.runtime.IPath)
- */
-
- public URI getHostPath(IPath path, IJavaProject project) {
- // TODO Auto-generated method stub
- String htmlPath = WebProjectClassPathContainerInitializer.getUnmangedHtmlPath(path.toString());
- if (htmlPath != null) {
- URI fileUri = new Path(htmlPath).toFile().toURI();
- return fileUri;
- // try {
-// return new URI(htmlPath);
-// } catch (URISyntaxException ex) {
-// ex.printStackTrace();
-// }
- }
-// else {
-// try {
-// return new URI(path.toString());
-// } catch (URISyntaxException ex) {
-// // TODO Auto-generated catch block
-// ex.printStackTrace();
-// }
-// }
- return null;
- }
-
-
- public int getKind() {
- return IClasspathContainer.K_APPLICATION;
- }
-
-
- public IPath getPath() {
- return new Path(WebProjectClassPathContainerInitializer.VIRTUAL_CONTAINER);
- }
-}

Back to the top