import net.sourceforge.phpeclipse.LoadPathEntry;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.QualifiedName;
-import net.sourceforge.phpdt.internal.core.ClasspathEntry;
-import net.sourceforge.phpdt.internal.core.XMLWriter;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
* This is the project bin folder
*/
protected IPath defaultOutputLocation() throws JavaModelException {
- return getProject().getFullPath().append("bin"); //$NON-NLS-1$
+ return null; //getProject().getFullPath().append("bin"); //$NON-NLS-1$
}
/**
return project;
}
-
+ /**
+ * Sets the underlying kernel project of this Java project,
+ * and fills in its parent and name.
+ * Called by IProject.getNature().
+ *
+ * @see IProjectNature#setProject(IProject)
+ */
+ public void setProject(IProject project) {
+
+ this.project = project;
+ this.parent = JavaModelManager.getJavaModelManager().getJavaModel();
+ this.name = project.getName();
+ }
protected IProject getProject(String name) {
return PHPeclipsePlugin.getWorkspace().getRoot().getProject(name);
}
return this.isOnClasspath(path);
}
-
+ private IPath getPluginWorkingLocation() {
+ return this.project.getWorkingLocation(JavaCore.PLUGIN_ID);
+ }
/*
* load preferences from a shareable format (VCM-wise)
*/
Preferences preferences = new Preferences();
// File prefFile = getProject().getLocation().append(PREF_FILENAME).toFile();
- IPath projectMetaLocation = getProject().getPluginWorkingLocation(JavaCore.getPlugin().getDescriptor());
+ IPath projectMetaLocation = getPluginWorkingLocation();
if (projectMetaLocation != null) {
File prefFile = projectMetaLocation.append(PREF_FILENAME).toFile();
if (prefFile.exists()) { // load preferences from file
}
}
+
/**
* Save project custom preferences to shareable file (.jprefs)
*/
private void savePreferences(Preferences preferences) {
- IProject project = getProject();
- if (!JavaProject.hasJavaNature(project)) return; // ignore
+ if (!JavaProject.hasJavaNature(this.project)) return; // ignore
if (preferences == null || (!preferences.needsSaving() && preferences.propertyNames().length != 0)) {
// nothing to save
// preferences need to be saved
// 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(JavaCore.getPlugin().getDescriptor()).append(PREF_FILENAME).toFile();
+// File prefFile = this.project.getLocation().append(PREF_FILENAME).toFile();
+ File prefFile = getPluginWorkingLocation().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
}
}
}
-
/**
* Update the Java command in the build spec (replace existing one if present,
* add one first if none).
}
/**
- * Sets the underlying kernel project of this Java project,
- * and fills in its parent and name.
- * Called by IProject.getNature().
- *
- * @see IProjectNature#setProject
- */
- public void setProject(IProject project) {
-
- project = project;
- parent = JavaModelManager.getJavaModelManager().getJavaModel();
- name = project.getName();
- }
-
- /**
* @see IJavaProject
*/
public void setRawClasspath(