|
From: <caw...@us...> - 2007-02-28 21:40:21
|
Revision: 2068
http://svn.sourceforge.net/rubyeclipse/?rev=2068&view=rev
Author: cawilliams
Date: 2007-02-28 13:40:19 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
update upgrade() to add the default loadpath when it looks like tehre's an old project without the RUBY_CONTAINER path in it (so it won't ever get linked to the std and core libraries)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java 2007-02-28 14:33:13 UTC (rev 2067)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java 2007-02-28 21:40:19 UTC (rev 2068)
@@ -120,6 +120,17 @@
}
public boolean upgrade() throws CoreException {
+ ILoadpathEntry[] entries = getRawLoadpath();
+ if (entries == null || entries.length <= 1) {
+ ILoadpathEntry[] loadpathEntries = new ILoadpathEntry[2];
+ loadpathEntries[0] = RubyCore.newSourceEntry(getProject().getFullPath());
+ loadpathEntries[1] = RubyCore.newContainerEntry(new Path("org.rubypeople.rdt.launching.RUBY_CONTAINER")); //$NON-NLS-1$
+ try {
+ setRawLoadpath(loadpathEntries, null);
+ } catch (RubyModelException e) {
+ RubyCore.log(e);
+ }
+ }
return addToBuildSpec(RubyCore.BUILDER_ID);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|