X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaProject.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaProject.java index 2a0a680..3215459 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaProject.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaProject.java @@ -44,11 +44,11 @@ import net.sourceforge.phpdt.core.IJavaProject; import net.sourceforge.phpdt.core.IPackageFragment; import net.sourceforge.phpdt.core.IPackageFragmentRoot; import net.sourceforge.phpdt.core.JavaModelException; +import net.sourceforge.phpdt.core.JavaCore; import net.sourceforge.phpdt.internal.codeassist.ISearchableNameEnvironment; import net.sourceforge.phpdt.internal.compiler.util.ObjectVector; import net.sourceforge.phpdt.internal.corext.Assert; import net.sourceforge.phpeclipse.LoadPathEntry; -import net.sourceforge.phpeclipse.PHPCore; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import org.apache.xerces.dom.DocumentImpl; @@ -151,14 +151,14 @@ public class JavaProject if (externalPath == null) return null; -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonicalizing " + externalPath.toString()); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonicalizing " + externalPath.toString()); //$NON-NLS-1$ + } if (IS_CASE_SENSITIVE) { -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is original path (file system is case sensitive)"); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is original path (file system is case sensitive)"); //$NON-NLS-1$ + } return externalPath; } @@ -166,9 +166,9 @@ public class JavaProject IWorkspace workspace = ResourcesPlugin.getWorkspace(); if (workspace == null) return externalPath; // protection during shutdown (30487) if (workspace.getRoot().findMember(externalPath) != null) { -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is original path (member of workspace)"); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is original path (member of workspace)"); //$NON-NLS-1$ + } return externalPath; } @@ -178,9 +178,9 @@ public class JavaProject new Path(new File(externalPath.toOSString()).getCanonicalPath()); } catch (IOException e) { // default to original path -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is original path (IOException)"); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is original path (IOException)"); //$NON-NLS-1$ + } return externalPath; } @@ -188,9 +188,9 @@ public class JavaProject int canonicalLength = canonicalPath.segmentCount(); if (canonicalLength == 0) { // the java.io.File canonicalization failed -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is original path (canonical path is empty)"); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is original path (canonical path is empty)"); //$NON-NLS-1$ + } return externalPath; } else if (externalPath.isAbsolute()) { result = canonicalPath; @@ -201,9 +201,9 @@ public class JavaProject if (canonicalLength >= externalLength) { result = canonicalPath.removeFirstSegments(canonicalLength - externalLength); } else { -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is original path (canonical path is " + canonicalPath.toString() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is original path (canonical path is " + canonicalPath.toString() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ + } return externalPath; } } @@ -212,9 +212,9 @@ public class JavaProject if (externalPath.getDevice() == null) { result = result.setDevice(null); } -// if (JavaModelManager.VERBOSE) { -// System.out.println("JAVA MODEL - Canonical path is " + result.toString()); //$NON-NLS-1$ -// } + if (JavaModelManager.VERBOSE) { + System.out.println("JAVA MODEL - Canonical path is " + result.toString()); //$NON-NLS-1$ + } return result; } @@ -419,7 +419,7 @@ public class JavaProject if (member != null && member.getType() == IResource.PROJECT){ // double check if bound to project (23977) IProject projRsc = (IProject) member; if (JavaProject.hasJavaNature(projRsc)) { - JavaProject project = (JavaProject) PHPCore.create(projRsc); + JavaProject project = (JavaProject) JavaCore.create(projRsc); project.computeExpandedClasspath( initialProject, ignoreUnresolvedVariable, @@ -560,7 +560,7 @@ public class JavaProject IProject requiredProjectRsc = (IProject) member; if (JavaProject.hasJavaNature(requiredProjectRsc)){ // special builder binary output rootIDs.add(rootID); - JavaProject requiredProject = (JavaProject)PHPCore.create(requiredProjectRsc); + JavaProject requiredProject = (JavaProject)JavaCore.create(requiredProjectRsc); requiredProject.computePackageFragmentRoots( requiredProject.getResolvedClasspath(true), accumulatedRoots, @@ -680,7 +680,7 @@ public class JavaProject case IJavaModelStatusConstants.CLASSPATH_CYCLE : isCycleProblem = true; - if (PHPCore.ERROR.equals(getOption(PHPCore.CORE_CIRCULAR_CLASSPATH, true))) { + if (JavaCore.ERROR.equals(getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true))) { severity = IMarker.SEVERITY_ERROR; } else { severity = IMarker.SEVERITY_WARNING; @@ -695,7 +695,7 @@ public class JavaProject default: IPath path = status.getPath(); if (path != null) arguments = new String[] { path.toString() }; - if (PHPCore.ERROR.equals(getOption(PHPCore.CORE_INCOMPLETE_CLASSPATH, true))) { + if (JavaCore.ERROR.equals(getOption(JavaCore.CORE_INCOMPLETE_CLASSPATH, true))) { severity = IMarker.SEVERITY_ERROR; } else { severity = IMarker.SEVERITY_WARNING; @@ -836,7 +836,7 @@ public class JavaProject protected IClasspathEntry[] defaultClasspath() throws JavaModelException { return new IClasspathEntry[] { - PHPCore.newSourceEntry(getProject().getFullPath())}; + JavaCore.newSourceEntry(getProject().getFullPath())}; } /** @@ -1296,7 +1296,7 @@ public class JavaProject Preferences preferences = getPreferences(); if (preferences == null || preferences.isDefault(optionName)) { - return inheritJavaCoreOptions ? PHPCore.getOption(optionName) : null; + return inheritJavaCoreOptions ? JavaCore.getOption(optionName) : null; } return preferences.getString(optionName).trim(); } @@ -1309,7 +1309,7 @@ public class JavaProject public Map getOptions(boolean inheritJavaCoreOptions) { // initialize to the defaults from JavaCore options pool - Map options = inheritJavaCoreOptions ? PHPCore.getOptions() : new Hashtable(5); + Map options = inheritJavaCoreOptions ? JavaCore.getOptions() : new Hashtable(5); Preferences preferences = getPreferences(); if (preferences == null) return options; // cannot do better (non-Java project) @@ -1693,7 +1693,7 @@ public class JavaProject case IClasspathEntry.CPE_VARIABLE : - IClasspathEntry resolvedEntry = PHPCore.getResolvedClasspathEntry(rawEntry); + IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(rawEntry); if (resolvedEntry == null) { if (!ignoreUnresolvedEntry) throw new JavaModelException(status); } else { @@ -1955,7 +1955,7 @@ public class JavaProject Preferences preferences = new Preferences(); // File prefFile = getProject().getLocation().append(PREF_FILENAME).toFile(); - IPath projectMetaLocation = getProject().getPluginWorkingLocation(PHPCore.getPlugin().getDescriptor()); + IPath projectMetaLocation = getProject().getPluginWorkingLocation(JavaCore.getPlugin().getDescriptor()); if (projectMetaLocation != null) { File prefFile = projectMetaLocation.append(PREF_FILENAME).toFile(); if (prefFile.exists()) { // load preferences from file @@ -2164,7 +2164,7 @@ public class JavaProject // the preferences file is located in the plug-in's state area // at a well-known name (.jprefs) // File prefFile = getProject().getLocation().append(PREF_FILENAME).toFile(); - File prefFile = project.getPluginWorkingLocation(PHPCore.getPlugin().getDescriptor()).append(PREF_FILENAME).toFile(); + File prefFile = project.getPluginWorkingLocation(JavaCore.getPlugin().getDescriptor()).append(PREF_FILENAME).toFile(); if (preferences.propertyNames().length == 0) { // there are no preference settings // rather than write an empty file, just delete any existing file @@ -2438,8 +2438,8 @@ public class JavaProject if (cycleParticipants.contains(project.getPath())){ IMarker cycleMarker = project.getCycleMarker(); - String circularCPOption = project.getOption(PHPCore.CORE_CIRCULAR_CLASSPATH, true); - int circularCPSeverity = PHPCore.ERROR.equals(circularCPOption) ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING; + String circularCPOption = project.getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true); + int circularCPSeverity = JavaCore.ERROR.equals(circularCPOption) ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING; if (cycleMarker != null) { // update existing cycle marker if needed try { @@ -2491,7 +2491,7 @@ public class JavaProject if (!traversed.contains(prereqProjectPath)) { IResource member = workspaceRoot.findMember(prereqProjectPath); if (member != null && member.getType() == IResource.PROJECT){ - JavaProject project = (JavaProject)PHPCore.create((IProject)member); + JavaProject project = (JavaProject)JavaCore.create((IProject)member); project.updateCycleParticipants(null, prereqChain, cycleParticipants, workspaceRoot, traversed); } }