|
From: <caw...@us...> - 2007-07-01 16:05:39
|
Revision: 2707
http://svn.sourceforge.net/rubyeclipse/?rev=2707&view=rev
Author: cawilliams
Date: 2007-07-01 09:05:37 -0700 (Sun, 01 Jul 2007)
Log Message:
-----------
add in a hacky fix to avoid adding gems to our command line loadpath (they're added in dynamically in ruby. We only keep track of them as loadpaths for our own usage in modelling the code and dependencies, so we shouldn't be throwing them on the loadpath on the command line)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RuntimeLoadpathEntry.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RuntimeLoadpathEntry.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RuntimeLoadpathEntry.java 2007-06-30 16:59:50 UTC (rev 2706)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RuntimeLoadpathEntry.java 2007-07-01 16:05:37 UTC (rev 2707)
@@ -365,15 +365,30 @@
}
break;
case PROJECT:
- case ARCHIVE:
setLoadpathProperty(USER_CLASSES);
break;
+ case ARCHIVE:
+ if (isGem()) { // FIXME This is a huge hack. We should integrate the idea of gems into our loadpath infrastructure much more!
+ setLoadpathProperty(STANDARD_CLASSES);
+ } else {
+ setLoadpathProperty(USER_CLASSES);
+ }
+ break;
default:
break;
}
}
+ private boolean isGem() {
+ String[] segments = fLoadpathEntry.getPath().segments();
+ if (segments == null) return false;
+ for (int i = 0; i < segments.length; i++) {
+ if (segments[i].equals("gems")) return true;
+ }
+ return false;
+ }
+
/**
* @see IRuntimeLoadpathEntry#setLoadpathProperty(int)
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|