|
From: <caw...@us...> - 2007-07-26 15:24:17
|
Revision: 2887
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2887&view=rev
Author: cawilliams
Date: 2007-07-26 08:24:14 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
always initialize (since GemManager is now smart enough to avoid null pointers hopefully). Also add VM listener, and when teh default VM changes, refresh the local gem listing
Modified Paths:
--------------
trunk/com.aptana.rdt.ui/src/com/aptana/rdt/ui/RubyGemsInitializer.java
Modified: trunk/com.aptana.rdt.ui/src/com/aptana/rdt/ui/RubyGemsInitializer.java
===================================================================
--- trunk/com.aptana.rdt.ui/src/com/aptana/rdt/ui/RubyGemsInitializer.java 2007-07-26 15:22:21 UTC (rev 2886)
+++ trunk/com.aptana.rdt.ui/src/com/aptana/rdt/ui/RubyGemsInitializer.java 2007-07-26 15:24:14 UTC (rev 2887)
@@ -11,18 +11,13 @@
public class RubyGemsInitializer implements IStartup, IVMInstallChangedListener {
public void earlyStartup() {
- // If ruby isn't set up, listen until we have an interpreter
- IVMInstall vm = RubyRuntime.getDefaultVMInstall();
- if (vm == null) {
- RubyRuntime.addVMInstallChangedListener(this);
- } else {
- AptanaRDTPlugin.getDefault().getGemManager().initialize();
- }
+ AptanaRDTPlugin.getDefault().getGemManager().initialize();
+ RubyRuntime.addVMInstallChangedListener(this); // when default interpreter changes, refresh local gem listing
}
public void defaultVMInstallChanged(IVMInstall previous, IVMInstall current) {
- if (current != null && !AptanaRDTPlugin.getDefault().getGemManager().isInitialized()) {
- AptanaRDTPlugin.getDefault().getGemManager().initialize();
+ if (current != null) {
+ AptanaRDTPlugin.getDefault().getGemManager().refresh();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|