Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorJohn Cortell2009-10-14 12:22:32 +0000
committerJohn Cortell2009-10-14 12:22:32 +0000
commitbc5eb8387742ad285d48af5188617c9ad312677c (patch)
tree822de75a625b1efacea165868bcc2c7c313e2f31 /launch
parent06bfab7f23cf6f38ce8bfd826e90ff692f2a4beb (diff)
downloadorg.eclipse.cdt-bc5eb8387742ad285d48af5188617c9ad312677c.tar.gz
org.eclipse.cdt-bc5eb8387742ad285d48af5188617c9ad312677c.tar.xz
org.eclipse.cdt-bc5eb8387742ad285d48af5188617c9ad312677c.zip
[292224] Launch Group tab not updating properly after hitting Revert
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MultiLaunchConfigurationTabGroup.java26
1 files changed, 22 insertions, 4 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MultiLaunchConfigurationTabGroup.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MultiLaunchConfigurationTabGroup.java
index 95ffbcfcb69..73377c55743 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MultiLaunchConfigurationTabGroup.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MultiLaunchConfigurationTabGroup.java
@@ -32,6 +32,7 @@ import org.eclipse.jface.viewers.BaseLabelProvider;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ICheckStateProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
@@ -147,6 +148,26 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
return null;
}
}
+
+ static class CheckStateProvider implements ICheckStateProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICheckStateProvider#isChecked(java.lang.Object)
+ */
+ public boolean isChecked(Object element) {
+ if (element instanceof LaunchElement) {
+ return ((LaunchElement)element).enabled;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICheckStateProvider#isGrayed(java.lang.Object)
+ */
+ public boolean isGrayed(Object element) {
+ return false;
+ }
+ }
static abstract class ButtonComposite extends Composite implements SelectionListener {
Button upButton;
Button downButton;
@@ -235,6 +256,7 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
table.setFont(parent.getFont());
treeViewer.setContentProvider(new ContentProvider());
treeViewer.setLabelProvider(new LabelProvider());
+ treeViewer.setCheckStateProvider(new CheckStateProvider());
table.setHeaderVisible(true);
table.setLayoutData(new GridData(GridData.FILL_BOTH));
TreeColumn col1 = new TreeColumn(table, SWT.NONE);
@@ -424,10 +446,6 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
public void initializeFrom(ILaunchConfiguration configuration) {
MultiLaunchConfigurationDelegate.createLaunchElements(configuration, input);
if (treeViewer != null) {
- for (Iterator<LaunchElement> iterator = input.iterator(); iterator.hasNext();) {
- MultiLaunchConfigurationDelegate.LaunchElement el = iterator.next();
- treeViewer.setChecked(el, el.enabled);
- }
treeViewer.refresh(true);
}
}

Back to the top