Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-04-19 14:49:47 -0400
committerMatthew Piggott2011-04-19 14:49:47 -0400
commit536624a9235d244dd0d192a0a916643a80163ccd (patch)
tree18c85607e3c06fad83ac7a9acea203f816a2e304
parent9c4c9e6f0c3b7f1636ba2ca0975d8b2aea7ae613 (diff)
downloadm2e-core-536624a9235d244dd0d192a0a916643a80163ccd.tar.gz
m2e-core-536624a9235d244dd0d192a0a916643a80163ccd.tar.xz
m2e-core-536624a9235d244dd0d192a0a916643a80163ccd.zip
UpdateDependenciesDialog - fix checked bug
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
index cb271c72..d9b94f1a 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
@@ -25,8 +25,6 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -250,15 +248,13 @@ public class UpdateDepenciesDialog extends TitleAreaDialog {
}
protected void okPressed() {
- ISelection selection = codebaseViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- Object[] obj = ((IStructuredSelection) selection).toArray();
- IProject[] projects = new IProject[obj.length];
- for(int i = 0; i < obj.length; i++ ) {
- projects[i] = (IProject) obj[i];
- }
- selectedProjects = projects;
+ Object[] obj = codebaseViewer.getCheckedElements();
+ IProject[] projects = new IProject[obj.length];
+ for(int i = 0; i < obj.length; i++ ) {
+ projects[i] = (IProject) obj[i];
}
+ selectedProjects = projects;
+
isOffline = offline.getSelection();
isForceUpdate = forceUpdate.getSelection();
super.okPressed();

Back to the top