From: <va...@us...> - 2006-09-22 07:22:10
|
Revision: 7109 http://svn.sourceforge.net/jedit/?rev=7109&view=rev Author: vanza Date: 2006-09-22 00:21:59 -0700 (Fri, 22 Sep 2006) Log Message: ----------- - work around broken JAXP config in Java 1.4 - add file that was missing from plugin jar file - fix broken work-around to no config file being present. Modified Paths: -------------- plugins/ProjectViewer/trunk/build.xml plugins/ProjectViewer/trunk/projectviewer/ProjectPlugin.java plugins/ProjectViewer/trunk/projectviewer/config/ProjectViewerConfig.java Modified: plugins/ProjectViewer/trunk/build.xml =================================================================== --- plugins/ProjectViewer/trunk/build.xml 2006-09-22 02:59:53 UTC (rev 7108) +++ plugins/ProjectViewer/trunk/build.xml 2006-09-22 07:21:59 UTC (rev 7109) @@ -37,6 +37,7 @@ <filename name="**/LICENSE" /> <filename name="**/README" /> <filename name="projectviewer/images/**" /> + <filename name="projectviewer/*.properties" /> </or> <not> <filename name="pvdebug/**" /> Modified: plugins/ProjectViewer/trunk/projectviewer/ProjectPlugin.java =================================================================== --- plugins/ProjectViewer/trunk/projectviewer/ProjectPlugin.java 2006-09-22 02:59:53 UTC (rev 7108) +++ plugins/ProjectViewer/trunk/projectviewer/ProjectPlugin.java 2006-09-22 07:21:59 UTC (rev 7109) @@ -34,6 +34,7 @@ import org.gjt.sp.jedit.EBMessage; import org.gjt.sp.jedit.EditBus; import org.gjt.sp.jedit.EditPlugin; +import org.gjt.sp.jedit.OperatingSystem; import org.gjt.sp.jedit.msg.PluginUpdate; import org.gjt.sp.jedit.msg.PropertiesChanged; import org.gjt.sp.jedit.msg.ViewUpdate; @@ -118,6 +119,14 @@ //{{{ +start() : void /** Start the plugin. */ public void start() { + // work around for brokenness in JDK 1.4 + if (OperatingSystem.hasJava14() && !OperatingSystem.hasJava15() + && System.getProperty("org.xml.sax.driver") == null) + { + System.setProperty("org.xml.sax.driver", + "org.apache.crimson.parser.XMLReaderImpl"); + } + File f = new File(getResourcePath("projects/null")); if (!f.getParentFile().exists()) { if (!f.getParentFile().mkdirs()) { Modified: plugins/ProjectViewer/trunk/projectviewer/config/ProjectViewerConfig.java =================================================================== --- plugins/ProjectViewer/trunk/projectviewer/config/ProjectViewerConfig.java 2006-09-22 02:59:53 UTC (rev 7108) +++ plugins/ProjectViewer/trunk/projectviewer/config/ProjectViewerConfig.java 2006-09-22 07:21:59 UTC (rev 7109) @@ -158,25 +158,18 @@ listeners = new ArrayList(); // loads the properties - Properties props = null; + Properties props = new Properties(); InputStream is = null; try { - props = new Properties(); is = ProjectPlugin.getResourceAsStream("config.properties"); props.load(is); } catch (Exception e) { // Ignores errors Log.log(Log.WARNING, ProjectViewerConfig.class, "Cannot read config file."); - return; } finally { if (is != null) try { is.close(); } catch (Exception e) { } } - if (props == null) { - props = new Properties(); - } - - if (props == null) return; String tmp; // close_files options This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |