Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 88333 Details for
Bug 215914
[prov] Enabling / disabling old update UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Enable/Disable Old Update UI v01
patch-oldUpdateManager_v01.txt (text/plain), 14.95 KB, created by
Tim Mok
on 2008-01-30 16:51:47 EST
(
hide
)
Description:
Enable/Disable Old Update UI v01
Filename:
MIME Type:
Creator:
Tim Mok
Created:
2008-01-30 16:51:47 EST
Size:
14.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.ui.sdk >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties,v >retrieving revision 1.16 >diff -u -r1.16 messages.properties >--- src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties 30 Jan 2008 19:42:19 -0000 1.16 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties 30 Jan 2008 21:43:28 -0000 >@@ -94,3 +94,4 @@ > ProvisioningPreferencePage_enableGC=Automatically delete unused files > ProvisioningPreferencePage_gcImmediately=Delete unused files immediately > ProvisioningPreferencePage_gcRetentionTime=Keep unused files for ??? >+ProvisioningPreferencePage_oldUpdateUI=Use update manager interface >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java,v >retrieving revision 1.15 >diff -u -r1.15 ProvSDKMessages.java >--- src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java 30 Jan 2008 19:42:19 -0000 1.15 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java 30 Jan 2008 21:43:28 -0000 >@@ -107,6 +107,7 @@ > public static String ProvisioningPreferencePage_enableGC; > public static String ProvisioningPreferencePage_gcImmediately; > public static String ProvisioningPreferencePage_gcRetentionTime; >+ public static String ProvisioningPreferencePage_oldUpdateUI; > public static String ProvSDKUIActivator_ErrorWritingLicenseRegistry; > public static String ProvSDKUIActivator_LicenseManagerReadError; > public static String ProvSDKUIActivator_NoSelfProfile; >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/plugin.properties,v >retrieving revision 1.4 >diff -u -r1.4 plugin.properties >--- plugin.properties 30 Jan 2008 00:48:05 -0000 1.4 >+++ plugin.properties 30 Jan 2008 21:43:28 -0000 >@@ -18,6 +18,9 @@ > IU.copyright=Copyright > Repository.name=General Information > Update.command=Software Updates (Incubation)... >+OldUpdate.menu=Software Updates >+OldUpdate.FindAndInstall.command=Find and Install... >+OldUpdate.ManageConfiguration.command=Manage Configuration > automaticUpdatesPrefPage = Automatic Updates > provisioningPrefPage = Install/Update > preferenceKeywords.general=automatic update schedule download software install >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/plugin.xml,v >retrieving revision 1.10 >diff -u -r1.10 plugin.xml >--- plugin.xml 30 Jan 2008 00:48:05 -0000 1.10 >+++ plugin.xml 30 Jan 2008 21:43:28 -0000 >@@ -1,6 +1,7 @@ > <?xml version="1.0" encoding="UTF-8"?> > <?eclipse version="3.2"?> >-<plugin> >+<plugin >+> > <extension > id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences"> > <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/> >@@ -84,16 +85,20 @@ > <extension > point="org.eclipse.ui.commands"> > <command >- name="%Update.command" >- id="org.eclipse.equinox.p2.ui.sdk.update"> >+ defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler" >+ id="org.eclipse.equinox.p2.ui.sdk.update" >+ name="%Update.command"> >+ </command> >+ <command >+ defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.FindAndInstallHandler" >+ id="org.eclipse.equinox.p2.ui.sdk.oldUpdate.FindAndInstall" >+ name="%OldUpdate.FindAndInstall.command"> >+ </command> >+ <command >+ defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.ManageConfigurationHandler" >+ id="org.eclipse.equinox.p2.ui.sdk.oldUpdate.ManageConfiguration" >+ name="%OldUpdate.ManageConfiguration.command"> > </command> >- </extension> >- <extension >- point="org.eclipse.ui.handlers"> >- <handler >- commandId="org.eclipse.equinox.p2.ui.sdk.update" >- class="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler"> >- </handler> > </extension> > <extension > point="org.eclipse.ui.menus"> >@@ -103,7 +108,44 @@ > commandId="org.eclipse.equinox.p2.ui.sdk.update" > id="org.eclipse.equinox.p2.ui.sdk.update"> > </command> >+ <menu >+ label="%OldUpdate.menu"> >+ <command >+ commandId="org.eclipse.equinox.p2.ui.sdk.oldUpdate.FindAndInstall" >+ style="push"> >+ </command> >+ <command >+ commandId="org.eclipse.equinox.p2.ui.sdk.oldUpdate.ManageConfiguration" >+ style="push"> >+ </command> >+ <visibleWhen >+ checkEnabled="false"> >+ <and> >+ <test >+ forcePluginActivation="true" >+ property="org.eclipse.equinox.p2.ui.sdk.oldUpdate" >+ value="true"> >+ </test> >+ <with >+ variable="activePart"> >+ <instanceof >+ value="org.eclipse.ui.IWorkbenchPart"> >+ </instanceof> >+ </with> >+ </and> >+ </visibleWhen> >+ </menu> > </menuContribution> > </extension> >+ <extension >+ point="org.eclipse.core.expressions.propertyTesters"> >+ <propertyTester >+ class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.OldUpdateTester" >+ id="org.eclipse.equinox.p2.ui.sdk.oldUpdate" >+ namespace="org.eclipse.equinox.p2.ui.sdk" >+ properties="oldUpdate" >+ type="java.lang.Object"> >+ </propertyTester> >+ </extension> > > </plugin> >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java,v >retrieving revision 1.4 >diff -u -r1.4 ProvisioningPreferencePage.java >--- src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java 28 Nov 2007 19:37:19 -0000 1.4 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java 30 Jan 2008 21:43:28 -0000 >@@ -36,6 +36,7 @@ > private Button garbageCollectorCheck; > private Button deleteImmediatelyRadio, scheduleRadio; > private Button showLatestRadio, showAllRadio; >+ private Button oldUpdateUICheck; > private static final int INDENT = 30; > > protected Control createContents(Composite parent) { >@@ -116,6 +117,12 @@ > } > }); > >+ oldUpdateUICheck = new Button(container, SWT.CHECK); >+ oldUpdateUICheck.setText(ProvSDKMessages.ProvisioningPreferencePage_oldUpdateUI); >+ gd = new GridData(); >+ gd.horizontalSpan = 2; >+ oldUpdateUICheck.setLayoutData(gd); >+ > initialize(); > > Dialog.applyDialogFont(container); >@@ -130,6 +137,7 @@ > deleteImmediatelyRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY)); > showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION)); > showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION)); >+ oldUpdateUICheck.setSelection(pref.getBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER)); > pageChanged(); > } > >@@ -148,6 +156,7 @@ > scheduleRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY)); > showLatestRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION)); > showAllRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION)); >+ oldUpdateUICheck.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER)); > pageChanged(); > } > >@@ -156,6 +165,7 @@ > pref.setValue(PreferenceConstants.PREF_ENABLE_GC, garbageCollectorCheck.getSelection()); > pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection()); > pref.setValue(PreferenceConstants.PREF_GC_IMMEDIATELY, deleteImmediatelyRadio.getSelection()); >+ pref.setValue(PreferenceConstants.PREF_OLD_UPDATE_MANAGER, oldUpdateUICheck.getSelection()); > ProvSDKUIActivator.getDefault().savePluginPreferences(); > return true; > } >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java,v >retrieving revision 1.5 >diff -u -r1.5 PreferenceConstants.java >--- src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java 30 Nov 2007 00:12:56 -0000 1.5 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java 30 Jan 2008 21:43:28 -0000 >@@ -26,4 +26,5 @@ > public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$ > public static final String PREF_ENABLE_GC = "enableArtifactGC"; //$NON-NLS-1$ > public static final String PREF_GC_IMMEDIATELY = "gcUnusedFilesImmediately"; //$NON-NLS-1$ >+ public static final String PREF_OLD_UPDATE_MANAGER = "oldUpdateManager"; //$NON-NLS-1$ > } >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/equinox-incubator/provisioning/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF,v >retrieving revision 1.9 >diff -u -r1.9 MANIFEST.MF >--- META-INF/MANIFEST.MF 28 Jan 2008 16:00:09 -0000 1.9 >+++ META-INF/MANIFEST.MF 30 Jan 2008 21:43:28 -0000 >@@ -34,7 +34,9 @@ > org.eclipse.equinox.internal.p2.ui.sdk.updates;x-internal:=true, > org.eclipse.equinox.p2.ui.sdk > Require-Bundle: org.eclipse.ui, >- org.eclipse.core.runtime >+ org.eclipse.core.runtime, >+ org.eclipse.update.ui;bundle-version="3.2.100", >+ org.eclipse.core.expressions > Eclipse-LazyStart: true > Bundle-RequiredExecutionEnvironment: J2SE-1.4, > CDC-1.1/Foundation-1.1 >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/ManageConfigurationHandler.java >=================================================================== >RCS file: src/org/eclipse/equinox/internal/p2/ui/sdk/ManageConfigurationHandler.java >diff -N src/org/eclipse/equinox/internal/p2/ui/sdk/ManageConfigurationHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/ManageConfigurationHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.equinox.internal.p2.ui.sdk; >+ >+import org.eclipse.core.commands.*; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.handlers.HandlerUtil; >+import org.eclipse.update.ui.UpdateManagerUI; >+ >+public class ManageConfigurationHandler extends AbstractHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); >+ if (window == null) { >+ return null; >+ } >+ UpdateManagerUI.openConfigurationManager(window.getShell()); >+ return null; >+ } >+ >+} >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/FindAndInstallHandler.java >=================================================================== >RCS file: src/org/eclipse/equinox/internal/p2/ui/sdk/FindAndInstallHandler.java >diff -N src/org/eclipse/equinox/internal/p2/ui/sdk/FindAndInstallHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/FindAndInstallHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,32 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.equinox.internal.p2.ui.sdk; >+ >+import org.eclipse.core.commands.*; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.handlers.HandlerUtil; >+import org.eclipse.update.ui.UpdateManagerUI; >+ >+/** >+ * >+ */ >+public class FindAndInstallHandler extends AbstractHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); >+ if (window == null) { >+ return null; >+ } >+ UpdateManagerUI.openInstaller(window.getShell()); >+ return null; >+ } >+ >+} >Index: src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/OldUpdateTester.java >=================================================================== >RCS file: src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/OldUpdateTester.java >diff -N src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/OldUpdateTester.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/OldUpdateTester.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,23 @@ >+package org.eclipse.equinox.internal.p2.ui.sdk.prefs; >+ >+import org.eclipse.core.expressions.PropertyTester; >+import org.eclipse.core.runtime.Preferences; >+import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator; >+ >+public class OldUpdateTester extends PropertyTester { >+ >+ private static final String OLD_UPDATE = "oldUpdate"; //$NON-NLS-1$ >+ >+ public OldUpdateTester() { >+ super(); >+ } >+ >+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { >+ if (property.equals(OLD_UPDATE)) { >+ Preferences pref = ProvSDKUIActivator.getDefault().getPluginPreferences(); >+ return pref.getBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER); >+ } >+ return false; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215914
:
88333
|
88782
|
89320
|
90390
|
90391
|
90680