Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 215914 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (+13 lines)
Lines 57-60 Link Here
57
            label="%preferenceKeywords.general"
57
            label="%preferenceKeywords.general"
58
            id="org.eclipse.update.ui.general"/>
58
            id="org.eclipse.update.ui.general"/>
59
      </extension>
59
      </extension>
60
61
   <extension
62
         point="org.eclipse.ui.handlers">
63
      <handler
64
            class="org.eclipse.update.internal.ui.views.ManageConfigurationHandler"
65
            commandId="org.eclipse.ui.update.manageConfiguration">
66
      </handler>
67
      <handler
68
            class="org.eclipse.update.internal.ui.views.FindAndInstallHandler"
69
            commandId="org.eclipse.ui.update.findAndInstallUpdates">
70
      </handler>
71
   </extension>
72
60
</plugin>
73
</plugin>
(-)src/org/eclipse/update/internal/ui/views/FindAndInstallHandler.java (+33 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.update.internal.ui.views;
12
13
import org.eclipse.core.commands.*;
14
import org.eclipse.swt.widgets.Shell;
15
import org.eclipse.ui.handlers.HandlerUtil;
16
import org.eclipse.update.ui.UpdateManagerUI;
17
18
/**
19
 * This handler is hooked to a command provided by the application (such
20
 * as org.eclipse.ui.ide). This allows RCP applications to control how update
21
 * functionality is surfaced.
22
 */
23
public class FindAndInstallHandler extends AbstractHandler {
24
25
	/* (non-Javadoc)
26
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
27
	 */
28
	public Object execute(ExecutionEvent event) throws ExecutionException {
29
		UpdateManagerUI.openInstaller(HandlerUtil.getActiveShell(event));
30
		return null;
31
	}
32
33
}
(-)src/org/eclipse/update/internal/ui/views/ManageConfigurationHandler.java (+32 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.update.internal.ui.views;
12
13
import org.eclipse.core.commands.*;
14
import org.eclipse.ui.handlers.HandlerUtil;
15
import org.eclipse.update.ui.UpdateManagerUI;
16
17
/**
18
 * This handler is hooked to a command provided by the application (such
19
 * as org.eclipse.ui.ide). This allows RCP applications to control how update
20
 * functionality is surfaced.
21
 */
22
public class ManageConfigurationHandler extends AbstractHandler {
23
24
	/* (non-Javadoc)
25
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
26
	 */
27
	public Object execute(ExecutionEvent event) throws ExecutionException {
28
		UpdateManagerUI.openConfigurationManager(HandlerUtil.getActiveShell(event));
29
		return null;
30
	}
31
32
}
(-)plugin.properties (-6 / +5 lines)
Lines 190-200 Link Here
190
command.showResourceByPath.description= Show a resource in the Navigator given its path
190
command.showResourceByPath.description= Show a resource in the Navigator given its path
191
commandParameter.showResourceByPath.resourcePath.name= Resource Path
191
commandParameter.showResourceByPath.resourcePath.name= Resource Path
192
192
193
UpdateActionSet.label = Software Updates
194
UpdateActionSet.menu.label = &Software Updates
195
UpdateActionSet.updates.label = &Find and Install...
196
UpdateActionSet.configManager.label = &Manage Configuration
197
198
KeyBindingActionSet.label = Keyboard Shortcuts
193
KeyBindingActionSet.label = Keyboard Shortcuts
199
KeyBindingActionSet.showKeyAssist.label = &Key Assist...
194
KeyBindingActionSet.showKeyAssist.label = &Key Assist...
200
195
Lines 276-279 Link Here
276
PreferenceTransfer.BookmarksConfigurations = Bookmarks View Configuration
271
PreferenceTransfer.BookmarksConfigurations = Bookmarks View Configuration
277
PreferenceTransfer.BookmarksConfigurations.Description = All configurations set in the bookmarks view.
272
PreferenceTransfer.BookmarksConfigurations.Description = All configurations set in the bookmarks view.
278
PreferenceTransfer.AllMarkersConfigurations = All Markers View Configuration
273
PreferenceTransfer.AllMarkersConfigurations = All Markers View Configuration
279
PreferenceTransfer.AllMarkersConfigurations.Description = All configurations set in the all markers view.
274
PreferenceTransfer.AllMarkersConfigurations.Description = All configurations set in the all markers view.
275
276
updateMenu.label = &Software Updates
277
actionSets.updates.label = &Find and Install...
278
actionSets.configManager.label = &Manage Configuration...
(-)plugin.xml (-38 / +19 lines)
Lines 984-1026 Link Here
984
984
985
<!-- Update Actions -->
985
<!-- Update Actions -->
986
   <extension
986
   <extension
987
         point="org.eclipse.ui.actionSets">
988
      <actionSet
989
            label="%UpdateActionSet.label"
990
            visible="true"
991
            id="org.eclipse.update.ui.softwareUpdates">
992
         <menu
993
               label="%UpdateActionSet.menu.label"
994
               path="help/group.updates"
995
               id="org.eclipse.update.ui.updateMenu">
996
            <separator
997
                  name="group0">
998
            </separator>
999
            <separator
1000
                  name="group1">
1001
            </separator>
1002
         </menu>
1003
         <action
1004
               class="org.eclipse.ui.internal.ide.update.ConfigurationManagerAction"
1005
               definitionId="org.eclipse.ui.update.manageConfiguration"
1006
               helpContextId="org.eclipse.update.ui.newUpdates"
1007
               icon="$nl$/icons/full/elcl16/configs.gif"
1008
               id="org.eclipse.update.ui.configManager"
1009
               label="%UpdateActionSet.configManager.label"
1010
               menubarPath="help/org.eclipse.update.ui.updateMenu/group0">
1011
         </action>
1012
         <action
1013
               class="org.eclipse.ui.internal.ide.update.InstallWizardAction"
1014
               definitionId="org.eclipse.ui.update.findAndInstallUpdates"
1015
               helpContextId="org.eclipse.update.ui.newUpdates"
1016
               icon="$nl$/icons/full/elcl16/usearch_obj.gif"
1017
               id="org.eclipse.update.ui.newUpdates"
1018
               label="%UpdateActionSet.updates.label"
1019
               menubarPath="help/org.eclipse.update.ui.updateMenu/group0">
1020
         </action>
1021
      </actionSet>
1022
   </extension>
1023
   <extension
1024
         point="org.eclipse.core.runtime.preferences">
987
         point="org.eclipse.core.runtime.preferences">
1025
      <initializer class="org.eclipse.ui.internal.ide.IDEPreferenceInitializer"/>
988
      <initializer class="org.eclipse.ui.internal.ide.IDEPreferenceInitializer"/>
1026
   </extension>
989
   </extension>
Lines 1982-1987 Link Here
1982
            </parameter>
1945
            </parameter>
1983
         </command>
1946
         </command>
1984
      </menuContribution>
1947
      </menuContribution>
1948
       <menuContribution
1949
             locationURI="menu:help?after=additions">
1950
       <menu label="%updateMenu.label">
1951
               <command
1952
                     commandId="org.eclipse.ui.update.findAndInstallUpdates"
1953
                     helpContextId="org.eclipse.update.ui.newUpdates"
1954
                     icon="icons/elcl16/usearch_obj.gif"
1955
                     label="%actionSets.updates.label"
1956
                     style="push">
1957
               </command>
1958
               <command
1959
                     commandId="org.eclipse.ui.update.manageConfiguration"
1960
                     helpContextId="org.eclipse.update.ui.newUpdates"
1961
                     icon="icons/elcl16/configs.gif"
1962
                     label="%actionSets.configManager.label"
1963
                     style="push">
1964
               </command>
1965
       </menu>
1966
       </menuContribution>
1985
   </extension>
1967
   </extension>
1986
   <extension
1968
   <extension
1987
         point="org.eclipse.ui.handlers">
1969
         point="org.eclipse.ui.handlers">
Lines 2188-2192 Link Here
2188
            type="org.eclipse.ui.internal.views.markers.ExtendedMarkersView">
2170
            type="org.eclipse.ui.internal.views.markers.ExtendedMarkersView">
2189
      </propertyTester>
2171
      </propertyTester>
2190
   </extension>
2172
   </extension>
2191
   
2192
</plugin>
2173
</plugin>
(-)plugin.xml (+33 lines)
Lines 105-109 Link Here
105
            </command>
105
            </command>
106
      </menuContribution>
106
      </menuContribution>
107
   </extension>
107
   </extension>
108
   <extension
109
         point="org.eclipse.ui.activities">
110
      <activity
111
            description="Enables classic update functionality"
112
            id="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
113
            name="Classic Update">
114
      </activity>
115
      <activityPatternBinding
116
            activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
117
            isEqualityPattern="false"
118
            pattern=".*org\.eclipse\.update\.ui.*">
119
      </activityPatternBinding>
120
      <activityPatternBinding
121
            activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
122
            isEqualityPattern="false"
123
            pattern=".*org\.eclipse\.ui\.update.*">
124
      </activityPatternBinding>
125
      <category
126
            description="Enables classic update functionality"
127
            id="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate"
128
            name="Classic Update">
129
      </category>
130
      <categoryActivityBinding
131
            activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
132
            categoryId="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate">
133
      </categoryActivityBinding>
134
   </extension>
135
   <extension
136
         point="org.eclipse.core.runtime.preferences">
137
      <initializer
138
            class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.ClassicUpdateInitializer">
139
      </initializer>
140
   </extension>
108
141
109
</plugin>
142
</plugin>
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ClassicUpdateInitializer.java (+42 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
12
13
import java.util.HashSet;
14
import java.util.Set;
15
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
16
import org.eclipse.ui.IWorkbench;
17
import org.eclipse.ui.PlatformUI;
18
import org.eclipse.ui.activities.IMutableActivityManager;
19
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
20
21
public class ClassicUpdateInitializer extends AbstractPreferenceInitializer {
22
23
	private static final String ACTIVITY_ID = "org.eclipse.equinox.p2.ui.sdk.classicUpdate"; //$NON-NLS-1$
24
25
	public void initializeDefaultPreferences() {
26
		IWorkbench workbench = PlatformUI.getWorkbench();
27
		if (workbench == null) {
28
			return;
29
		}
30
		final IWorkbenchActivitySupport activitySupport = workbench.getActivitySupport();
31
		IMutableActivityManager createWorkingCopy = activitySupport.createWorkingCopy();
32
		Set activityIds = createWorkingCopy.getEnabledActivityIds();
33
		final Set enabledActivityIds = new HashSet(activityIds);
34
		enabledActivityIds.remove(ACTIVITY_ID);
35
		workbench.getDisplay().asyncExec(new Runnable() {
36
			public void run() {
37
				//activity change listeners may touch widgets
38
				activitySupport.setEnabledActivityIds(enabledActivityIds);
39
			}
40
		});
41
	}
42
}

Return to bug 215914