Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2007-09-05 20:34:00 +0000
committerMichael Rennie2007-09-05 20:34:00 +0000
commit0d1c42114357c9c48fe4ea85036df51ef709c0af (patch)
tree83fcd091308360258e8628b463fa5cc9a86db858 /org.eclipse.debug.ui
parent586a9e5ca76eb98a790b759d661738b993253bec (diff)
downloadeclipse.platform.debug-0d1c42114357c9c48fe4ea85036df51ef709c0af.tar.gz
eclipse.platform.debug-0d1c42114357c9c48fe4ea85036df51ef709c0af.tar.xz
eclipse.platform.debug-0d1c42114357c9c48fe4ea85036df51ef709c0af.zip
Bug 202059 Run dialogue: switching between read-only or removed launch configurations.
Diffstat (limited to 'org.eclipse.debug.ui')
-rwxr-xr-xorg.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java111
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java141
5 files changed, 108 insertions, 171 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
index 4b5960acb..55ae6c262 100755
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
@@ -410,8 +410,9 @@ public class SWTFactory {
* @param columns the number of columns within the composite
* @param hspan the horizontal span the composite should take up on the parent
* @param fill the style for how this composite should fill into its parent
- * @param marginwidth the width of the margin to place around the composite (default is 5, specified by GridLayout)
- * @return the new group
+ * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
+ * @param marginheight the height of the margin to place o the top and bottom of the composite
+ * @return the new composite
* @since 3.3
*/
public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
index 1aac3da08..e1ce115c1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
@@ -23,6 +23,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
@@ -40,12 +41,11 @@ import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
@@ -116,27 +116,12 @@ public class FavoritesDialog extends TrayDialog {
* Content provider for favorites table
*/
protected class FavoritesContentProvider implements IStructuredContentProvider {
-
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
public Object[] getElements(Object inputElement) {
ILaunchConfiguration[] favorites= (ILaunchConfiguration[]) getFavorites().toArray(new ILaunchConfiguration[0]);
return LaunchConfigurationManager.filterConfigs(favorites);
}
-
- /**
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
+ public void dispose() {}
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
}
/**
@@ -186,6 +171,13 @@ public class FavoritesDialog extends TrayDialog {
handleMove(-1);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
+ */
+ protected Point getInitialSize() {
+ return new Point(350, 400);
+ }
+
/**
* The 'move down' button has been pressed
*/
@@ -193,6 +185,10 @@ public class FavoritesDialog extends TrayDialog {
handleMove(1);
}
+ /**
+ * Handles moving a favorite up or down the listing
+ * @param direction the direction to make the move (up or down)
+ */
protected void handleMove(int direction) {
IStructuredSelection sel = (IStructuredSelection)getFavoritesTable().getSelection();
List selList= sel.toList();
@@ -212,7 +208,6 @@ public class FavoritesDialog extends TrayDialog {
getFavorites().add(j, config);
}
}
-
getFavoritesTable().refresh();
handleFavoriteSelectionChanged();
}
@@ -255,26 +250,24 @@ public class FavoritesDialog extends TrayDialog {
return DebugUIPlugin.removeAccelerators(fHistory.getLaunchGroup().getLabel());
}
+ /**
+ * Creates the main area of the dialog
+ * @param parent the parent to add this content to
+ */
protected void createFavoritesArea(Composite parent) {
- Composite topComp = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 2;
- topComp.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- topComp.setLayoutData(gd);
- topComp.setFont(parent.getFont());
-
- // Create "favorite config" area
- createLabel(topComp, LaunchConfigurationsMessages.FavoritesDialog_2);
+ Composite topComp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0);
+ SWTFactory.createLabel(topComp, LaunchConfigurationsMessages.FavoritesDialog_2, 2);
fFavoritesTable = createTable(topComp, new FavoritesContentProvider());
- Composite buttonComp = createButtonComposite(topComp);
- fAddFavoriteButton = createPushButton(buttonComp,LaunchConfigurationsMessages.FavoritesDialog_3);
+ Composite buttonComp = SWTFactory.createComposite(topComp, topComp.getFont(), 1, 1, GridData.VERTICAL_ALIGN_BEGINNING, 0, 0);
+ fAddFavoriteButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_3, null);
+ fAddFavoriteButton.addSelectionListener(fButtonListener);
fAddFavoriteButton.setEnabled(true);
- fRemoveFavoritesButton = createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_4);
- fMoveUpButton = createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_5);
- fMoveDownButton = createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_6);
+ fRemoveFavoritesButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_4, null);
+ fRemoveFavoritesButton.addSelectionListener(fButtonListener);
+ fMoveUpButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_5, null);
+ fMoveUpButton.addSelectionListener(fButtonListener);
+ fMoveDownButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_6, null);
+ fMoveDownButton.addSelectionListener(fButtonListener);
}
/**
@@ -294,49 +287,7 @@ public class FavoritesDialog extends TrayDialog {
tableViewer.getControl().addKeyListener(fKeyListener);
return tableViewer;
}
-
- /**
- * Creates and returns a fully configured push button in the given paren with the given label.
- */
- private Button createPushButton(Composite parent, String label) {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- button.setFont(parent.getFont());
- setButtonLayoutData(button);
- button.addSelectionListener(fButtonListener);
- button.setEnabled(false);
- return button;
- }
-
- /**
- * Creates a fully configured composite to add buttons to.
- */
- private Composite createButtonComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- composite.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setFont(parent.getFont());
- return composite;
- }
-
- /**
- * Creates a fully configured label with the given text
- */
- private Label createLabel(Composite parent, String labelText) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(labelText);
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- label.setFont(parent.getFont());
- return label;
- }
-
+
/**
* Returns the current list of favorites.
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
index 9cf9be898..f460ab2b8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
@@ -139,8 +139,6 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia
if (!isSafeToClose()) {
return false;
}
- getBannerImage().dispose();
- getTabViewer().dispose();
DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this);
return super.close();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index fccf1eb49..b58a491dd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -492,14 +492,21 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
if (fInitializingTabs) {
return;
}
+ if(fOriginal != null && fOriginal.isReadOnly()) {
+ updateButtons();
+ return;
+ }
ILaunchConfigurationTab[] tabs = getTabs();
if (tabs != null) {
// update the working copy from the active tab
boolean newwc = !getWorkingCopy().isDirty();
getActiveTab().performApply(getWorkingCopy());
- if(getOriginal() instanceof ILaunchConfigurationWorkingCopy && newwc) {
+ if((fOriginal instanceof ILaunchConfigurationWorkingCopy) && newwc) {
try {
- getWorkingCopy().doSave();
+ ILaunchConfigurationWorkingCopy copy = getWorkingCopy();
+ if(copy != null) {
+ copy.doSave();
+ }
}
catch (CoreException e) {DebugUIPlugin.log(e);}
}
@@ -599,8 +606,8 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
* updates the button states
*/
private void updateButtons() {
- boolean dirty = isDirty();
- fApplyButton.setEnabled(dirty && canSave());
+ boolean dirty = isDirty() && canSave();
+ fApplyButton.setEnabled(dirty);
fRevertButton.setEnabled(dirty);
}
@@ -976,8 +983,7 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
if (workingCopy.getOriginal() == null) {
return true;
}
- ILaunchConfiguration original = getOriginal();
- return !original.contentsEqual(workingCopy);
+ return fOriginal != null && !fOriginal.contentsEqual(workingCopy);
}
/**
@@ -1271,7 +1277,7 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
}
// Otherwise, if there's already a config with the same name, complain
- if (!getOriginal().getName().equals(currentName)) {
+ if (fOriginal != null && !fOriginal.getName().equals(currentName)) {
Set reservednames = ((LaunchConfigurationsDialog)getLaunchConfigurationDialog()).getReservedNameSet();
if (DebugPlugin.getDefault().getLaunchManager().isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) {
throw new CoreException(new Status(IStatus.ERROR,
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 30ff0e28b..fd59e6f78 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -326,8 +326,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @return if we can discard the current config or not
*/
protected int shouldSaveCurrentConfig() {
- if (getTabViewer().isDirty()) {
- if (getTabViewer().canSave()) {
+ if (fTabViewer.isDirty()) {
+ if (fTabViewer.canSave()) {
return showSaveChangesDialog();
}
return showUnsavedChangesDialog();
@@ -346,7 +346,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
persistExpansion();
setCurrentlyVisibleLaunchConfigurationDialog(null);
getBannerImage().dispose();
- getTabViewer().dispose();
+ fTabViewer.dispose();
if (fLaunchConfigurationView != null) {
fLaunchConfigurationView.dispose();
}
@@ -369,8 +369,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
*/
public void create() {
super.create();
- if (getTabViewer().getInput() == null) {
- getTabViewer().inputChanged(null);
+ if (fTabViewer.getInput() == null) {
+ fTabViewer.inputChanged(null);
}
}
@@ -466,12 +466,12 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
*/
protected Composite createLaunchConfigurationEditArea(Composite parent) {
setTabViewer(new LaunchConfigurationTabGroupViewer(parent, this));
- getTabViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+ fTabViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
handleTabSelectionChanged();
}
});
- return (Composite)getTabViewer().getControl();
+ return (Composite)fTabViewer.getControl();
}
/**
@@ -530,7 +530,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
IStructuredSelection selection = (IStructuredSelection)fLaunchConfigurationView.getViewer().getSelection();
Object target = selection.getFirstElement();
if (target instanceof ILaunchConfiguration) {
- if (getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates()) {
+ if (fTabViewer.canLaunch() & fTabViewer.canLaunchWithModes() & !fTabViewer.hasDuplicateDelegates()) {
handleLaunchPressed();
}
} else {
@@ -658,7 +658,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getActiveTab()
*/
public ILaunchConfigurationTab getActiveTab() {
- return getTabViewer().getActiveTab();
+ return fTabViewer.getActiveTab();
}
/**
@@ -863,8 +863,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @return the current tab group, or <code>null</code> if none
*/
public ILaunchConfigurationTabGroup getTabGroup() {
- if (getTabViewer() != null) {
- return getTabViewer().getTabGroup();
+ if (fTabViewer != null) {
+ return fTabViewer.getTabGroup();
}
return null;
}
@@ -892,15 +892,20 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* Notification the 'Close' button has been pressed.
*/
protected void handleClosePressed() {
- int status = shouldSaveCurrentConfig();
- if(status != IDialogConstants.CANCEL_ID) {
- if(status != ID_DISCARD_BUTTON) {
- if(status == IDialogConstants.YES_ID) {
- getTabViewer().handleApplyPressed();
+ if(fTabViewer.canSave()) {
+ int status = shouldSaveCurrentConfig();
+ if(status != IDialogConstants.CANCEL_ID) {
+ if(status != ID_DISCARD_BUTTON) {
+ if(status == IDialogConstants.YES_ID) {
+ fTabViewer.handleApplyPressed();
+ }
+ cancelPressed();
}
- cancelPressed();
}
}
+ else {
+ cancelPressed();
+ }
}
/**
@@ -913,17 +918,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @param event selection changed event
*/
protected void handleLaunchConfigurationSelectionChanged(SelectionChangedEvent event) {
- Object input = getTabViewer().getInput();
+ Object input = fTabViewer.getInput();
Object newInput = null;
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (!selection.isEmpty()) {
- if (selection.size() == 1) {
- newInput = selection.getFirstElement();
- }
+ if (selection.size() == 1) {
+ newInput = selection.getFirstElement();
}
if (!isEqual(input, newInput)) {
- LaunchConfigurationTabGroupViewer viewer = getTabViewer();
- ILaunchConfiguration original = viewer.getOriginal();
+ ILaunchConfiguration original = fTabViewer.getOriginal();
if (original != null && newInput == null && getLaunchManager().getMovedTo(original) != null) {
return;
}
@@ -935,50 +937,30 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
if (newInput instanceof ILaunchConfiguration) {
renamed = getLaunchManager().getMovedFrom((ILaunchConfiguration)newInput) != null;
}
- Object in = input;
- if (viewer.isDirty() && !deleted && !renamed) {
+ if (fTabViewer.canSave() && fTabViewer.isDirty() && !deleted && !renamed) {
if(fLaunchConfigurationView != null) {
fLaunchConfigurationView.setAutoSelect(false);
}
int ret = showUnsavedChangesDialog();
- boolean cansave = viewer.canSave();
if(ret == IDialogConstants.YES_ID) {
- if(cansave) {
- viewer.handleApplyPressed();
- }
- else {
- viewer.handleRevertPressed();
- }
- in = newInput;
- }
- else if(ret == IDialogConstants.NO_ID) {
- if(cansave) {
- viewer.handleRevertPressed();
- if(viewer.isDirty()) {
- viewer.handleApplyPressed();
- }
- in = newInput;
- }
- }
- if(fLaunchConfigurationView != null) {
- if(in != null) {
- fLaunchConfigurationView.getViewer().setSelection(new StructuredSelection(in));
- }
- fLaunchConfigurationView.setAutoSelect(true);
+ fTabViewer.handleApplyPressed();
+ fTabViewer.setInput(newInput);
}
+ else if(ret == IDialogConstants.NO_ID) {
+ fTabViewer.handleRevertPressed();
+ fTabViewer.setInput(newInput);
+ }
+ else {
+ fLaunchConfigurationView.getViewer().setSelection(new StructuredSelection(input));
+ }
+ fLaunchConfigurationView.setAutoSelect(true);
}
else {
- viewer.setInput(newInput);
- if(newInput != null) {
- if(viewer.isDirty()) {
- viewer.handleApplyPressed();
- }
- if (getShell() != null && getShell().isVisible()) {
- resize();
- }
+ fTabViewer.setInput(newInput);
+ if (getShell() != null && getShell().isVisible()) {
+ resize();
}
}
-
}
}
@@ -987,15 +969,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* Save and launch.
*/
protected void handleLaunchPressed() {
- ILaunchConfiguration config = getTabViewer().getOriginal();
- if (getTabViewer().isDirty() & getTabViewer().canSave()) {
- getTabViewer().handleApplyPressed();
- config = getTabViewer().getOriginal();
+ ILaunchConfiguration config = fTabViewer.getOriginal();
+ if (fTabViewer.isDirty() && fTabViewer.canSave()) {
+ fTabViewer.handleApplyPressed();
+ config = fTabViewer.getOriginal();
}
- String mode = getMode();
close();
if(config != null) {
- DebugUITools.launch(config, mode);
+ DebugUITools.launch(config, getMode());
}
}
@@ -1270,8 +1251,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
//perform the validation of the dialog again, which is expensive and would cause flashing of widgets.
Control[] children = ((Composite)fButtonComp.getChildren()[0]).getChildren();
boolean[] prev = new boolean[children.length+2];
- prev[0] = getTabViewer().getApplyButton().isEnabled();
- prev[1] = getTabViewer().getRevertButton().isEnabled();
+ prev[0] = fTabViewer.getApplyButton().isEnabled();
+ prev[1] = fTabViewer.getRevertButton().isEnabled();
for(int i = 0; i < children.length; i++) {
prev[i+2] = children[i].isEnabled();
}
@@ -1304,8 +1285,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @since 3.3.0
*/
private void updateRunnnableControls(boolean enabled, boolean[] prev) {
- getTabViewer().getApplyButton().setEnabled(enabled ? prev[0] : enabled);
- getTabViewer().getRevertButton().setEnabled(enabled ? prev[1] : enabled);
+ fTabViewer.getApplyButton().setEnabled(enabled ? prev[0] : enabled);
+ fTabViewer.getRevertButton().setEnabled(enabled ? prev[1] : enabled);
//the arrangement never differs: button comp has one child that holds all the buttons
Control[] children = ((Composite)fButtonComp.getChildren()[0]).getChildren();
for(int i = 0; i < children.length; i++) {
@@ -1318,14 +1299,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(org.eclipse.debug.ui.ILaunchConfigurationTab)
*/
public void setActiveTab(ILaunchConfigurationTab tab) {
- getTabViewer().setActiveTab(tab);
+ fTabViewer.setActiveTab(tab);
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(int)
*/
public void setActiveTab(int index) {
- getTabViewer().setActiveTab(index);
+ fTabViewer.setActiveTab(index);
}
/**
@@ -1365,7 +1346,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setName(java.lang.String)
*/
public void setName(String name) {
- getTabViewer().setName(name);
+ fTabViewer.setName(name);
}
/**
@@ -1411,8 +1392,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* <code>IDialogConstants</code>.
*/
private int showDiscardChangesDialog() {
- StringBuffer buffer = new StringBuffer(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___35, new String[]{getTabViewer().getWorkingCopy().getName()}));
- buffer.append(getTabViewer().getErrorMesssage());
+ StringBuffer buffer = new StringBuffer(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___35, new String[]{fTabViewer.getWorkingCopy().getName()}));
+ buffer.append(fTabViewer.getErrorMesssage());
buffer.append(LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_discard_changes_37);
MessageDialog dialog = new MessageDialog(getShell(),
LaunchConfigurationsMessages.LaunchConfigurationDialog_Discard_changes__38,
@@ -1427,7 +1408,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
if (fLaunchConfigurationView != null) {
fLaunchConfigurationView.setAutoSelect(false);
}
- getTabViewer().handleRevertPressed();
+ fTabViewer.handleRevertPressed();
val = IDialogConstants.YES_ID;
if (fLaunchConfigurationView != null) {
fLaunchConfigurationView.setAutoSelect(true);
@@ -1448,7 +1429,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* <code>IDialogConstants</code>.
*/
private int showSaveChangesDialog() {
- String message = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___29, new String[]{getTabViewer().getWorkingCopy().getName()});
+ String message = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___29, new String[]{fTabViewer.getWorkingCopy().getName()});
MessageDialog dialog = new MessageDialog(getShell(),
LaunchConfigurationsMessages.LaunchConfigurationDialog_Save_changes__31,
null,
@@ -1480,7 +1461,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @return returns the <code>showSaveChangesDialog</code> return value
*/
private int showUnsavedChangesDialog() {
- if (getTabViewer().canSave()) {
+ if (fTabViewer.canSave()) {
return showSaveChangesDialog();
}
return showDiscardChangesDialog();
@@ -1494,16 +1475,16 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
getNewAction().setEnabled(getNewAction().isEnabled());
getDeleteAction().setEnabled(getDeleteAction().isEnabled());
getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
- getTabViewer().refresh();
- getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates());
+ fTabViewer.refresh();
+ getButton(ID_LAUNCH_BUTTON).setEnabled(fTabViewer.canLaunch() & fTabViewer.canLaunchWithModes() & !fTabViewer.hasDuplicateDelegates());
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationDialog#updateMessage()
*/
public void updateMessage() {
- setErrorMessage(getTabViewer().getErrorMesssage());
- setMessage(getTabViewer().getMessage());
+ setErrorMessage(fTabViewer.getErrorMesssage());
+ setMessage(fTabViewer.getMessage());
}
/**

Back to the top