|
From: Markus B. <mba...@us...> - 2005-09-26 21:48:42
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1606/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: handle osg.install.area (more?) platform independently, done in a pair programming session with David, thanks! Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RubyCore.java 7 Sep 2005 21:21:08 -0000 1.13 --- RubyCore.java 26 Sep 2005 21:48:31 -0000 1.14 *************** *** 16,19 **** --- 16,20 ---- import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; + import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Plugin; *************** *** 277,284 **** if (!pluginDirFile.exists()) { String installArea = System.getProperty("osgi.install.area"); ! if (installArea.startsWith("file:/")) ! installArea = installArea.substring("file:/".length()); ! File installFile = new File(installArea); pluginDirFile = new File(installFile, pluginDir); if (!pluginDirFile.exists()) --- 278,290 ---- if (!pluginDirFile.exists()) { + // pluginDirFile is a relative path, if the working directory is different from + // the location of the eclipse executable, we try this ... String installArea = System.getProperty("osgi.install.area"); ! if (installArea.startsWith("file:")) { ! installArea = installArea.substring("file:".length()); ! } ! // Path.toOSString() removes a leading slash if on windows, e.g. ! // /D:/Eclipse => D:/Eclipse ! File installFile = new File(new Path(installArea).toOSString()); pluginDirFile = new File(installFile, pluginDir); if (!pluginDirFile.exists()) |