Removed UI dependency.
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 37f012f..82139fa 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
@@ -26,8 +26,7 @@
org.eclipse.wst.validation;bundle-version="[1.1.0,1.2.0)",
org.eclipse.jface.text,
org.eclipse.wst.jsdt.core,
- org.eclipse.wst.common.project.facet.core,
- org.eclipse.wst.jsdt.ui
+ org.eclipse.wst.common.project.facet.core
Eclipse-LazyStart: true
Import-Package: org.eclipse.swt.widgets,
org.eclipse.wst.common.componentcore,
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 6eddc02..59145e3 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
@@ -16,8 +16,9 @@
import org.eclipse.wst.jsdt.core.IClasspathEntry;
import org.eclipse.wst.jsdt.core.JavaCore;
import org.eclipse.wst.jsdt.core.LibrarySuperType;
+
import org.eclipse.wst.jsdt.internal.core.JavaProject;
-import org.eclipse.wst.jsdt.ui.PreferenceConstants;
+//import org.eclipse.wst.jsdt.ui.PreferenceConstants;
public class JsWebNature implements IProjectNature {
//private static final String FILENAME_CLASSPATH = ".classpath"; //$NON-NLS-1$
@@ -32,6 +33,9 @@
private static final String SUPER_TYPE_NAME = "Window";
private static final String SUPER_TYPE_LIBRARY = "org.eclipse.wst.jsdt.launching.baseBrowserLibrary";
+ /* Default JRE entry */
+ private static final String DEFAULT_JRE_PATH = "org.eclipse.wst.jsdt.launching.JRE_CONTAINER";
+
public static void addJsNature(IProject project, IProgressMonitor monitor) throws CoreException {
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException();
@@ -156,9 +160,9 @@
public void deconfigure() throws CoreException {
Vector badEntries = new Vector();
- IClasspathEntry[] defaultJRELibrary = PreferenceConstants.getDefaultJRELibrary();
+ IClasspathEntry defaultJRELibrary = getJreEntry();
IClasspathEntry[] localEntries = initLocalClassPath();
- badEntries.addAll(Arrays.asList(defaultJRELibrary));
+ badEntries.add(defaultJRELibrary);
badEntries.addAll(Arrays.asList(localEntries));
IClasspathEntry[] entries = getRawClassPath();
Vector goodEntries = new Vector();
@@ -218,16 +222,20 @@
return fCurrProject.getFile(JavaProject.CLASSPATH_FILENAME).exists();
}
+ private IClasspathEntry getJreEntry() {
+ return JavaCore.newContainerEntry(new Path(DEFAULT_JRE_PATH));
+ }
+
private void initJREEntry() {
- IClasspathEntry[] defaultJRELibrary = PreferenceConstants.getDefaultJRELibrary();
+ IClasspathEntry defaultJRELibrary = getJreEntry();
try {
IClasspathEntry[] entries = getRawClassPath();
for (int i = 0; i < entries.length; i++) {
- if (entries[i] == defaultJRELibrary[0]) {
+ if (entries[i] == defaultJRELibrary) {
return;
}
}
- classPathEntries.add(defaultJRELibrary[0]);
+ classPathEntries.add(defaultJRELibrary);
} catch (Exception e) {
if (DEBUG) {
System.out.println("Error checking sourcepath:" + e);