|
From: <caw...@us...> - 2007-01-18 16:35:39
|
Revision: 1802
http://svn.sourceforge.net/rubyeclipse/?rev=1802&view=rev
Author: cawilliams
Date: 2007-01-18 08:35:31 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
more renaming
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyContainerInitializer.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLoadpathVariablesInitializer.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyVMContainer.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/VMDefinitionsContainer.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractInterpreter.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -60,7 +60,7 @@
}
/**
- * @see IBaseLabelProvider#removeInterpreterInstallChangedListener(ILabelProviderListener)
+ * @see IBaseLabelProvider#removeVMInstallChangedListener(ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener listener) {
}
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -157,7 +157,7 @@
public void widgetSelected(SelectionEvent evt) {
EditInterpreterDialog dialog = new EditInterpreterDialog(this,
- fShell, RubyRuntime.getInterpreterInstallTypes(),
+ fShell, RubyRuntime.getVMInstallTypes(),
null);
dialog.setTitle(RubyVMMessages.InstalledJREsBlock_7);
if (dialog.open() != Window.OK) {
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -155,7 +155,7 @@
}
protected void addInterpreter() {
- EditInterpreterDialog dialog = new EditInterpreterDialog(this, getShell(), RubyRuntime.getInterpreterInstallTypes(), null);
+ EditInterpreterDialog dialog = new EditInterpreterDialog(this, getShell(), RubyRuntime.getVMInstallTypes(), null);
dialog.setTitle(RubyVMMessages.InstalledJREsBlock_7);
if (dialog.open() != Window.OK) {
return;
@@ -195,7 +195,7 @@
// VMDetailsDialog dialog= new VMDetailsDialog(getShell(), vm);
// dialog.open();
// } else {
- EditInterpreterDialog dialog= new EditInterpreterDialog(this, getShell(), RubyRuntime.getInterpreterInstallTypes(), vm);
+ EditInterpreterDialog dialog= new EditInterpreterDialog(this, getShell(), RubyRuntime.getVMInstallTypes(), vm);
dialog.setTitle(RubyVMMessages.InstalledJREsBlock_8);
if (dialog.open() != Window.OK) {
return;
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyContainerInitializer.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyContainerInitializer.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyContainerInitializer.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -42,13 +42,13 @@
String vmTypeId = getInterpreterTypeId(containerPath);
String vmName = getInterpreterName(containerPath);
IVMInstallType vmType = RubyRuntime
- .getInterpreterInstallType(vmTypeId);
+ .getVMInstallType(vmTypeId);
if (vmType != null) {
vm = vmType.findVMInstallByName(vmName);
}
} else {
// workspace default Ruby VM
- vm = RubyRuntime.getDefaultInterpreterInstall();
+ vm = RubyRuntime.getDefaultVMInstall();
}
return vm;
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLoadpathVariablesInitializer.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLoadpathVariablesInitializer.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLoadpathVariablesInitializer.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -18,7 +18,7 @@
@Override
public void initialize(String variable) {
- IVMInstall vmInstall= RubyRuntime.getDefaultInterpreterInstall();
+ IVMInstall vmInstall= RubyRuntime.getDefaultVMInstall();
if (vmInstall != null) {
IPath newPath= null;
IPath[] locations= RubyRuntime.getLibraryLocations(vmInstall);
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyVMContainer.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyVMContainer.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyVMContainer.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -60,7 +60,7 @@
fgLoadpathEntries.remove(removedVm);
}
};
- RubyRuntime.addInterpreterInstallChangedListener(listener);
+ RubyRuntime.addVMInstallChangedListener(listener);
}
ILoadpathEntry[] entries = (ILoadpathEntry[])fgLoadpathEntries.get(vm);
if (entries == null) {
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/VMDefinitionsContainer.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/VMDefinitionsContainer.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/VMDefinitionsContainer.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -422,7 +422,7 @@
// Retrieve the 'id' attribute and the corresponding VM type object
String id = vmTypeElement.getAttribute("id"); //$NON-NLS-1$
- IVMInstallType vmType= RubyRuntime.getInterpreterInstallType(id);
+ IVMInstallType vmType= RubyRuntime.getVMInstallType(id);
if (vmType != null) {
// For each VM child node, populate the container with a subordinate node
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractInterpreter.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractInterpreter.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractInterpreter.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -83,7 +83,7 @@
PropertyChangeEvent event = new PropertyChangeEvent(this, IVMInstallChangedListener.PROPERTY_NAME, fName, name);
fName= name;
if (fNotify) {
- RubyRuntime.fireInterpreterChanged(event);
+ RubyRuntime.fireVMChanged(event);
}
}
}
@@ -105,7 +105,7 @@
PropertyChangeEvent event = new PropertyChangeEvent(this, IVMInstallChangedListener.PROPERTY_INSTALL_LOCATION, fInstallLocation, installLocation);
fInstallLocation= installLocation;
if (fNotify) {
- RubyRuntime.fireInterpreterChanged(event);
+ RubyRuntime.fireVMChanged(event);
}
}
}
@@ -164,7 +164,7 @@
PropertyChangeEvent event = new PropertyChangeEvent(this, IVMInstallChangedListener.PROPERTY_LIBRARY_LOCATIONS, prevLocations, newLocations);
fSystemLibraryDescriptions = locations;
if (fNotify) {
- RubyRuntime.fireInterpreterChanged(event);
+ RubyRuntime.fireVMChanged(event);
}
}
@@ -253,7 +253,7 @@
PropertyChangeEvent event = new PropertyChangeEvent(this, IVMInstallChangedListener.PROPERTY_VM_ARGUMENTS, fInterpreterArgs, vmArgs);
fInterpreterArgs = vmArgs;
if (fNotify) {
- RubyRuntime.fireInterpreterChanged(event);
+ RubyRuntime.fireVMChanged(event);
}
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -125,7 +125,7 @@
return runtime;
}
- public static void removeInterpreterInstallChangedListener(IVMInstallChangedListener listener) {
+ public static void removeVMInstallChangedListener(IVMInstallChangedListener listener) {
fgVMListeners.remove(listener);
}
@@ -151,11 +151,7 @@
IVMInstall oldInterpreter = selectedInterpreter;
selectedInterpreter = anInterpreter;
saveRuntimeConfiguration();
- Object[] listeners = fgVMListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
- listener.defaultVMInstallChanged(oldInterpreter, anInterpreter);
- }
+ notifyDefaultVMChanged(oldInterpreter, anInterpreter);
}
public void addInstalledInterpreter(IVMInstall anInterpreter) {
@@ -281,18 +277,26 @@
return new File(fileLocation.toOSString());
}
- public static void addInterpreterInstallChangedListener(IVMInstallChangedListener listener) {
+ public static void addVMInstallChangedListener(IVMInstallChangedListener listener) {
fgVMListeners.add(listener);
}
+ private static void notifyDefaultVMChanged(IVMInstall previous, IVMInstall current) {
+ Object[] listeners = fgVMListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
+ listener.defaultVMInstallChanged(previous, current);
+ }
+ }
+
/**
* Returns the VM install type with the given unique id.
* @param id the VM install type unique id
* @return The VM install type for the given id, or <code>null</code> if no
* VM install type with the given id is registered.
*/
- public static IVMInstallType getInterpreterInstallType(String id) {
- IVMInstallType[] vmTypes= getInterpreterInstallTypes();
+ public static IVMInstallType getVMInstallType(String id) {
+ IVMInstallType[] vmTypes= getVMInstallTypes();
for (int i= 0; i < vmTypes.length; i++) {
if (vmTypes[i].getId().equals(id)) {
return vmTypes[i];
@@ -308,12 +312,12 @@
*
* @return the list of registered VM types
*/
- public static IVMInstallType[] getInterpreterInstallTypes() {
- initializeInterpreters();
+ public static IVMInstallType[] getVMInstallTypes() {
+ initializeVMs();
return fgInterpreterTypes;
}
- public static IVMInstall getDefaultInterpreterInstall() {
+ public static IVMInstall getDefaultVMInstall() {
// TODO Auto-generated method stub
return null;
}
@@ -322,9 +326,9 @@
* Perform VM type and VM install initialization. Does not hold locks
* while performing change notification.
*
- * @since 3.2
+ * @since 0.9.0
*/
- private static void initializeInterpreters() {
+ private static void initializeVMs() {
VMDefinitionsContainer vmDefs = null;
boolean setPref = false;
synchronized (fgVMLock) {
@@ -384,12 +388,12 @@
}
if (vmDefs != null) {
// notify of initial VMs for backwards compatibility
- IVMInstallType[] installTypes = getInterpreterInstallTypes();
+ IVMInstallType[] installTypes = getVMInstallTypes();
for (int i = 0; i < installTypes.length; i++) {
IVMInstallType type = installTypes[i];
IVMInstall[] installs = type.getVMInstalls();
for (int j = 0; j < installs.length; j++) {
- fireInterpreterAdded(installs[j]);
+ fireVMAdded(installs[j]);
}
}
@@ -527,7 +531,7 @@
abort(MessageFormat.format("Missing required id attribute for vmInstall contributed by {0}", //$NON-NLS-1$
(Object[]) new String[]{element.getContributor().getName()}), null);
}
- IVMInstallType installType = getInterpreterInstallType(vmType);
+ IVMInstallType installType = getVMInstallType(vmType);
if (installType == null) {
abort(MessageFormat.format("vmInstall {0} contributed by {1} references undefined VM install type {2}", //$NON-NLS-1$
(Object[]) new String[]{id, element.getContributor().getName(), vmType}), null);
@@ -634,15 +638,37 @@
throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), code, message, exception));
}
- private static void fireInterpreterAdded(IVMInstall interpreter) {
- // TODO Actually notify IInterpreterInstallChangedListeners
-
+ private static void fireVMAdded(IVMInstall vm) {
+ if (!fgInitializingVMs) {
+ Object[] listeners = fgVMListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
+ listener.vmAdded(vm);
+ }
+ }
}
- public static void fireInterpreterChanged(PropertyChangeEvent event) {
- // TODO Actually notify IInterpreterInstallChangedListeners
-
+ public static void fireVMChanged(PropertyChangeEvent event) {
+ Object[] listeners = fgVMListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
+ listener.vmChanged(event);
+ }
}
+
+ /**
+ * Notifies all VM install changed listeners of the VM removal
+ *
+ * @param vm the VM that has been removed
+ * @since 0.9.0
+ */
+ public static void fireVMRemoved(IVMInstall vm) {
+ Object[] listeners = fgVMListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
+ listener.vmRemoved(vm);
+ }
+ }
/**
* Evaluates library locations for a IVMInstall. If no library locations are set on the install, a default
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java 2007-01-18 16:30:20 UTC (rev 1801)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java 2007-01-18 16:35:31 UTC (rev 1802)
@@ -152,7 +152,7 @@
public void vmRemoved(IVMInstall removedVm) {
}
};
- RubyRuntime.addInterpreterInstallChangedListener(runtimeListener);
+ RubyRuntime.addVMInstallChangedListener(runtimeListener);
RubyPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) {
@@ -202,7 +202,7 @@
public void dispose() {
descriptionUpdater.requestStop();
- RubyRuntime.removeInterpreterInstallChangedListener(runtimeListener);
+ RubyRuntime.removeVMInstallChangedListener(runtimeListener);
super.dispose();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|