X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPRuntime.java b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPRuntime.java index 0613535..0b392a6 100644 --- a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPRuntime.java +++ b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPRuntime.java @@ -18,7 +18,6 @@ import java.util.List; import javax.xml.parsers.SAXParserFactory; import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; @@ -28,7 +27,7 @@ import org.xml.sax.XMLReader; public class PHPRuntime { protected static PHPRuntime runtime; - + protected List installedInterpreters; protected PHPInterpreter selectedInterpreter; protected PHPRuntime() { @@ -41,7 +40,7 @@ public class PHPRuntime { } return runtime; } - + public PHPInterpreter getSelectedInterpreter() { if (selectedInterpreter == null) { loadRuntimeConfiguration(); @@ -56,7 +55,7 @@ public class PHPRuntime { if (each.getInstallLocation().toString().equals(installLocation)) return each; } - + return getSelectedInterpreter(); } @@ -78,7 +77,7 @@ public class PHPRuntime { loadRuntimeConfiguration(); return installedInterpreters; } - + public void setInstalledInterpreters(List newInstalledInterpreters) { installedInterpreters = newInstalledInterpreters; if (installedInterpreters.size() > 0) @@ -86,7 +85,7 @@ public class PHPRuntime { else setSelectedInterpreter(null); } - + protected void saveRuntimeConfiguration() { writeXML(getRuntimeConfigurationWriter()); } @@ -99,7 +98,7 @@ public class PHPRuntime { return null; } - + protected void loadRuntimeConfiguration() { installedInterpreters = new ArrayList(); try { @@ -120,14 +119,14 @@ public class PHPRuntime { } catch(FileNotFoundException e) {} return new StringReader(""); } - + protected void writeXML(Writer writer) { try { writer.write(""); Iterator interpretersIterator = installedInterpreters.iterator(); while (interpretersIterator.hasNext()) { writer.write(""); } writer.write(""); @@ -174,7 +173,7 @@ public class PHPRuntime { public void skippedEntity(String name) throws SAXException {} }; } - + protected File getRuntimeConfigurationFile() { IPath stateLocation = PHPLaunchingPlugin.getDefault().getStateLocation(); IPath fileLocation = stateLocation.append("runtimeConfiguration.xml");