Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-09 21:46:06 -0400
committerPascal Rapicault2013-04-16 12:10:05 -0400
commit2a251ffa6ee938ab71f29c6d6db26bc7d7634c21 (patch)
tree6da90d4a66912449db6fabd7e85c0fcbaf5dc66f /bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
parenta6167da69e88b22dc13248c6a6d4efd8ee7371eb (diff)
downloadrt.equinox.p2-2a251ffa6ee938ab71f29c6d6db26bc7d7634c21.tar.gz
rt.equinox.p2-2a251ffa6ee938ab71f29c6d6db26bc7d7634c21.tar.xz
rt.equinox.p2-2a251ffa6ee938ab71f29c6d6db26bc7d7634c21.zip
Better message when doing first time migration
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/ImportFromInstallationPage_c.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationWizard_c.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ProvUIMessages.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/messages.properties5
5 files changed, 21 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationPage_c.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationPage_c.java
index bd85677fb..b6dc5685b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationPage_c.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ImportFromInstallationPage_c.java
@@ -43,16 +43,16 @@ public class ImportFromInstallationPage_c extends AbstractImportPage_c implement
// private IProvisioningAgentProvider agentProvider;
- public ImportFromInstallationPage_c(ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+ public ImportFromInstallationPage_c(ProvisioningUI ui, ProvisioningOperationWizard wizard, boolean firstTime) {
super("importfrominstancepage", ui, wizard); //$NON-NLS-1$
- setTitle(ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE);
+ setTitle(firstTime ? ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE_FIRSTRUN : ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE);
setDescription(NLS.bind(ProvUIMessages.ImportFromInstallationPage_DIALOG_DESCRIPTION, Platform.getProduct().getName()));
}
- public ImportFromInstallationPage_c(ProvisioningUI ui, ImportFromInstallationWizard_c wizard, IProfile toImportFrom) {
+ public ImportFromInstallationPage_c(ProvisioningUI ui, ImportFromInstallationWizard_c wizard, IProfile toImportFrom, boolean firstTime) {
super("importfrominstancepage", ui, wizard); //$NON-NLS-1$
- setTitle(ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE);
- setDescription(NLS.bind(ProvUIMessages.ImportFromInstallationPage_DIALOG_DESCRIPTION, Platform.getProduct().getName()));
+ setTitle(firstTime ? ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE_FIRSTRUN : ProvUIMessages.ImportFromInstallationPage_DIALOG_TITLE);
+ setDescription(NLS.bind(firstTime ? ProvUIMessages.ImportFromInstallationPage_DIALOG_DESCRIPTION_FIRSTRUN : ProvUIMessages.ImportFromInstallationPage_DIALOG_DESCRIPTION, Platform.getProduct().getName()));
toBeImportedProfile = toImportFrom;
}
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 623ba4c7d..d1c0902a3 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
@@ -40,22 +40,24 @@ public class ImportFromInstallationWizard_c extends InstallWizard implements IIm
private IProfile toImportFrom;
private URI[] reposToMigrate;
private List<URI> addedRepos = new ArrayList<URI>();
+ private boolean firstTime = false;
public ImportFromInstallationWizard_c() {
this(ProvisioningUI.getDefaultUI(), null, null, null);
}
- public ImportFromInstallationWizard_c(IProfile toImportFrom, URI[] reposToMigrate) {
+ public ImportFromInstallationWizard_c(IProfile toImportFrom, URI[] reposToMigrate, boolean firstTime) {
this(ProvisioningUI.getDefaultUI(), null, null, null);
this.toImportFrom = toImportFrom;
this.reposToMigrate = reposToMigrate;
+ this.firstTime = firstTime;
addRepos();
}
public ImportFromInstallationWizard_c(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
super(ui, operation, initialSelections, preloadJob);
IDialogSettings workbenchSettings = ProvUIActivator.getDefault().getDialogSettings();
- String sectionName = "ImportFromInstallationWizard"; //$NON-NLS-1$
+ String sectionName = "MigrationWizard"; //$NON-NLS-1$
IDialogSettings section = workbenchSettings.getSection(sectionName);
if (section == null) {
section = workbenchSettings.addNewSection(sectionName);
@@ -64,7 +66,7 @@ public class ImportFromInstallationWizard_c extends InstallWizard implements IIm
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
- setWindowTitle(ProvUIMessages.ImportWizard_WINDOWTITLE);
+ setWindowTitle(firstTime ? ProvUIMessages.ImportWizard_WINDOWTITLE_FIRSTRUN : ProvUIMessages.ImportWizard_WINDOWTITLE);
setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(Platform.getBundle(ProvUIActivator.PLUGIN_ID).getEntry("icons/install_wiz.gif"))); //$NON-NLS-1$
setNeedsProgressMonitor(true);
}
@@ -72,8 +74,8 @@ public class ImportFromInstallationWizard_c extends InstallWizard implements IIm
@Override
protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
if (toImportFrom != null)
- return new ImportFromInstallationPage_c(ui, this, toImportFrom);
- return new ImportFromInstallationPage_c(ui, this);
+ return new ImportFromInstallationPage_c(ui, this, toImportFrom, firstTime);
+ return new ImportFromInstallationPage_c(ui, this, firstTime);
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
index 572211f47..734ebdc55 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
@@ -112,7 +112,7 @@ public class MigrationSupport {
private boolean isFirstTimeRunningThisSharedInstance(IProvisioningAgent agent, IProfileRegistry registry, IProfile currentProfile) {
long[] history = registry.listProfileTimestamps(currentProfile.getProfileId());
- boolean isInitial = !IProfile.STATE_SHARED_INSTALL_VALUE_INITIAL.equals(registry.getProfileStateProperties(currentProfile.getProfileId(), history[0]).get(IProfile.STATE_PROP_SHARED_INSTALL));
+ boolean isInitial = IProfile.STATE_SHARED_INSTALL_VALUE_INITIAL.equals(registry.getProfileStateProperties(currentProfile.getProfileId(), history[0]).get(IProfile.STATE_PROP_SHARED_INSTALL));
if (isInitial) {
if (getLastMigration() >= history[0])
return false;
@@ -161,7 +161,7 @@ public class MigrationSupport {
Display d = Display.getDefault();
d.asyncExec(new Runnable() {
public void run() {
- WizardDialog migrateWizard = new WizardDialog(getWorkbenchWindowShell(), new ImportFromInstallationWizard_c(inputProfile, reposToMigrate));
+ WizardDialog migrateWizard = new WizardDialog(getWorkbenchWindowShell(), new ImportFromInstallationWizard_c(inputProfile, reposToMigrate, reposToMigrate != null));
migrateWizard.create();
migrateWizard.open();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ProvUIMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ProvUIMessages.java
index 5068d3904..5feb42239 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ProvUIMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/ProvUIMessages.java
@@ -29,8 +29,11 @@ public class ProvUIMessages extends NLS {
public static String PAGE_NOINSTALLTION_ERROR;
public static String ImportFromInstallationPage_SELECT_COMPONENT;
public static String ImportFromInstallationPage_DIALOG_TITLE;
+ public static String ImportFromInstallationPage_DIALOG_TITLE_FIRSTRUN;
public static String ImportFromInstallationPage_DIALOG_DESCRIPTION;
+ public static String ImportFromInstallationPage_DIALOG_DESCRIPTION_FIRSTRUN;
public static String ImportWizard_WINDOWTITLE;
+ public static String ImportWizard_WINDOWTITLE_FIRSTRUN;
public static String ImportFromInstallationPage_CONFIRMATION_TITLE;
public static String ImportFromInstallationPage_CONFIRMATION_DIALOG;
public static String ImportFromInstallationPag_LATER_BUTTON;
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/messages.properties
index 2c8854401..8bb0ab767 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/messages.properties
@@ -7,9 +7,12 @@ AbstractPage_ButtonSelectAll=&Select All
AbstractPage_ButtonDeselectAll=&Deselect All
PAGE_NOINSTALLTION_ERROR=Select at least one available element to be installed.
ImportFromInstallationPage_SELECT_COMPONENT=Select at least one available element to be installed.
-ImportWizard_WINDOWTITLE=Import
+ImportWizard_WINDOWTITLE=Migrate
+ImportWizard_WINDOWTITLE_FIRSTRUN=Import
ImportFromInstallationPage_DIALOG_TITLE=Migration wizard
+ImportFromInstallationPage_DIALOG_TITLE_FIRSTRUN=Import wizard
ImportFromInstallationPage_DIALOG_DESCRIPTION=Because {0} has been updated, the plug-ins you had installed are now disabled.\nThis wizard will help you install those again.
+ImportFromInstallationPage_DIALOG_DESCRIPTION_FIRSTRUN=It is the first time you are running {0} from this location.\nThis wizard will help you install plug-ins you may have previously installed.
ImportFromInstallationPage_CONFIRMATION_TITLE=Migration cancellation
ImportFromInstallationPage_CONFIRMATION_DIALOG=Cancelling this operation will stop the re-installation of your plug-ins. Are you sure you want to cancel?
ImportFromInstallationPag_LATER_BUTTON=Yes, remind me later \ No newline at end of file

Back to the top