Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-07-31 16:44:16 +0000
committerMike Rennie2013-07-31 16:44:16 +0000
commitd975f27f12707ae6598994c5e3c6bd5e271d46c4 (patch)
treec7d1b2b1a202e19c0c2ccaaff959f4dd25286f0d /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
parent4fcde1ffaf34791bd406d47ce72d17e2801432a3 (diff)
downloadeclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.gz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.xz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.zip
Bug 352626 - Move platform debug to Java 1.6 BREE
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
index 38f483cee..c79039ec2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 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
@@ -61,8 +61,9 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#initializeControls()
*/
+ @Override
protected void initializeControls() {
- List selectedElements = getInitialElementSelections();
+ List<?> selectedElements = getInitialElementSelections();
if (selectedElements != null && !selectedElements.isEmpty()){
getCheckBoxTableViewer().setCheckedElements(selectedElements.toArray());
getCheckBoxTableViewer().setSelection(StructuredSelection.EMPTY);
@@ -73,6 +74,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#createViewer(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected StructuredViewer createViewer(Composite parent){
//by default return a checkbox table viewer
Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
@@ -86,6 +88,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
*/
+ @Override
protected void addViewerListeners(StructuredViewer viewer) {
getCheckBoxTableViewer().addCheckStateListener(new DefaultCheckboxListener());
}
@@ -96,6 +99,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
*
*/
private class DefaultCheckboxListener implements ICheckStateListener{
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
getButton(IDialogConstants.OK_ID).setEnabled(isValid());
}
@@ -104,6 +108,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.AbstractDebugSelectionDialog#isValid()
*/
+ @Override
protected boolean isValid() {
return getCheckBoxTableViewer().getCheckedElements().length > 0;
}
@@ -111,6 +116,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
+ @Override
protected void okPressed() {
Object[] elements = getCheckBoxTableViewer().getCheckedElements();
setResult(Arrays.asList(elements));
@@ -120,6 +126,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected void addCustomFooterControls(Composite parent) {
if (fShowSelectButtons){
Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL);
@@ -127,6 +134,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
gd.horizontalAlignment = SWT.END;
Button button = SWTFactory.createPushButton(comp, DebugUIMessages.AbstractDebugCheckboxSelectionDialog_0, null);
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
getCheckBoxTableViewer().setAllChecked(true);
getButton(IDialogConstants.OK_ID).setEnabled(isValid());
@@ -134,6 +142,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
});
button = SWTFactory.createPushButton(comp, DebugUIMessages.AbstractDebugCheckboxSelectionDialog_1, null);
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
getCheckBoxTableViewer().setAllChecked(false);
getButton(IDialogConstants.OK_ID).setEnabled(isValid());

Back to the top