Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-06-09 16:39:33 -0400
committerMatthew Piggott2011-06-09 16:39:33 -0400
commite381fc43170aba9f3b88febea625584f720da046 (patch)
treea3466daf2074b3866121ca4e19330870cb04f7cd /bundles/org.eclipse.equinox.p2.tests.ui
parent6c140220c9f2c024e80e59af542d6d63c1a8254a (diff)
downloadrt.equinox.p2-e381fc43170aba9f3b88febea625584f720da046.tar.gz
rt.equinox.p2-e381fc43170aba9f3b88febea625584f720da046.tar.xz
rt.equinox.p2-e381fc43170aba9f3b88febea625584f720da046.zip
bug 348941 - [ui] CCE while selecting feature for uninstall
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java20
4 files changed, 26 insertions, 22 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
index 3a246a27d..34724ee22 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.tests.ui
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
index 1aa46ab44..245fae3d4 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
@@ -17,6 +18,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.operations.ProfileModificationJob;
import org.eclipse.equinox.p2.operations.UninstallOperation;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.statushandlers.StatusManager;
/**
@@ -51,6 +53,8 @@ public class UninstallWizardTest extends WizardTest {
dialog.showPage(page2);
assertTrue(page2.isPageComplete());
+ Tree tree = findTree(page2);
+ tree.setSelection(tree.getTopItem());
// if another operation is scheduled for this profile, we should not be allowed to proceed
longOp = getLongTestOperation();
getProvisioningUI().schedule(longOp, StatusManager.LOG);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
index 29f8b84f1..73dd6ef8d 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
@@ -21,7 +21,7 @@ import org.eclipse.equinox.p2.operations.UpdateOperation;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.statushandlers.StatusManager;
/**
@@ -198,24 +198,4 @@ public class UpdateWizardTest extends WizardTest {
dialog.getShell().close();
}
}
-
- protected Tree findTree(ResolutionResultsWizardPage page) {
- return findTree(page.getControl());
- }
-
- protected Tree findTree(Control control) {
- if (control instanceof Tree)
- return (Tree) control;
- if (control instanceof Composite) {
- Control[] children = ((Composite) control).getChildren();
- for (int i = 0; i < children.length; i++) {
- Tree tree = findTree(children[i]);
- if (tree != null)
- return tree;
- }
-
- }
- return null;
- }
-
} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java
index dc7934bb4..a76125adf 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java
@@ -10,11 +10,31 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage;
import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
+import org.eclipse.swt.widgets.*;
/**
* Generic wizard test methods
*/
public abstract class WizardTest extends AbstractProvisioningUITest {
+ protected Tree findTree(ResolutionResultsWizardPage page) {
+ return findTree(page.getControl());
+ }
+
+ protected Tree findTree(Control control) {
+ if (control instanceof Tree)
+ return (Tree) control;
+ if (control instanceof Composite) {
+ Control[] children = ((Composite) control).getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Tree tree = findTree(children[i]);
+ if (tree != null)
+ return tree;
+ }
+
+ }
+ return null;
+ }
}

Back to the top