diff options
author | Pascal Rapicault (Ericsson) | 2013-04-06 02:26:36 +0000 |
---|---|---|
committer | Pascal Rapicault | 2013-04-08 11:55:49 +0000 |
commit | 60bd035f465db40a2168d713d86f51001aa91a41 (patch) | |
tree | 0207d7f61b3b943e9f9edd41c5a3df8952016f52 /bundles/org.eclipse.equinox.p2.ui.sdk.scheduler | |
parent | ffb765137956d162e3596b5e835e4df33a521cdb (diff) | |
download | rt.equinox.p2-60bd035f465db40a2168d713d86f51001aa91a41.tar.gz rt.equinox.p2-60bd035f465db40a2168d713d86f51001aa91a41.tar.xz rt.equinox.p2-60bd035f465db40a2168d713d86f51001aa91a41.zip |
Test cancellation logic
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.sdk.scheduler')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java index 1c4c7e7b7..623ba4c7d 100644 --- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java +++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java @@ -142,11 +142,15 @@ public class ImportFromInstallationWizard_c extends InstallWizard implements IIm } public boolean performCancel() { - boolean result = false; String[] buttons = new String[] {IDialogConstants.YES_LABEL, ProvUIMessages.ImportFromInstallationPag_LATER_BUTTON, IDialogConstants.NO_LABEL}; MessageDialog dialog = new MessageDialog(getShell(), ProvUIMessages.ImportFromInstallationPage_CONFIRMATION_TITLE, null, ProvUIMessages.ImportFromInstallationPage_CONFIRMATION_DIALOG, MessageDialog.QUESTION, buttons, 2); - int answer = dialog.open(); + return rememberCancellationDecision(dialog.open()); + } + + //Method public for test + public boolean rememberCancellationDecision(int answer) { + boolean result = false; switch (answer) { case -1 : // if the user closes the dialog without clicking any button. break; @@ -164,6 +168,6 @@ public class ImportFromInstallationWizard_c extends InstallWizard implements IIm break; } return result; - } + } |