|
From: <caw...@us...> - 2007-01-18 14:26:17
|
Revision: 1788
http://svn.sourceforge.net/rubyeclipse/?rev=1788&view=rev
Author: cawilliams
Date: 2007-01-18 06:26:08 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
move RubyRuntime to externally facing package (like JavaRuntime is)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerLaunch.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.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.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/InterpreterRunnerConfiguration.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.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/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.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
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/rdocexport/RDocUtility.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/ListenerList.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java
Modified: trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerLaunch.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerLaunch.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerLaunch.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -18,8 +18,8 @@
import org.rubypeople.rdt.internal.debug.core.RubyLineBreakpoint;
import org.rubypeople.rdt.internal.launching.RubyInterpreter;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
/*
*
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -26,8 +26,8 @@
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyApplicationShortcut implements ILaunchShortcut {
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -34,9 +34,9 @@
import org.rubypeople.rdt.internal.debug.ui.preferences.EditInterpreterDialog;
import org.rubypeople.rdt.internal.launching.RubyInterpreter;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyEnvironmentTab extends AbstractLaunchConfigurationTab {
protected ListViewer loadPathListViewer;
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -27,8 +27,8 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages;
import org.rubypeople.rdt.internal.launching.RubyInterpreter;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyInterpreterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
protected CheckboxTableViewer tableViewer;
Modified: trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -24,8 +24,8 @@
import org.rubypeople.rdt.internal.debug.ui.RubySourceLocator;
import org.rubypeople.rdt.internal.launching.RubyInterpreter;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.ui.IRubyConstants;
public class TC_RubyApplicationShortcut extends ModifyingResourceTest {
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/InterpreterRunnerConfiguration.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/InterpreterRunnerConfiguration.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/InterpreterRunnerConfiguration.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -13,6 +13,7 @@
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.core.RubyProject;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class InterpreterRunnerConfiguration {
protected ILaunchConfiguration configuration;
Added: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/ListenerList.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/ListenerList.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/ListenerList.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.internal.launching;
+
+
+/**
+ * Local version of org.eclipse.jface.util.ListenerList (modified)s
+ */
+public class ListenerList {
+ /**
+ * The current number of listeners.
+ * Maintains invariant: 0 <= fSize <= listeners.length.
+ */
+ private int fSize;
+
+ /**
+ * The list of listeners. Initially <code>null</code> but initialized
+ * to an array of size capacity the first time a listener is added.
+ * Maintains invariant: listeners != null if and only if fSize != 0
+ */
+ private Object[] fListeners= null;
+
+ /**
+ * The empty array singleton instance, returned by getListeners()
+ * when size == 0.
+ */
+ private static final Object[] EmptyArray= new Object[0];
+
+ /**
+ * Creates a listener list with the given initial capacity.
+ *
+ * @param capacity the number of listeners which this list can initially accept
+ * without growing its internal representation; must be at least 1
+ */
+ public ListenerList(int capacity) {
+ if (capacity < 1) {
+ throw new IllegalArgumentException();
+ }
+ fListeners= new Object[capacity];
+ fSize= 0;
+ }
+
+ /**
+ * Adds a listener to the list.
+ * Has no effect if an identical listener is already registered.
+ *
+ * @param listener a listener
+ */
+ public synchronized void add(Object listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException();
+ }
+ // check for duplicates using identity
+ for (int i= 0; i < fSize; ++i) {
+ if (fListeners[i] == listener) {
+ return;
+ }
+ }
+ // grow array if necessary
+ if (fSize == fListeners.length) {
+ Object[] temp= new Object[(fSize * 2) + 1];
+ System.arraycopy(fListeners, 0, temp, 0, fSize);
+ fListeners= temp;
+ }
+ fListeners[fSize++]= listener;
+ }
+
+ /**
+ * Returns an array containing all the registered listeners.
+ * The resulting array is unaffected by subsequent adds or removes.
+ * If there are no listeners registered, the result is an empty array
+ * singleton instance (no garbage is created).
+ * Use this method when notifying listeners, so that any modifications
+ * to the listener list during the notification will have no effect on the
+ * notification itself.
+ */
+ public synchronized Object[] getListeners() {
+ if (fSize == 0) {
+ return EmptyArray;
+ }
+ Object[] result= new Object[fSize];
+ System.arraycopy(fListeners, 0, result, 0, fSize);
+ return result;
+ }
+
+ /**
+ * Removes a listener from the list.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener a listener
+ */
+ public synchronized void remove(Object listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException();
+ }
+
+ for (int i= 0; i < fSize; ++i) {
+ if (fListeners[i] == listener) {
+ if (--fSize == 0) {
+ fListeners= new Object[1];
+ } else {
+ if (i < fSize) {
+ fListeners[i]= fListeners[fSize];
+ }
+ fListeners[fSize]= null;
+ }
+ return;
+ }
+ }
+ }
+
+ /**
+ * Removes all the listeners from the list.
+ */
+ public void removeAll() {
+ fListeners= new Object[0];
+ fSize= 0;
+ }
+
+ /**
+ * Returns the number of registered listeners
+ *
+ * @return the number of registered listeners
+ */
+ public int size() {
+ return fSize;
+ }
+}
+
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -7,6 +7,7 @@
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyApplicationLaunchConfigurationDelegate implements ILaunchConfigurationDelegate {
protected static final InterpreterRunner interpreterRunner = new InterpreterRunner();
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyContainerInitializer.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -8,6 +8,7 @@
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.launching.IInterpreter;
import org.rubypeople.rdt.launching.IInterpreterInstallType;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyContainerInitializer extends LoadpathContainerInitializer {
Deleted: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -1,659 +0,0 @@
-package org.rubypeople.rdt.internal.launching;
-
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.rubypeople.rdt.launching.IInterpreter;
-import org.rubypeople.rdt.launching.IInterpreterInstallChangedListener;
-import org.rubypeople.rdt.launching.IInterpreterInstallType;
-import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
-import org.rubypeople.rdt.launching.PropertyChangeEvent;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-public class RubyRuntime {
- private static final String TAG_INTERPRETER = "interpreter";
- private static final String ATTR_PATH = "path";
- private static final String ATTR_NAME = "name";
- private static final String ATTR_SELECTED = "selected";
-
- /**
- * Loadpath container used for a project's Ruby
- * (value <code>"org.rubypeople.rdt.launching.RUBY_CONTAINER"</code>). A
- * container is resolved in the context of a specific Ruby project, to one
- * or more system libraries contained in the Ruby std library. The container can have zero
- * or two path segments following the container name. When no segments
- * follow the container name, the workspace default Ruby is used to build a
- * project. Otherwise the segments identify a specific Ruby used to build a
- * project:
- * <ol>
- * <li>VM Install Type Identifier - identifies the type of Ruby VM used to build the
- * project. For example, the standard VM.</li>
- * <li>VM Install Name - a user defined name that identifies that a specific VM
- * of the above kind. For example, <code>JRuby 1.8.4</code>. This information is
- * shared in a projects loadpath file, so teams must agree on Ruby VM naming
- * conventions.</li>
- * </ol>
- * @since 0.9.0
- */
- public static final String RUBY_CONTAINER = RdtLaunchingPlugin.getUniqueIdentifier() + "RUBY_CONTAINER"; //$NON-NLS-1$
-
- /**
- * Preference key for the String of XML that defines all installed VMs.
- *
- * @since 0.9.0
- */
- public static final String PREF_VM_XML = RdtLaunchingPlugin.getUniqueIdentifier() + ".PREF_VM_XML"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"vmInstalls"</code>) for the
- * VM installs extension point.
- *
- * @since 0.9.0
- */
- public static final String EXTENSION_POINT_VM_INSTALLS = "vmInstalls"; //$NON-NLS-1$
-
- private static IInterpreterInstallType[] fgInterpreterTypes= null;
-
- protected static RubyRuntime runtime;
- private static Object fgVMLock = new Object();
- private static boolean fgInitializingVMs;
- private static String fgDefaultVMId;
- private static String fgDefaultVMConnectorId;
-
- /**
- * Set of IDs of VMs contributed via vmInstalls extension point.
- */
- private static Set<String> fgContributedVMs = new HashSet<String>();
-
- protected List<IInterpreter> installedInterpreters;
- protected IInterpreter selectedInterpreter;
- private List<Listener> listeners = new ArrayList<Listener>();
-
- public static interface Listener {
- void selectedInterpreterChanged();
- }
-
- protected RubyRuntime() {
- super();
- }
-
- public static RubyRuntime getDefault() {
- if (runtime == null) {
- runtime = new RubyRuntime();
- }
- return runtime;
- }
-
- public void addListener(Listener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(Listener listener) {
- listeners.remove(listener);
- }
-
- public IInterpreter getSelectedInterpreter() {
- if (selectedInterpreter == null) {
- loadRuntimeConfiguration();
- }
- return selectedInterpreter;
- }
-
- public IInterpreter getInterpreter(String name) {
- Iterator interpreters = getInstalledInterpreters().iterator();
- while(interpreters.hasNext()) {
- IInterpreter each = (IInterpreter) interpreters.next();
- if (each.getName().equals(name))
- return each;
- }
-
- return getSelectedInterpreter();
- }
-
- public void setSelectedInterpreter(IInterpreter anInterpreter) {
- if (selectedInterpreter == anInterpreter) return;
- selectedInterpreter = anInterpreter;
- saveRuntimeConfiguration();
- for (Iterator<Listener> iter = listeners.iterator(); iter.hasNext();) {
- Listener listener = iter.next();
- listener.selectedInterpreterChanged();
- }
- }
-
- public void addInstalledInterpreter(IInterpreter anInterpreter) {
- getInstalledInterpreters().add(anInterpreter);
- if (getInstalledInterpreters().size() == 1)
- setSelectedInterpreter(getInstalledInterpreters().get(0));
- else
- saveRuntimeConfiguration();
- }
-
- public List<IInterpreter> getInstalledInterpreters() {
- if (installedInterpreters == null)
- loadRuntimeConfiguration();
- return installedInterpreters;
- }
-
- public void setInstalledInterpreters(List<IInterpreter> newInstalledInterpreters) {
- installedInterpreters = newInstalledInterpreters;
- if (installedInterpreters.size() > 0)
- setSelectedInterpreter(installedInterpreters.get(0));
- else
- setSelectedInterpreter(null);
- saveRuntimeConfiguration();
- }
-
- protected void saveRuntimeConfiguration() {
- writeXML(getRuntimeConfigurationWriter());
- }
-
- protected Writer getRuntimeConfigurationWriter() {
- try {
- OutputStream stream = new BufferedOutputStream(new FileOutputStream(getRuntimeConfigurationFile()));
- return new OutputStreamWriter(stream);
- } catch (FileNotFoundException e) {}
-
- return null;
- }
-
- protected void loadRuntimeConfiguration() {
- installedInterpreters = new ArrayList<IInterpreter>();
- try {
- XMLReader reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
- reader.setContentHandler(getRuntimeConfigurationContentHandler());
- Reader fileReader = this.getRuntimeConfigurationReader() ;
- if (fileReader == null) {
- // FIXME If we get a better algorithm for auto detection we should use it, but apparently this didn't make people happy
-// autoDetectRubyInterpreter();
- return ;
- }
- reader.parse(new InputSource(fileReader)) ;
- } catch(Exception e) {
- RdtLaunchingPlugin.log(e);
- }
- }
-
- private void autoDetectRubyInterpreter() {
- File path = null;
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- path = new File("/ruby/bin/ruby.exe");
- } else {
- //FIXME Why not use `which ruby` or something?
- path = new File("/usr/local/bin/ruby");
- }
- IInterpreter interpreter = new RubyInterpreter("Default Ruby Interpreter", path);
- installedInterpreters.add(interpreter);
- selectedInterpreter = interpreter;
- }
-
- protected Reader getRuntimeConfigurationReader() {
- try {
- return new FileReader(getRuntimeConfigurationFile());
- } catch(FileNotFoundException e) {
- return null ;
- }
- }
-
- protected void writeXML(Writer writer) {
- try {
- writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig>");
- Iterator<IInterpreter> interpretersIterator = installedInterpreters.iterator();
- while (interpretersIterator.hasNext()) {
- writer.write("<");
- writer.write(TAG_INTERPRETER);
- writer.write(" ");
- writer.write(ATTR_NAME);
- writer.write("=\"");
-
- IInterpreter entry = interpretersIterator.next();
- writer.write(entry.getName());
- writer.write("\" ");
- writer.write(ATTR_PATH);
- writer.write("=\"");
- writer.write(entry.getInstallLocation().getPath());
- writer.write("\"");
- if (entry.equals(selectedInterpreter)) {
- writer.write(" ");
- writer.write(ATTR_SELECTED);
- writer.write("=\"true\"");
- }
-
- writer.write("/>");
- }
- writer.write("</runtimeconfig>");
- writer.flush();
- } catch(IOException e) {
- RdtLaunchingPlugin.log(e);
- }
- }
-
- protected ContentHandler getRuntimeConfigurationContentHandler() {
- return new ContentHandler() {
- public void setDocumentLocator(Locator locator) {}
- public void startDocument() throws SAXException {}
- public void endDocument() throws SAXException {}
- public void startPrefixMapping(String prefix, String uri) throws SAXException {}
- public void endPrefixMapping(String prefix) throws SAXException {}
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
- if (TAG_INTERPRETER.equals(qName)) {
- String interpreterName = atts.getValue(ATTR_NAME);
- File installLocation = new File(atts.getValue(ATTR_PATH));
- IInterpreter interpreter = new RubyInterpreter(interpreterName, installLocation);
- installedInterpreters.add(interpreter);
- if (atts.getValue(ATTR_SELECTED) != null)
- selectedInterpreter = interpreter;
- }
- }
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {}
- public void characters(char[] ch, int start, int length) throws SAXException {}
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {}
- public void processingInstruction(String target, String data) throws SAXException {}
- public void skippedEntity(String name) throws SAXException {}
- };
- }
-
- protected File getRuntimeConfigurationFile() {
- IPath stateLocation = RdtLaunchingPlugin.getDefault().getStateLocation();
- IPath fileLocation = stateLocation.append("runtimeConfiguration.xml");
- return new File(fileLocation.toOSString());
- }
-
- public static void addInterpreterInstallChangedListener(IInterpreterInstallChangedListener listener) {
- // TODO Implement and add to listeners, and replace the addListener(Listener) stuff
-
- }
- /**
- * 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 IInterpreterInstallType getInterpreterInstallType(String id) {
- IInterpreterInstallType[] vmTypes= getInterpreterInstallTypes();
- for (int i= 0; i < vmTypes.length; i++) {
- if (vmTypes[i].getId().equals(id)) {
- return vmTypes[i];
- }
- }
- return null;
- }
-
- /**
- * Returns the list of registered VM types. VM types are registered via
- * <code>"org.rubypeople.rdt.launching.vmTypes"</code> extension point.
- * Returns an empty list if there are no registered VM types.
- *
- * @return the list of registered VM types
- */
- public static IInterpreterInstallType[] getInterpreterInstallTypes() {
- initializeInterpreters();
- return fgInterpreterTypes;
- }
-
- public static IInterpreter getDefaultInterpreterInstall() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * Perform VM type and VM install initialization. Does not hold locks
- * while performing change notification.
- *
- * @since 3.2
- */
- private static void initializeInterpreters() {
- VMDefinitionsContainer vmDefs = null;
- boolean setPref = false;
- synchronized (fgVMLock) {
- if (fgInterpreterTypes == null) {
- try {
- fgInitializingVMs = true;
- // 1. load VM type extensions
- initializeVMTypeExtensions();
- try {
- vmDefs = new VMDefinitionsContainer();
- // 2. add persisted VMs
- setPref = addPersistedVMs(vmDefs);
-
- // 3. load contributed VM installs
- addVMExtensions(vmDefs);
- // 4. verify default VM is valid
- String defId = vmDefs.getDefaultVMInstallCompositeID();
- boolean validDef = false;
- if (defId != null) {
- Iterator iterator = vmDefs.getValidVMList().iterator();
- while (iterator.hasNext()) {
- IInterpreter vm = (IInterpreter) iterator.next();
- if (getCompositeIdFromVM(vm).equals(defId)) {
- validDef = true;
- break;
- }
- }
- }
- if (!validDef) {
- // use the first as the default
- setPref = true;
- List list = vmDefs.getValidVMList();
- if (!list.isEmpty()) {
- IInterpreter vm = (IInterpreter) list.get(0);
- vmDefs.setDefaultVMInstallCompositeID(getCompositeIdFromVM(vm));
- }
- }
- fgDefaultVMId = vmDefs.getDefaultVMInstallCompositeID();
- fgDefaultVMConnectorId = vmDefs.getDefaultVMInstallConnectorTypeID();
-
- // Create the underlying VMs for each valid VM
- List vmList = vmDefs.getValidVMList();
- Iterator vmListIterator = vmList.iterator();
- while (vmListIterator.hasNext()) {
- VMStandin vmStandin = (VMStandin) vmListIterator.next();
- vmStandin.convertToRealVM();
- }
-
-
- } catch (IOException e) {
- RdtLaunchingPlugin.log(e);
- }
- } finally {
- fgInitializingVMs = false;
- }
- }
- }
- if (vmDefs != null) {
- // notify of initial VMs for backwards compatibility
- IInterpreterInstallType[] installTypes = getInterpreterInstallTypes();
- for (int i = 0; i < installTypes.length; i++) {
- IInterpreterInstallType type = installTypes[i];
- IInterpreter[] installs = type.getInterpreterInstalls();
- for (int j = 0; j < installs.length; j++) {
- fireInterpreterAdded(installs[j]);
- }
- }
-
- // save settings if required
- if (setPref) {
- try {
- String xml = vmDefs.getAsXML();
- RdtLaunchingPlugin.getDefault().getPluginPreferences().setValue(PREF_VM_XML, xml);
- } catch (ParserConfigurationException e) {
- RdtLaunchingPlugin.log(e);
- } catch (IOException e) {
- RdtLaunchingPlugin.log(e);
- } catch (TransformerException e) {
- RdtLaunchingPlugin.log(e);
- }
-
- }
- }
- }
-
- /**
- * Initializes vm type extensions.
- */
- private static void initializeVMTypeExtensions() {
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(RdtLaunchingPlugin.PLUGIN_ID, "vmInstallTypes"); //$NON-NLS-1$
- IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
- MultiStatus status= new MultiStatus(RdtLaunchingPlugin.getUniqueIdentifier(), IStatus.OK, RdtLaunchingMessages.RubyRuntime_exceptionOccurred, null);
- fgInterpreterTypes= new IInterpreterInstallType[configs.length];
-
- for (int i= 0; i < configs.length; i++) {
- try {
- IInterpreterInstallType vmType= (IInterpreterInstallType)configs[i].createExecutableExtension("class"); //$NON-NLS-1$
- fgInterpreterTypes[i]= vmType;
- } catch (CoreException e) {
- status.add(e.getStatus());
- }
- }
- if (!status.isOK()) {
- //only happens on a CoreException
- RdtLaunchingPlugin.log(status);
- //cleanup null entries in fgVMTypes
- List<IInterpreterInstallType> temp= new ArrayList<IInterpreterInstallType>(fgInterpreterTypes.length);
- for (int i = 0; i < fgInterpreterTypes.length; i++) {
- if(fgInterpreterTypes[i] != null) {
- temp.add(fgInterpreterTypes[i]);
- }
- fgInterpreterTypes= new IInterpreterInstallType[temp.size()];
- fgInterpreterTypes= temp.toArray(fgInterpreterTypes);
- }
- }
- }
-
- /**
- * This method loads installed JREs based an existing user preference
- * or old vm configurations file. The VMs found in the preference
- * or vm configurations file are added to the given VM definitions container.
- *
- * Returns whether the user preferences should be set - i.e. if it was
- * not already set when initialized.
- */
- private static boolean addPersistedVMs(VMDefinitionsContainer vmDefs) throws IOException {
- // Try retrieving the VM preferences from the preference store
- String vmXMLString = getPreferences().getString(PREF_VM_XML);
-
- // If the preference was found, load VMs from it into memory
- if (vmXMLString.length() > 0) {
- try {
- ByteArrayInputStream inputStream = new ByteArrayInputStream(vmXMLString.getBytes());
- VMDefinitionsContainer.parseXMLIntoContainer(inputStream, vmDefs);
- return false;
- } catch (IOException ioe) {
- RdtLaunchingPlugin.log(ioe);
- }
- } else {
- // Otherwise, look for the old file that previously held the VM definitions
- IPath stateLocation= RdtLaunchingPlugin.getDefault().getStateLocation();
- IPath stateFile= stateLocation.append("vmConfiguration.xml"); //$NON-NLS-1$
- File file = new File(stateFile.toOSString());
-
- if (file.exists()) {
- // If file exists, load VM definitions from it into memory and write the definitions to
- // the preference store WITHOUT triggering any processing of the new value
- FileInputStream fileInputStream = new FileInputStream(file);
- VMDefinitionsContainer.parseXMLIntoContainer(fileInputStream, vmDefs);
- }
- }
- return true;
- }
-
- /**
- * Returns the preference store for the launching plug-in.
- *
- * @return the preference store for the launching plug-in
- * @since 0.9.0
- */
- public static Preferences getPreferences() {
- return RdtLaunchingPlugin.getDefault().getPluginPreferences();
- }
-
- /**
- * Returns a String that uniquely identifies the specified VM across all VM types.
- *
- * @param vm the instance of IVMInstallType to be identified
- *
- * @since 2.1
- */
- public static String getCompositeIdFromVM(IInterpreter vm) {
- if (vm == null) {
- return null;
- }
- IInterpreterInstallType vmType= vm.getInterpreterInstallType();
- String typeID= vmType.getId();
- CompositeId id= new CompositeId(new String[] { typeID, vm.getId() });
- return id.toString();
- }
-
- /**
- * Loads contributed VM installs
- * @since 3.2
- */
- private static void addVMExtensions(VMDefinitionsContainer vmDefs) {
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(RdtLaunchingPlugin.PLUGIN_ID, RubyRuntime.EXTENSION_POINT_VM_INSTALLS);
- IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
- for (int i = 0; i < configs.length; i++) {
- IConfigurationElement element = configs[i];
- try {
- if ("vmInstall".equals(element.getName())) { //$NON-NLS-1$
- String vmType = element.getAttribute("vmInstallType"); //$NON-NLS-1$
- if (vmType == null) {
- abort(MessageFormat.format("Missing required vmInstallType attribute for vmInstall contributed by {0}", //$NON-NLS-1$
- (Object[]) new String[]{element.getContributor().getName()}), null);
- }
- String id = element.getAttribute("id"); //$NON-NLS-1$
- if (id == null) {
- abort(MessageFormat.format("Missing required id attribute for vmInstall contributed by {0}", //$NON-NLS-1$
- (Object[]) new String[]{element.getContributor().getName()}), null);
- }
- IInterpreterInstallType installType = getInterpreterInstallType(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);
- }
- IInterpreter install = installType.findInterpreterInstall(id);
- if (install == null) {
- // only load/create if first time we've seen this VM install
- String name = element.getAttribute("name"); //$NON-NLS-1$
- if (name == null) {
- abort(MessageFormat.format("vmInstall {0} contributed by {1} missing required attribute name", //$NON-NLS-1$
- (Object[]) new String[]{id, element.getContributor().getName()}), null);
- }
- String home = element.getAttribute("home"); //$NON-NLS-1$
- if (home == null) {
- abort(MessageFormat.format("vmInstall {0} contributed by {1} missing required attribute home", //$NON-NLS-1$
- (Object[]) new String[]{id, element.getContributor().getName()}), null);
- }
- String vmArgs = element.getAttribute("vmArgs"); //$NON-NLS-1$
- VMStandin standin = new VMStandin(installType, id);
- standin.setName(name);
- home = substitute(home);
- File homeDir = new File(home);
- if (homeDir.exists()) {
- try {
- // adjust for relative path names
- home = homeDir.getCanonicalPath();
- homeDir = new File(home);
- } catch (IOException e) {
- }
- }
- IStatus status = installType.validateInstallLocation(homeDir);
- if (!status.isOK()) {
- abort(MessageFormat.format("Illegal install location {0} for vmInstall {1} contributed by {2}: {3}", //$NON-NLS-1$
- (Object[]) new String[]{home, id, element.getContributor().getName(), status.getMessage()}), null);
- }
- standin.setInstallLocation(homeDir);
- if (vmArgs != null) {
- standin.setVMArgs(vmArgs);
- }
- IConfigurationElement[] libraries = element.getChildren("library"); //$NON-NLS-1$
- IPath[] locations = null;
- if (libraries.length > 0) {
- locations = new IPath[libraries.length];
- for (int j = 0; j < libraries.length; j++) {
- IConfigurationElement library = libraries[j];
- String libPathStr = library.getAttribute("path"); //$NON-NLS-1$
- if (libPathStr == null) {
- abort(MessageFormat.format("library for vmInstall {0} contributed by {1} missing required attribute libPath", //$NON-NLS-1$
- (Object[]) new String[]{id, element.getContributor().getName()}), null);
- }
-
- IPath homePath = new Path(home);
- IPath libPath = homePath.append(substitute(libPathStr));
- locations[j] = libPath;
- }
- }
- standin.setLibraryLocations(locations);
- vmDefs.addVM(standin);
- }
- fgContributedVMs.add(id);
- } else {
- abort(MessageFormat.format("Illegal element {0} in vmInstalls extension contributed by {1}", //$NON-NLS-1$
- (Object[]) new String[]{element.getName(), element.getContributor().getName()}), null);
- }
- } catch (CoreException e) {
- RdtLaunchingPlugin.log(e);
- }
- }
- }
-
- /**
- * Performs string substitution on the given expression.
- *
- * @param expression
- * @return expression after string substitution
- * @throws CoreException
- * @since 0.9.0
- */
- private static String substitute(String expression) throws CoreException {
- return VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(expression);
- }
-
- /**
- * Throws a core exception with an internal error status.
- *
- * @param message the status message
- * @param exception lower level exception associated with the
- * error, or <code>null</code> if none
- */
- private static void abort(String message, Throwable exception) throws CoreException {
- abort(message, IRubyLaunchConfigurationConstants.ERR_INTERNAL_ERROR, exception);
- }
-
- /**
- * Throws a core exception with an internal error status.
- *
- * @param message the status message
- * @param code status code
- * @param exception lower level exception associated with the
- *
- * error, or <code>null</code> if none
- */
- private static void abort(String message, int code, Throwable exception) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, RdtLaunchingPlugin.getUniqueIdentifier(), code, message, exception));
- }
-
- private static void fireInterpreterAdded(IInterpreter interpreter) {
- // TODO Actually notify IInterpreterInstallChangedListeners
-
- }
-
- public static void fireInterpreterChanged(PropertyChangeEvent event) {
- // TODO Actually notify IInterpreterInstallChangedListeners
-
- }
-}
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyVMContainer.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -12,6 +12,7 @@
import org.rubypeople.rdt.launching.IInterpreter;
import org.rubypeople.rdt.launching.IInterpreterInstallChangedListener;
import org.rubypeople.rdt.launching.PropertyChangeEvent;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyVMContainer implements ILoadpathContainer {
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/VMDefinitionsContainer.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -32,6 +32,7 @@
import org.rubypeople.rdt.launching.IInterpreter;
import org.rubypeople.rdt.launching.IInterpreter2;
import org.rubypeople.rdt.launching.IInterpreterInstallType;
+import org.rubypeople.rdt.launching.RubyRuntime;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractInterpreter.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -19,7 +19,6 @@
import org.eclipse.core.runtime.Status;
import org.rubypeople.rdt.internal.launching.RdtLaunchingMessages;
import org.rubypeople.rdt.internal.launching.RdtLaunchingPlugin;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
/**
* Abstract implementation of a Interpreter install.
* <p>
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -31,6 +31,7 @@
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class TC_RubyRuntime extends TestCase {
protected StringWriter runtimeConfigurationWriter = new StringWriter();
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -23,6 +23,7 @@
import org.eclipse.debug.core.Launch;
import org.rubypeople.eclipse.shams.debug.core.ShamLaunchConfigurationType;
import org.rubypeople.eclipse.testutils.ResourceTools;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class TC_RunnerLaunching extends TestCase {
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -32,10 +32,10 @@
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.debug.ui.launcher.RubyApplicationShortcut;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.testunit.ui.TestUnitMessages;
import org.rubypeople.rdt.internal.testunit.ui.TestunitPlugin;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class TestUnitLaunchShortcut extends RubyApplicationShortcut {
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 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -40,12 +40,12 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.ViewPart;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
import org.rubypeople.rdt.internal.ui.rdocexport.RDocUtility;
import org.rubypeople.rdt.internal.ui.rdocexport.RdocListener;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.ui.PreferenceConstants;
public class RIView extends ViewPart implements RdocListener {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -17,11 +17,11 @@
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.rubypeople.rdt.internal.launching.RdtLaunchingMessages;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.RubyUIMessages;
import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.ui.PreferenceConstants;
/**
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -13,9 +13,9 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.ui.IEditorInput;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.ui.PreferenceConstants;
import org.rubypeople.rdt.ui.extensions.ITextHoverProvider;
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java 2007-01-18 14:14:47 UTC (rev 1787)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java 2007-01-18 14:26:08 UTC (rev 1788)
@@ -5,10 +5,10 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.RGB;
-import org.rubypeople.rdt.internal.launching.RubyRuntime;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.preferences.formatter.ProfileManager;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.RubyRuntime;
public class PreferenceConstants {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|