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;
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,
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,
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;
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;
protected IClasspathEntry[] defaultClasspath() throws JavaModelException {
return new IClasspathEntry[] {
- PHPCore.newSourceEntry(getProject().getFullPath())};
+ JavaCore.newSourceEntry(getProject().getFullPath())};
}
/**
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();
}
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)
case IClasspathEntry.CPE_VARIABLE :
- IClasspathEntry resolvedEntry = PHPCore.getResolvedClasspathEntry(rawEntry);
+ IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(rawEntry);
if (resolvedEntry == null) {
if (!ignoreUnresolvedEntry) throw new JavaModelException(status);
} else {
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
// 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
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 {
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);
}
}