Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Georgi2014-04-15 15:47:46 +0000
committerPascal Rapicault2014-04-22 18:47:32 +0000
commit98b51fa43286c184fdbdacd4b48d3525bb80f1f0 (patch)
treecd68847e14b5a0854e5539d5475d47367e853d57
parent94998c840096409b55ee1d9e7ec2b72921dbc262 (diff)
downloadrt.equinox.p2-98b51fa43286c184fdbdacd4b48d3525bb80f1f0.tar.gz
rt.equinox.p2-98b51fa43286c184fdbdacd4b48d3525bb80f1f0.tar.xz
rt.equinox.p2-98b51fa43286c184fdbdacd4b48d3525bb80f1f0.zip
Add setting to show update wizard w/o notification popupI20140505-2000
Since the "Updates Available" popup is not found by screen readers due to its amodality, add an option to directly show the update wizard. Visually impaired people can turn this on to get notified about updates. Bug: 432887 Change-Id: Ib4d45bb587b75f03353f2195e87396d1dfafcc0a Signed-off-by: Christian Georgi <christian.georgi@sap.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties4
6 files changed, 41 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
index 17be7f356..bbfd89c03 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
@@ -71,6 +72,7 @@ public class AutomaticUpdateMessages extends NLS {
public static String AutomaticUpdatesPreferencePage_UpdateSchedule;
public static String AutomaticUpdatesPreferencePage_findOnStart;
public static String AutomaticUpdatesPreferencePage_findOnSchedule;
+ public static String AutomaticUpdatesPreferencePage_directlyShowUpdateWizard;
public static String AutomaticUpdatesPreferencePage_downloadOptions;
public static String AutomaticUpdatesPreferencePage_searchAndNotify;
public static String AutomaticUpdatesPreferencePage_downloadAndNotify;
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 40273866f..904ee9d70 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Sonatype, Inc. - ongoing development
+ * Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
@@ -97,6 +98,8 @@ public class AutomaticUpdater implements IUpdateListener {
validateIusToUpdate();
alreadyDownloaded = false;
+ final boolean showUpdateWizard = getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_UPDATE_WIZARD);
+
// Create an update operation to reflect the new updates that are available.
operation = new UpdateOperation(getSession(), iusWithUpdates);
operation.setProfileId(event.getProfileId());
@@ -127,7 +130,7 @@ public class AutomaticUpdater implements IUpdateListener {
alreadyDownloaded = true;
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
+ notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup, showUpdateWizard);
}
});
} else if (jobStatus.getSeverity() != IStatus.CANCEL) {
@@ -139,7 +142,7 @@ public class AutomaticUpdater implements IUpdateListener {
} else {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
+ notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup, showUpdateWizard);
}
});
}
@@ -263,12 +266,16 @@ public class AutomaticUpdater implements IUpdateListener {
}
}
- void notifyUserOfUpdates(boolean isValid, boolean showPopup) {
+ void notifyUserOfUpdates(boolean isValid, boolean showPopup, boolean showUpdateWizard) {
if (updateAffordance == null)
createUpdateAffordance();
if (isValid) {
- if (showPopup)
- openUpdatePopup();
+ if (showPopup) {
+ if (showUpdateWizard)
+ launchUpdate();
+ else
+ openUpdatePopup();
+ }
updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE)));
} else {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
index db602870f..b590e9748 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,12 +8,14 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
+ * Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.osgi.util.NLS;
@@ -34,6 +36,7 @@ import org.eclipse.ui.*;
public class AutomaticUpdatesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private Button enabledCheck;
+ private Button showUpdateWizard;
private Button onStartupRadio, onScheduleRadio;
private Combo dayCombo;
private Label atLabel;
@@ -177,8 +180,13 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements IW
gd = new GridData();
gd.widthHint = 200;
gd.horizontalIndent = 30;
+ gd.horizontalSpan = 3;
remindElapseCombo.setLayoutData(gd);
+ showUpdateWizard = new Button(remindGroup, SWT.CHECK);
+ showUpdateWizard.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_directlyShowUpdateWizard);
+ GridDataFactory.fillDefaults().span(3, 1).grab(true, false).applyTo(showUpdateWizard);
+
initialize();
enabledCheck.addSelectionListener(new SelectionAdapter() {
@@ -211,6 +219,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements IW
remindElapseCombo.setText(AutomaticUpdatesPopup.getElapsedTimeString(pref.getString(PreferenceConstants.PREF_REMIND_ELAPSED)));
searchOnlyRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
searchAndDownloadRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+ showUpdateWizard.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_UPDATE_WIZARD));
pageChanged();
}
@@ -237,6 +246,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements IW
remindScheduleRadio.setEnabled(master);
remindOnceRadio.setEnabled(master);
remindElapseCombo.setEnabled(master && remindScheduleRadio.getSelection());
+ showUpdateWizard.setEnabled(master);
}
protected void performDefaults() {
@@ -256,6 +266,9 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements IW
searchOnlyRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
searchAndDownloadRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+
+ showUpdateWizard.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_UPDATE_WIZARD));
+
pageChanged();
}
@@ -282,6 +295,8 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements IW
pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY, searchAndDownloadRadio.getSelection());
+ pref.setValue(PreferenceConstants.PREF_SHOW_UPDATE_WIZARD, showUpdateWizard.getSelection());
+
AutomaticUpdatePlugin.getDefault().savePreferences();
AutomaticUpdatePlugin.getDefault().getScheduler().rescheduleUpdate();
return true;
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
index 398c7da78..72cf7f193 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
+ * Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
@@ -21,6 +22,7 @@ public class PreferenceConstants {
public static final String PREF_UPDATE_ON_STARTUP = "on-startup"; //$NON-NLS-1$
public static final String PREF_UPDATE_ON_SCHEDULE = "on-schedule"; //$NON-NLS-1$ // string value defined in AutomaticUpdateScheduler
public static final String PREF_DOWNLOAD_ONLY = "download"; // value is true or false, default is false //$NON-NLS-1$
+ public static final String PREF_SHOW_UPDATE_WIZARD = "showUpdateWizard"; // value is true or false, default is false //$NON-NLS-1$
public static final String PREF_REMIND_SCHEDULE = "remindOnSchedule"; // value is true or false //$NON-NLS-1$
public static final String PREF_REMIND_ELAPSED = "remindElapsedTime";//$NON-NLS-1$
public static final String PREF_REMIND_30Minutes = "30 minutes";//$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
index 4cc0bea98..a3beaf75e 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
+ * Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
@@ -169,5 +170,6 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
node.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, false);
node.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, false);
node.put(PreferenceConstants.PREF_REMIND_ELAPSED, PreferenceConstants.PREF_REMIND_30Minutes);
+ node.putBoolean(PreferenceConstants.PREF_SHOW_UPDATE_WIZARD, false);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
index 497a0e695..2d305546a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
+# Copyright (c) 2007, 2014 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Christian Georgi <christian.georgi@sap.com> - Bug 432887 - Setting to show update wizard w/o notification popup
###############################################################################
@@ -57,6 +58,7 @@ AutomaticUpdater_ClickToReviewUpdatesWithProblems=Updates are available, but the
AutomaticUpdatesPreferencePage_UpdateSchedule=&Update schedule
AutomaticUpdatesPreferencePage_findOnStart=Look for u&pdates each time {0} is started
AutomaticUpdatesPreferencePage_findOnSchedule=Look for updates on the following &schedule:
+AutomaticUpdatesPreferencePage_directlyShowUpdateWizard=&Directly show update wizard
AutomaticUpdatesPreferencePage_downloadOptions=&Download options
AutomaticUpdatesPreferencePage_searchAndNotify=Search for updates and &notify me when they are available
AutomaticUpdatesPreferencePage_downloadAndNotify=Down&load new updates automatically and notify me when ready to install them

Back to the top