misc changes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / JavaProject.java
index a634464..3215459 100644 (file)
@@ -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;
@@ -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);
                                                        }
                                                }