|
From: <caw...@us...> - 2007-01-18 15:41:36
|
Revision: 1791
http://svn.sourceforge.net/rubyeclipse/?rev=1791&view=rev
Author: cawilliams
Date: 2007-01-18 07:41:21 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
More tweaking around interpreters
Modified Paths:
--------------
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/EditInterpreterDialog.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/launching/IInterpreterInstallType.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties
Added Paths:
-----------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/IAddVMDialogRequestor.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.properties
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:36:55 UTC (rev 1790)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -10,6 +10,7 @@
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -23,6 +24,7 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.rubypeople.rdt.core.ILoadpathEntry;
@@ -32,7 +34,8 @@
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
import org.rubypeople.rdt.internal.debug.ui.preferences.EditInterpreterDialog;
-import org.rubypeople.rdt.internal.launching.RubyInterpreter;
+import org.rubypeople.rdt.internal.debug.ui.rubyvms.IAddVMDialogRequestor;
+import org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
import org.rubypeople.rdt.launching.IInterpreter;
@@ -40,8 +43,11 @@
public class RubyEnvironmentTab extends AbstractLaunchConfigurationTab {
protected ListViewer loadPathListViewer;
+
protected java.util.List installedInterpretersWorkingCopy;
+
protected Combo interpreterCombo;
+
protected Button loadPathDefaultButton;
public RubyEnvironmentTab() {
@@ -63,28 +69,39 @@
Composite loadPathComposite = new Composite(tabFolder, SWT.NONE);
loadPathComposite.setLayout(new GridLayout());
- loadPathListViewer = new ListViewer(loadPathComposite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
+ loadPathListViewer = new ListViewer(loadPathComposite, SWT.BORDER
+ | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
loadPathListViewer.setContentProvider(new ArrayContentProvider());
loadPathListViewer.setLabelProvider(new LoadPathEntryLabelProvider());
- loadPathListViewer.getList().setLayoutData(new GridData(GridData.FILL_BOTH));
+ loadPathListViewer.getList().setLayoutData(
+ new GridData(GridData.FILL_BOTH));
TabItem loadPathTab = new TabItem(tabFolder, SWT.NONE, 0);
- loadPathTab.setText(RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.loadPathTab.label"));
+ loadPathTab
+ .setText(RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.loadPathTab.label"));
loadPathTab.setControl(loadPathComposite);
loadPathTab.setData(loadPathListViewer);
loadPathDefaultButton = new Button(loadPathComposite, SWT.CHECK);
- loadPathDefaultButton.setText(RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.loadPathDefaultButton.label"));
- loadPathDefaultButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- loadPathDefaultButton.addSelectionListener(getLoadPathDefaultButtonSelectionListener());
-
- loadPathDefaultButton.setEnabled(false); //for now, until the load path is customizable on the configuration
+ loadPathDefaultButton
+ .setText(RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.loadPathDefaultButton.label"));
+ loadPathDefaultButton.setLayoutData(new GridData(
+ GridData.HORIZONTAL_ALIGN_BEGINNING));
+ loadPathDefaultButton
+ .addSelectionListener(getLoadPathDefaultButtonSelectionListener());
+
+ loadPathDefaultButton.setEnabled(false); // for now, until the load
+ // path is customizable on
+ // the configuration
}
protected SelectionListener getLoadPathSelectionListener() {
return new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- System.out.println("Loadpath list selection occurred: " + e.getSource());
+ System.out.println("Loadpath list selection occurred: "
+ + e.getSource());
}
};
}
@@ -104,7 +121,8 @@
layout.marginHeight = 0;
layout.marginWidth = 0;
interpreterComposite.setLayout(layout);
- interpreterComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ interpreterComposite.setLayoutData(new GridData(
+ GridData.FILL_HORIZONTAL));
createVerticalSpacer(interpreterComposite, 2);
@@ -114,26 +132,52 @@
interpreterCombo.addModifyListener(getInterpreterComboModifyListener());
Button interpreterAddButton = new Button(interpreterComposite, SWT.PUSH);
- interpreterAddButton.setText(RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.interpreterAddButton.label"));
- interpreterAddButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- IInterpreter newInterpreter = new RubyInterpreter(null, null);
- EditInterpreterDialog editor = new EditInterpreterDialog(getShell(), RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.editInterpreterDialog.title"));
- editor.create();
- editor.setInterpreterToEdit(newInterpreter);
- if (EditInterpreterDialog.OK == editor.open()) {
- RubyRuntime.getDefault().addInstalledInterpreter(newInterpreter);
- interpreterCombo.add(newInterpreter.getName());
- interpreterCombo.select(interpreterCombo.indexOf(newInterpreter.getName()));
- }
- }
- });
+ interpreterAddButton
+ .setText(RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.interpreterAddButton.label"));
+ interpreterAddButton.addSelectionListener(new AddInterpreterSelectionAdapter(interpreterCombo, getShell()));
TabItem interpreterTab = new TabItem(tabFolder, SWT.NONE);
- interpreterTab.setText(RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.interpreterTab.label"));
+ interpreterTab
+ .setText(RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.interpreterTab.label"));
interpreterTab.setControl(interpreterComposite);
}
+ private static class AddInterpreterSelectionAdapter extends
+ SelectionAdapter implements IAddVMDialogRequestor {
+
+ private Combo fCombo;
+ private Shell fShell;
+
+ public AddInterpreterSelectionAdapter(Combo combo, Shell shell) {
+ fCombo = combo;
+ fShell = shell;
+ }
+
+ public void widgetSelected(SelectionEvent evt) {
+ EditInterpreterDialog dialog = new EditInterpreterDialog(this,
+ fShell, RubyRuntime.getInterpreterInstallTypes(),
+ null);
+ dialog.setTitle(RubyVMMessages.InstalledJREsBlock_7);
+ if (dialog.open() != Window.OK) {
+ return;
+ }
+ }
+
+ public boolean isDuplicateName(String name) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void vmAdded(IInterpreter vm) {
+ RubyRuntime.getDefault().addInstalledInterpreter(vm);
+ fCombo.add(vm.getName());
+ fCombo.select(fCombo.indexOf(vm.getName()));
+ }
+
+ }
+
protected ModifyListener getInterpreterComboModifyListener() {
return new ModifyListener() {
public void modifyText(ModifyEvent evt) {
@@ -150,9 +194,12 @@
}
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- IInterpreter defaultInterpreter = RubyRuntime.getDefault().getSelectedInterpreter();
- if (defaultInterpreter != null) {
- configuration.setAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, defaultInterpreter.getName());
+ IInterpreter defaultInterpreter = RubyRuntime.getDefault()
+ .getSelectedInterpreter();
+ if (defaultInterpreter != null) {
+ configuration.setAttribute(
+ RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER,
+ defaultInterpreter.getName());
}
}
@@ -164,14 +211,20 @@
protected void initializeLoadPath(ILaunchConfiguration configuration) {
boolean useDefaultLoadPath = true;
try {
- useDefaultLoadPath = configuration.getAttribute(RubyLaunchConfigurationAttribute.USE_DEFAULT_LOAD_PATH, true);
+ useDefaultLoadPath = configuration.getAttribute(
+ RubyLaunchConfigurationAttribute.USE_DEFAULT_LOAD_PATH,
+ true);
setUseLoadPathDefaults(useDefaultLoadPath);
if (useDefaultLoadPath) {
- String projectName = configuration.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
+ String projectName = configuration.getAttribute(
+ RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
if (projectName.length() != 0) {
- IRubyProject project = RubyModelManager.getRubyModelManager().getRubyModel().getRubyProject(projectName);
+ IRubyProject project = RubyModelManager
+ .getRubyModelManager().getRubyModel()
+ .getRubyProject(projectName);
if (project != null) {
- ILoadpathEntry[] entries = project.getResolvedLoadpath(true);
+ ILoadpathEntry[] entries = project
+ .getResolvedLoadpath(true);
loadPathListViewer.setInput(entries);
}
}
@@ -186,10 +239,12 @@
loadPathDefaultButton.setSelection(useDefaults);
}
- protected void initializeInterpreterSelection(ILaunchConfiguration configuration) {
+ protected void initializeInterpreterSelection(
+ ILaunchConfiguration configuration) {
String interpreterName = null;
try {
- interpreterName = configuration.getAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, "");
+ interpreterName = configuration.getAttribute(
+ RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, "");
} catch (CoreException e) {
log(e);
}
@@ -199,35 +254,48 @@
protected void initializeInterpreterCombo(Combo interpreterCombo) {
installedInterpretersWorkingCopy = new ArrayList();
- installedInterpretersWorkingCopy.addAll(RubyRuntime.getDefault().getInstalledInterpreters());
+ installedInterpretersWorkingCopy.addAll(RubyRuntime.getDefault()
+ .getInstalledInterpreters());
- String[] interpreterNames = new String[installedInterpretersWorkingCopy.size()];
- for (int interpreterIndex = 0; interpreterIndex < installedInterpretersWorkingCopy.size(); interpreterIndex++) {
- IInterpreter interpreter = (IInterpreter) installedInterpretersWorkingCopy.get(interpreterIndex);
+ String[] interpreterNames = new String[installedInterpretersWorkingCopy
+ .size()];
+ for (int interpreterIndex = 0; interpreterIndex < installedInterpretersWorkingCopy
+ .size(); interpreterIndex++) {
+ IInterpreter interpreter = (IInterpreter) installedInterpretersWorkingCopy
+ .get(interpreterIndex);
interpreterNames[interpreterIndex] = interpreter.getName();
}
interpreterCombo.setItems(interpreterNames);
- IInterpreter selectedInterpreter = RubyRuntime.getDefault().getSelectedInterpreter();
+ IInterpreter selectedInterpreter = RubyRuntime.getDefault()
+ .getSelectedInterpreter();
if (selectedInterpreter != null)
- interpreterCombo.select(interpreterCombo.indexOf(selectedInterpreter.getName()));
+ interpreterCombo.select(interpreterCombo
+ .indexOf(selectedInterpreter.getName()));
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
int selectionIndex = interpreterCombo.getSelectionIndex();
if (selectionIndex >= 0)
- configuration.setAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, interpreterCombo.getItem(selectionIndex));
+ configuration.setAttribute(
+ RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER,
+ interpreterCombo.getItem(selectionIndex));
- configuration.setAttribute(RubyLaunchConfigurationAttribute.USE_DEFAULT_LOAD_PATH, loadPathDefaultButton.getSelection());
+ configuration.setAttribute(
+ RubyLaunchConfigurationAttribute.USE_DEFAULT_LOAD_PATH,
+ loadPathDefaultButton.getSelection());
if (!loadPathDefaultButton.getSelection()) {
List loadPathEntries = (List) loadPathListViewer.getInput();
List loadPathStrings = new ArrayList();
- for (Iterator iterator = loadPathEntries.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = loadPathEntries.iterator(); iterator
+ .hasNext();) {
LoadpathEntry entry = (LoadpathEntry) iterator.next();
loadPathStrings.add(entry.getPath().toString());
}
- configuration.setAttribute(RubyLaunchConfigurationAttribute.CUSTOM_LOAD_PATH, loadPathStrings);
+ configuration.setAttribute(
+ RubyLaunchConfigurationAttribute.CUSTOM_LOAD_PATH,
+ loadPathStrings);
}
}
@@ -243,24 +311,27 @@
}
public String getName() {
- return RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.name");
+ return RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.name");
}
public boolean isValid(ILaunchConfiguration launchConfig) {
try {
- String selectedInterpreter = launchConfig.getAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, "");
+ String selectedInterpreter = launchConfig.getAttribute(
+ RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, "");
if (selectedInterpreter.length() == 0) {
- setErrorMessage(RdtDebugUiMessages.getString("LaunchConfigurationTab.RubyEnvironment.interpreter_not_selected_error_message"));
+ setErrorMessage(RdtDebugUiMessages
+ .getString("LaunchConfigurationTab.RubyEnvironment.interpreter_not_selected_error_message"));
return false;
}
} catch (CoreException e) {
log(e);
}
-
+
setErrorMessage(null);
return true;
}
-
+
protected void log(Throwable t) {
RdtDebugUiPlugin.log(t);
}
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/EditInterpreterDialog.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/EditInterpreterDialog.java 2007-01-18 14:36:55 UTC (rev 1790)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/EditInterpreterDialog.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -1,19 +1,17 @@
package org.rubypeople.rdt.internal.debug.ui.preferences;
import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowData;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
@@ -22,140 +20,326 @@
import org.eclipse.swt.widgets.Text;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
-import org.rubypeople.rdt.internal.launching.RubyInterpreter;
+import org.rubypeople.rdt.internal.debug.ui.rubyvms.IAddVMDialogRequestor;
+import org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages;
+import org.rubypeople.rdt.internal.launching.VMStandin;
import org.rubypeople.rdt.internal.ui.dialogs.StatusDialog;
+import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.ComboDialogField;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.DialogField;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
+import org.rubypeople.rdt.internal.ui.wizards.dialogfields.StringDialogField;
import org.rubypeople.rdt.launching.IInterpreter;
+import org.rubypeople.rdt.launching.IInterpreter2;
+import org.rubypeople.rdt.launching.IInterpreterInstallType;
public class EditInterpreterDialog extends StatusDialog {
- protected IInterpreter interpreterToEdit;
- protected Text interpreterNameText, interpreterLocationText;
+
protected IStatus[] allStatus = new IStatus[2];
+
+ protected IInterpreter fEditedVM;
+ private StringButtonDialogField fJRERoot;
+ private StringDialogField fVMName;
+
+ private StringDialogField fVMArgs;
+
+ private IInterpreterInstallType fSelectedVMType;
+ private IInterpreterInstallType[] fVMTypes;
+ private ComboDialogField fVMTypeCombo;
+
+ private IStatus[] fStati;
+
+ private int fPrevIndex = -1;
- public EditInterpreterDialog(Shell parentShell, String aDialogTitle) {
- super(parentShell);
- setTitle(aDialogTitle);
+ private IAddVMDialogRequestor fRequestor;
+
+ public EditInterpreterDialog(IAddVMDialogRequestor requestor, Shell shell, IInterpreterInstallType[] vmInstallTypes, IInterpreter editedVM) {
+ super(shell);
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ fRequestor= requestor;
+ fStati= new IStatus[5];
+ for (int i= 0; i < fStati.length; i++) {
+ fStati[i]= new StatusInfo();
+ }
+
+ fVMTypes= vmInstallTypes;
+ fSelectedVMType= editedVM != null ? editedVM.getInterpreterInstallType() : vmInstallTypes[0];
+
+ fEditedVM= editedVM;
}
- public void setInterpreterToEdit(IInterpreter anInterpreter) {
- interpreterToEdit = anInterpreter;
-
- String interpreterName = interpreterToEdit.getName();
- interpreterNameText.setText(interpreterName != null ? interpreterName : ""); //$NON-NLS-1$
+ protected IStatus validateInterpreterLocationText() {
+ String locationName = fJRERoot.getText();
+ if (locationName.length() == 0) {
+ return new StatusInfo(IStatus.INFO, RubyVMMessages.addVMDialog_enterLocation);
+ }
+ File file = new File(locationName);
+ if (!file.exists()) {
+ return new StatusInfo(IStatus.ERROR, RubyVMMessages.addVMDialog_locationNotExists);
+ }
+ // FIXME We want the user to select a directory as the home of the ruby install!
+ if(file.isFile()){
+ return new Status(IStatus.OK, RdtDebugUiPlugin.PLUGIN_ID, 0, "", null);
+ }
+ return new Status(IStatus.ERROR, RdtDebugUiPlugin.PLUGIN_ID, 1, RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.error"), null);
+ }
- File installLocation = interpreterToEdit.getInstallLocation();
- interpreterLocationText.setText(installLocation != null ? installLocation.getAbsolutePath() : ""); //$NON-NLS-1$
+ protected void browseForInstallLocation() {
+ FileDialog dialog = new FileDialog(getShell());
+ dialog.setFilterPath(fJRERoot.getText());
+ dialog.setText(RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.browse.message")); //$NON-NLS-1$
+ String newPath = dialog.open();
+ if (newPath != null)
+ fJRERoot.setText(newPath);
}
- protected void createLocationEntryField(Composite composite) {
- new Label(composite, SWT.NONE).setText(RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.label")); //$NON-NLS-1$
-
- Composite locationComposite = new Composite(composite, SWT.NONE);
- RowLayout locationLayout = new RowLayout();
- locationLayout.marginLeft = 0;
- locationComposite.setLayout(locationLayout);
-
- interpreterLocationText = new Text(locationComposite, SWT.SINGLE | SWT.BORDER);
- interpreterLocationText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- allStatus[1] = validateInterpreterLocationText();
- updateStatusLine();
+ protected void okPressed() {
+ doOkPressed();
+ super.okPressed();
+ }
+
+ private void doOkPressed() {
+ if (fEditedVM == null) {
+ IInterpreter vm= new VMStandin(fSelectedVMType, createUniqueId(fSelectedVMType));
+ setFieldValuesToVM(vm);
+ fRequestor.vmAdded(vm);
+ } else {
+ setFieldValuesToVM(fEditedVM);
+ }
+ }
+
+ public void create() {
+ super.create();
+ fVMName.setFocus();
+ selectVMType();
+ }
+
+ private String createUniqueId(IInterpreterInstallType vmType) {
+ String id= null;
+ do {
+ id= String.valueOf(System.currentTimeMillis());
+ } while (vmType.findInterpreterInstall(id) != null);
+ return id;
+ }
+
+ private void selectVMType() {
+ for (int i= 0; i < fVMTypes.length; i++) {
+ if (fSelectedVMType == fVMTypes[i]) {
+ fVMTypeCombo.selectItem(i);
+ return;
}
- });
- interpreterLocationText.setLayoutData(new RowData(120, SWT.DEFAULT));
-
- Button browseButton = new Button(composite, SWT.PUSH);
- browseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- browseButton.setText(RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.browse.button.label")); //$NON-NLS-1$
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- browseForInstallLocation();
+ }
+ }
+
+ private void updateVMType() {
+ int selIndex= fVMTypeCombo.getSelectionIndex();
+ if (selIndex == fPrevIndex) {
+ return;
+ }
+ fPrevIndex = selIndex;
+ if (selIndex >= 0 && selIndex < fVMTypes.length) {
+ fSelectedVMType= fVMTypes[selIndex];
+ }
+ setJRELocationStatus(validateInterpreterLocationText());
+// fLibraryBlock.initializeFrom(fEditedVM, fSelectedVMType);
+ updateStatusLine();
+ }
+
+ private void setJRELocationStatus(IStatus status) {
+ fStati[1]= status;
+ }
+
+ protected void updateStatusLine() {
+ IStatus max= null;
+ for (int i= 0; i < fStati.length; i++) {
+ IStatus curr= fStati[i];
+ if (curr.matches(IStatus.ERROR)) {
+ updateStatus(curr);
+ return;
}
- });
+ if (max == null || curr.getSeverity() > max.getSeverity()) {
+ max= curr;
+ }
+ }
+ updateStatus(max);
}
+
+ protected Control createDialogArea(Composite ancestor) {
+ createDialogFields();
+ Composite parent = (Composite)super.createDialogArea(ancestor);
+ ((GridLayout)parent.getLayout()).numColumns= 3;
+
+ fVMTypeCombo.doFillIntoGrid(parent, 3);
+ ((GridData)fVMTypeCombo.getComboControl(null).getLayoutData()).widthHint= convertWidthInCharsToPixels(50);
- protected void updateStatusLine() {
- updateStatus(getMostSevereStatus());
+ fVMName.doFillIntoGrid(parent, 3);
+
+ fJRERoot.doFillIntoGrid(parent, 3);
+
+ fVMArgs.doFillIntoGrid(parent, 3);
+ ((GridData)fVMArgs.getTextControl(null).getLayoutData()).widthHint= convertWidthInCharsToPixels(50);
+
+ Label l = new Label(parent, SWT.NONE);
+ l.setText(RubyVMMessages.AddVMDialog_JRE_system_libraries__1);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ l.setLayoutData(gd);
+
+// fLibraryBlock = new VMLibraryBlock(this);
+// Control block = fLibraryBlock.createControl(parent);
+// gd = new GridData(GridData.FILL_BOTH);
+// gd.horizontalSpan = 3;
+// block.setLayoutData(gd);
+
+ Text t= fJRERoot.getTextControl(parent);
+ gd= (GridData)t.getLayoutData();
+ gd.grabExcessHorizontalSpace=true;
+ gd.widthHint= convertWidthInCharsToPixels(50);
+
+ initializeFields();
+ createFieldListeners();
+ applyDialogFont(parent);
+ return parent;
}
-
- protected IStatus getMostSevereStatus() {
- IStatus max = new Status(0, RdtDebugUiPlugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
- for (int i = 0; i < allStatus.length; i++) {
- IStatus curr = allStatus[i];
- if (curr != null) {
- if (curr.matches(IStatus.ERROR)) {
- return curr;
+
+ private void initializeFields() {
+ fVMTypeCombo.setItems(getVMTypeNames());
+ if (fEditedVM == null) {
+ fVMName.setText(""); //$NON-NLS-1$
+ fJRERoot.setText(""); //$NON-NLS-1$
+// fLibraryBlock.initializeFrom(null, fSelectedVMType);
+ fVMArgs.setText(""); //$NON-NLS-1$
+ } else {
+ fVMTypeCombo.setEnabled(false);
+ fVMName.setText(fEditedVM.getName());
+ fJRERoot.setText(fEditedVM.getInstallLocation().getAbsolutePath());
+// fLibraryBlock.initializeFrom(fEditedVM, fSelectedVMType);
+ if (fEditedVM instanceof IInterpreter2) {
+ IInterpreter2 vm2 = (IInterpreter2) fEditedVM;
+ String vmArgs = vm2.getVMArgs();
+ if (vmArgs != null) {
+ fVMArgs.setText(vmArgs);
}
- if (max == null || curr.getSeverity() > max.getSeverity()) {
- max = curr;
- }
+ } else {
+ String[] vmArgs = fEditedVM.getInterpreterArguments();
+ if (vmArgs != null) {
+ StringBuffer buffer = new StringBuffer();
+ int length= vmArgs.length;
+ if (length > 0) {
+ buffer.append(vmArgs[0]);
+ for (int i = 1; i < length; i++) {
+ buffer.append(' ').append(vmArgs[i]);
+ }
+ }
+ fVMArgs.setText(buffer.toString());
+ }
}
}
- return max;
+ setVMNameStatus(validateVMName());
+ updateStatusLine();
}
-
- protected IStatus validateInterpreterLocationText() {
- File path = new File(interpreterLocationText.getText());
- if(path.isFile()){
- return new Status(IStatus.OK, RdtDebugUiPlugin.PLUGIN_ID, 0, "", null);
- }
- return new Status(IStatus.ERROR, RdtDebugUiPlugin.PLUGIN_ID, 1, RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.error"), null);
+
+ private void setVMNameStatus(IStatus status) {
+ fStati[0]= status;
}
-
- protected void createNameEntryField(Composite composite) {
- new Label(composite, SWT.NONE).setText(RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.name")); //$NON-NLS-1$
-
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
-
- interpreterNameText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- interpreterNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- allStatus[0] = validateInterpreterNameText();
+
+ protected void createFieldListeners() {
+ fVMTypeCombo.setDialogFieldListener(new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ updateVMType();
+ }
+ });
+
+ fVMName.setDialogFieldListener(new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ setVMNameStatus(validateVMName());
updateStatusLine();
}
});
- interpreterNameText.setLayoutData(gridData);
+
+ fJRERoot.setDialogFieldListener(new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ setJRELocationStatus(validateInterpreterLocationText());
+ updateStatusLine();
+ }
+ });
}
-
- protected IStatus validateInterpreterNameText() {
- int status = IStatus.OK;
- String message = ""; //$NON-NLS-1$
-
- if (interpreterNameText.getText() == null || interpreterNameText.getText().length() <= 0) {
- status = IStatus.ERROR;
- message = RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.name.error"); //$NON-NLS-1$
+
+ private IStatus validateVMName() {
+ StatusInfo status= new StatusInfo();
+ String name= fVMName.getText();
+ if (name == null || name.trim().length() == 0) {
+ status.setInfo(RubyVMMessages.addVMDialog_enterName);
+ } else {
+ if (fRequestor.isDuplicateName(name) && (fEditedVM == null || !name.equals(fEditedVM.getName()))) {
+ status.setError(RubyVMMessages.addVMDialog_duplicateName);
+ } else {
+ IStatus s = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
+ if (!s.isOK()) {
+ status.setError(MessageFormat.format(RubyVMMessages.AddVMDialog_JRE_name_must_be_a_valid_file_name___0__1, new String[]{s.getMessage()}));
+ }
+ }
}
-
- return new Status(status, RdtDebugUiPlugin.PLUGIN_ID, 0, message, null);
+ return status;
}
-
- protected void browseForInstallLocation() {
- FileDialog dialog = new FileDialog(getShell());
- dialog.setFilterPath(interpreterLocationText.getText());
- dialog.setText(RdtDebugUiMessages.getString("EditInterpreterDialog.rubyInterpreter.path.browse.message")); //$NON-NLS-1$
- String newPath = dialog.open();
- if (newPath != null)
- interpreterLocationText.setText(newPath);
+
+ protected void createDialogFields() {
+ fVMTypeCombo= new ComboDialogField(SWT.READ_ONLY);
+ fVMTypeCombo.setLabelText(RubyVMMessages.addVMDialog_jreType);
+ fVMTypeCombo.setItems(getVMTypeNames());
+
+ fVMName= new StringDialogField();
+ fVMName.setLabelText(RubyVMMessages.addVMDialog_jreName);
+
+ fJRERoot= new StringButtonDialogField(new IStringButtonAdapter() {
+ public void changeControlPressed(DialogField field) {
+ browseForInstallLocation();
+ }
+ });
+ fJRERoot.setLabelText(RubyVMMessages.addVMDialog_jreHome);
+ fJRERoot.setButtonLabel(RubyVMMessages.addVMDialog_browse1);
+
+ fVMArgs= new StringDialogField();
+ fVMArgs.setLabelText(RubyVMMessages.AddVMDialog_23);
}
-
- protected void okPressed() {
- if (interpreterToEdit == null)
- interpreterToEdit = new RubyInterpreter(null, null);
-
- interpreterToEdit.setName(interpreterNameText.getText());
- interpreterToEdit.setInstallLocation(new File(interpreterLocationText.getText()));
- super.okPressed();
+
+ private String[] getVMTypeNames() {
+ String[] names= new String[fVMTypes.length];
+ for (int i= 0; i < fVMTypes.length; i++) {
+ names[i]= fVMTypes[i].getName();
+ }
+ return names;
}
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
+
+ protected void setFieldValuesToVM(IInterpreter vm) {
+ File dir = new File(fJRERoot.getText());
+ try {
+ vm.setInstallLocation(dir.getCanonicalFile());
+ } catch (IOException e) {
+ vm.setInstallLocation(dir.getAbsoluteFile());
+ }
+ vm.setName(fVMName.getText());
+
+ String argString = fVMArgs.getText().trim();
+ if (vm instanceof IInterpreter2) {
+ IInterpreter2 vm2 = (IInterpreter2) vm;
+ if (argString != null && argString.length() >0) {
+ vm2.setInterpreterArgs(argString);
+ } else {
+ vm2.setInterpreterArgs(null);
+ }
+ } else {
+ if (argString != null && argString.length() >0) {
+ vm.setInterpreterArguments(DebugPlugin.parseArguments(argString));
+ } else {
+ vm.setInterpreterArguments(null);
+ }
+ }
+
- createNameEntryField(composite);
- createLocationEntryField(composite);
-
- return composite;
+// fLibraryBlock.performApply(vm);
}
}
\ No newline at end of file
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:36:55 UTC (rev 1790)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/preferences/RubyInterpreterPreferencePage.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -12,6 +12,7 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -26,12 +27,19 @@
import org.eclipse.ui.IWorkbench;
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.debug.ui.rubyvms.IAddVMDialogRequestor;
+import org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages;
import org.rubypeople.rdt.launching.IInterpreter;
import org.rubypeople.rdt.launching.RubyRuntime;
-public class RubyInterpreterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- protected CheckboxTableViewer tableViewer;
+public class RubyInterpreterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IAddVMDialogRequestor {
+
+ /**
+ * VMs being displayed
+ */
+ private List fVMs = new ArrayList();
+
+ protected CheckboxTableViewer fVMList;
protected Button addButton, editButton, removeButton;
public RubyInterpreterPreferencePage() {
@@ -48,10 +56,10 @@
createInstalledInterpretersTableViewer(table);
createButtonGroup(composite);
- tableViewer.setInput(RubyRuntime.getDefault().getInstalledInterpreters());
+ fVMList.setInput(RubyRuntime.getDefault().getInstalledInterpreters());
IInterpreter selectedInterpreter = RubyRuntime.getDefault().getSelectedInterpreter();
if (selectedInterpreter != null)
- tableViewer.setChecked(selectedInterpreter, true);
+ fVMList.setChecked(selectedInterpreter, true);
enableButtons();
@@ -95,24 +103,24 @@
}
protected void createInstalledInterpretersTableViewer(Table table) {
- tableViewer = new CheckboxTableViewer(table);
+ fVMList = new CheckboxTableViewer(table);
- tableViewer.setLabelProvider(new RubyInterpreterLabelProvider());
- tableViewer.setContentProvider(new RubyInterpreterContentProvider());
+ fVMList.setLabelProvider(new RubyInterpreterLabelProvider());
+ fVMList.setContentProvider(new RubyInterpreterContentProvider());
- tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ fVMList.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent evt) {
enableButtons();
}
});
- tableViewer.addCheckStateListener(new ICheckStateListener() {
+ fVMList.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
updateSelectedInterpreter(event.getElement());
}
});
- tableViewer.addDoubleClickListener(new IDoubleClickListener() {
+ fVMList.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent e) {
editInterpreter();
}
@@ -147,21 +155,15 @@
}
protected void addInterpreter() {
- IInterpreter newInterpreter = new RubyInterpreter(null, null);
- EditInterpreterDialog editor = new EditInterpreterDialog(getShell(), RdtDebugUiMessages.getString("RubyInterpreterPreferencePage.EditInterpreterDialog.addInterpreter.title")); //$NON-NLS-1$
- editor.create();
- editor.setInterpreterToEdit(newInterpreter);
- if (EditInterpreterDialog.OK == editor.open()) {
- tableViewer.add(newInterpreter);
- Object[] checked = tableViewer.getCheckedElements();
- if(checked == null || checked.length == 0) {
- tableViewer.setChecked(newInterpreter, true);
- }
+ EditInterpreterDialog dialog = new EditInterpreterDialog(this, getShell(), RubyRuntime.getInterpreterInstallTypes(), null);
+ dialog.setTitle(RubyVMMessages.InstalledJREsBlock_7);
+ if (dialog.open() != Window.OK) {
+ return;
}
}
protected void removeInterpreter() {
- tableViewer.remove(getSelectedInterpreter());
+ fVMList.remove(getSelectedInterpreter());
}
protected void enableButtons() {
@@ -175,41 +177,65 @@
}
protected void updateSelectedInterpreter(Object interpreter) {
- Object[] checkedElements = tableViewer.getCheckedElements();
+ Object[] checkedElements = fVMList.getCheckedElements();
for (int i = 0; i < checkedElements.length; i++) {
- tableViewer.setChecked(checkedElements[i], false);
+ fVMList.setChecked(checkedElements[i], false);
}
- tableViewer.setChecked(interpreter, true);
+ fVMList.setChecked(interpreter, true);
}
protected void editInterpreter() {
- EditInterpreterDialog editor = new EditInterpreterDialog(getShell(), RdtDebugUiMessages.getString("RubyInterpreterPreferencePage.EditInterpreterDialog.editInterpreter.title")); //$NON-NLS-1$
- editor.create();
-
- IInterpreter anInterpreter = getSelectedInterpreter();
- editor.setInterpreterToEdit(anInterpreter);
- if (EditInterpreterDialog.OK == editor.open())
- tableViewer.update(anInterpreter, null);
+ IStructuredSelection selection= (IStructuredSelection)fVMList.getSelection();
+ IInterpreter vm= (IInterpreter)selection.getFirstElement();
+ if (vm == null) {
+ return;
+ }
+// if (isContributed(vm)) {
+// VMDetailsDialog dialog= new VMDetailsDialog(getShell(), vm);
+// dialog.open();
+// } else {
+ EditInterpreterDialog dialog= new EditInterpreterDialog(this, getShell(), RubyRuntime.getInterpreterInstallTypes(), vm);
+ dialog.setTitle(RubyVMMessages.InstalledJREsBlock_8);
+ if (dialog.open() != Window.OK) {
+ return;
+ }
+ fVMList.refresh(vm);
+// }
}
protected IInterpreter getSelectedInterpreter() {
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
+ IStructuredSelection selection = (IStructuredSelection) fVMList.getSelection();
return (IInterpreter) selection.getFirstElement();
}
public boolean performOk() {
- TableItem[] tableItems = tableViewer.getTable().getItems();
+ TableItem[] tableItems = fVMList.getTable().getItems();
List installedInterpreters = new ArrayList(tableItems.length);
for (int i = 0; i < tableItems.length; i++)
installedInterpreters.add(tableItems[i].getData());
RubyRuntime.getDefault().setInstalledInterpreters(installedInterpreters);
- Object[] checkedElements = tableViewer.getCheckedElements();
+ Object[] checkedElements = fVMList.getCheckedElements();
if (checkedElements.length > 0)
RubyRuntime.getDefault().setSelectedInterpreter((IInterpreter) checkedElements[0]);
return super.performOk();
}
+ public boolean isDuplicateName(String name) {
+ for (int i= 0; i < fVMs.size(); i++) {
+ IInterpreter vm = (IInterpreter)fVMs.get(i);
+ if (vm.getName().equals(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void vmAdded(IInterpreter vm) {
+ fVMs.add(vm);
+ fVMList.refresh();
+ }
+
}
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/IAddVMDialogRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/IAddVMDialogRequestor.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/IAddVMDialogRequestor.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.debug.ui.rubyvms;
+
+import org.rubypeople.rdt.launching.IInterpreter;
+
+/**
+ * This interface is implemented by clients of the <code>AddVMDialog</code>.
+ */
+public interface IAddVMDialogRequestor {
+
+ /**
+ * Reply whether or not a new VM of the specified name would
+ * constitute a duplicate.
+ *
+ * @param name the name of a potential new VM
+ * @return whether a new VM with the specified name would be a duplicate VM
+ */
+ public boolean isDuplicateName(String name);
+
+ /**
+ * Notification that a VM has been added from the <code>AddVMDialog</code>.
+ *
+ * @param vm the added vm
+ */
+ public void vmAdded(IInterpreter vm);
+
+}
Added: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -0,0 +1,27 @@
+package org.rubypeople.rdt.internal.debug.ui.rubyvms;
+
+import org.eclipse.osgi.util.NLS;
+
+public class RubyVMMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages";//$NON-NLS-1$
+
+ public static String addVMDialog_enterLocation;
+ public static String addVMDialog_locationNotExists;
+
+ public static String AddVMDialog_JRE_system_libraries__1;
+ public static String addVMDialog_jreType;
+ public static String addVMDialog_jreName;
+ public static String addVMDialog_jreHome;
+ public static String addVMDialog_browse1;
+ public static String AddVMDialog_23;
+ public static String addVMDialog_enterName;
+ public static String addVMDialog_duplicateName;
+ public static String AddVMDialog_JRE_name_must_be_a_valid_file_name___0__1;
+ public static String InstalledJREsBlock_7;
+ public static String InstalledJREsBlock_8;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, RubyVMMessages.class);
+ }
+}
Added: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.properties (rev 0)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/rubyvms/RubyVMMessages.properties 2007-01-18 15:41:21 UTC (rev 1791)
@@ -0,0 +1,2 @@
+addVMDialog_enterLocation=Enter the location of the Ruby VM.
+addVMDialog_locationNotExists=The location does not exist.
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IInterpreterInstallType.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IInterpreterInstallType.java 2007-01-18 14:36:55 UTC (rev 1790)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IInterpreterInstallType.java 2007-01-18 15:41:21 UTC (rev 1791)
@@ -19,4 +19,6 @@
IPath[] getDefaultLibraryLocations(File installLocation);
+ String getName();
+
}
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties 2007-01-18 14:36:55 UTC (rev 1790)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties 2007-01-18 15:41:21 UTC (rev 1791)
@@ -66,9 +66,7 @@
# Wizards
#########################################
ToggleMenuRubyFilesOnly=Show Ruby Files Only
-ToggleMenuRubyFilesOnly.Tooltip=If this is enabled, only ruby resources are shown. If it is disabled, the common filter rules apply.
-
###########
## viewsupport
###########
@@ -93,15 +91,7 @@
RDocPathErrorTitle=RDoc path error
RDocPathError=The input path for RDoc is blank or incorrect. Use preferences to enter a valid RDoc path.
-RDocExecutionErrorTitle=Ruby process exited with value {0}
-RDocExecutionError=Ruby running rdoc exited abnormally. A possble reason is a wrong Rdoc path. Please check the path for rdoc in the preference page.
-RDocExecutionErrorAdditionalMessageWithStderr=The process was started with: {0}. The last line of stderr of the ruby process: {1}.
-RDocExecutionErrorAdditionalMessage=The process was started with: {0}. The process did not write any messages to stderr.
-ErrorRunningRdocTitle=Error running RDoc
-ToggleComment.error.title=Toggle Comment
-ToggleComment.error.message=An error occurred while toggling comments.
-
CoreUtility_job_title=Rebuilding
CoreUtility_buildall_taskname=Build all...
CoreUtility_buildproject_taskname=Build project ''{0}''...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|