|
From: <caw...@us...> - 2007-07-25 14:27:00
|
Revision: 2836
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2836&view=rev
Author: cawilliams
Date: 2007-07-25 07:26:59 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
fix #5299 - Make gem loadpaths use variables that get resolved. Gem loadpaths now use the RUBY_LIB variable to make paths relative to the ruby library directory. This makes it so that oaths aren't absolute anymore and can be moved across workspaces/etc.
BUT, gems aren't always relative to the Ruby lib folder, so we really need to define a special GEM_LIB variable.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java 2007-07-25 14:26:45 UTC (rev 2835)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java 2007-07-25 14:26:59 UTC (rev 2836)
@@ -1477,4 +1477,18 @@
public static IRegion newRegion() {
return new Region();
}
+
+ /**
+ * Returns the names of all known loadpath variables.
+ * <p>
+ * Loadpath variable values are persisted locally to the workspace, and
+ * are preserved from session to session.
+ * <p>
+ *
+ * @return the list of loadpath variable names
+ * @see #setLoadpathVariable(String, IPath)
+ */
+ public static String[] getLoadpathVariableNames() {
+ return RubyModelManager.getRubyModelManager().variableNames();
+ }
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-07-25 14:26:45 UTC (rev 2835)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-07-25 14:26:59 UTC (rev 2836)
@@ -2953,4 +2953,15 @@
return VERBOSE;
}
+ public synchronized String[] variableNames(){
+ int length = this.variables.size();
+ String[] result = new String[length];
+ Iterator vars = this.variables.keySet().iterator();
+ int index = 0;
+ while (vars.hasNext()) {
+ result[index++] = (String) vars.next();
+ }
+ return result;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|