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

(-)src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties (+1 lines)
Lines 94-96 Link Here
94
ProvisioningPreferencePage_enableGC=Automatically delete unused files
94
ProvisioningPreferencePage_enableGC=Automatically delete unused files
95
ProvisioningPreferencePage_gcImmediately=Delete unused files immediately
95
ProvisioningPreferencePage_gcImmediately=Delete unused files immediately
96
ProvisioningPreferencePage_gcRetentionTime=Keep unused files for ???
96
ProvisioningPreferencePage_gcRetentionTime=Keep unused files for ???
97
ProvisioningPreferencePage_oldUpdateUI=Use update manager interface
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java (+1 lines)
Lines 107-112 Link Here
107
	public static String ProvisioningPreferencePage_enableGC;
107
	public static String ProvisioningPreferencePage_enableGC;
108
	public static String ProvisioningPreferencePage_gcImmediately;
108
	public static String ProvisioningPreferencePage_gcImmediately;
109
	public static String ProvisioningPreferencePage_gcRetentionTime;
109
	public static String ProvisioningPreferencePage_gcRetentionTime;
110
	public static String ProvisioningPreferencePage_oldUpdateUI;
110
	public static String ProvSDKUIActivator_ErrorWritingLicenseRegistry;
111
	public static String ProvSDKUIActivator_ErrorWritingLicenseRegistry;
111
	public static String ProvSDKUIActivator_LicenseManagerReadError;
112
	public static String ProvSDKUIActivator_LicenseManagerReadError;
112
	public static String ProvSDKUIActivator_NoSelfProfile;
113
	public static String ProvSDKUIActivator_NoSelfProfile;
(-)plugin.properties (+3 lines)
Lines 18-23 Link Here
18
IU.copyright=Copyright
18
IU.copyright=Copyright
19
Repository.name=General Information
19
Repository.name=General Information
20
Update.command=Software Updates (Incubation)...
20
Update.command=Software Updates (Incubation)...
21
OldUpdate.menu=Software Updates
22
OldUpdate.FindAndInstall.command=Find and Install...
23
OldUpdate.ManageConfiguration.command=Manage Configuration
21
automaticUpdatesPrefPage = Automatic Updates
24
automaticUpdatesPrefPage = Automatic Updates
22
provisioningPrefPage = Install/Update
25
provisioningPrefPage = Install/Update
23
preferenceKeywords.general=automatic update schedule download software install
26
preferenceKeywords.general=automatic update schedule download software install
(-)plugin.xml (-10 / +52 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.2"?>
2
<?eclipse version="3.2"?>
3
<plugin>
3
<plugin
4
>
4
   	<extension 
5
   	<extension 
5
   		id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
6
   		id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
6
		<initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
7
		<initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
Lines 84-99 Link Here
84
   <extension
85
   <extension
85
         point="org.eclipse.ui.commands">
86
         point="org.eclipse.ui.commands">
86
      <command
87
      <command
87
            name="%Update.command"
88
            defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler"
88
            id="org.eclipse.equinox.p2.ui.sdk.update">
89
            id="org.eclipse.equinox.p2.ui.sdk.update"
90
            name="%Update.command">
91
      </command>
92
      <command
93
            defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.FindAndInstallHandler"
94
            id="org.eclipse.equinox.p2.ui.sdk.oldUpdate.FindAndInstall"
95
            name="%OldUpdate.FindAndInstall.command">
96
      </command>
97
      <command
98
            defaultHandler="org.eclipse.equinox.internal.p2.ui.sdk.ManageConfigurationHandler"
99
            id="org.eclipse.equinox.p2.ui.sdk.oldUpdate.ManageConfiguration"
100
            name="%OldUpdate.ManageConfiguration.command">
89
      </command>
101
      </command>
90
   </extension>
91
   <extension
92
         point="org.eclipse.ui.handlers">
93
      <handler
94
            commandId="org.eclipse.equinox.p2.ui.sdk.update"
95
            class="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler">
96
      </handler>
97
   </extension>
102
   </extension>
98
   <extension
103
   <extension
99
         point="org.eclipse.ui.menus">
104
         point="org.eclipse.ui.menus">
Lines 103-109 Link Here
103
                  commandId="org.eclipse.equinox.p2.ui.sdk.update"
108
                  commandId="org.eclipse.equinox.p2.ui.sdk.update"
104
                  id="org.eclipse.equinox.p2.ui.sdk.update">
109
                  id="org.eclipse.equinox.p2.ui.sdk.update">
105
            </command>
110
            </command>
111
            <menu
112
                  label="%OldUpdate.menu">
113
               <command
114
                     commandId="org.eclipse.equinox.p2.ui.sdk.oldUpdate.FindAndInstall"
115
                     style="push">
116
               </command>
117
               <command
118
                     commandId="org.eclipse.equinox.p2.ui.sdk.oldUpdate.ManageConfiguration"
119
                     style="push">
120
               </command>
121
               <visibleWhen
122
                     checkEnabled="false">
123
                  <and>
124
                     <test
125
                           forcePluginActivation="true"
126
                           property="org.eclipse.equinox.p2.ui.sdk.oldUpdate"
127
                           value="true">
128
                     </test>
129
                     <with
130
                           variable="activePart">
131
                        <instanceof
132
                              value="org.eclipse.ui.IWorkbenchPart">
133
                        </instanceof>
134
                     </with>
135
                  </and>
136
               </visibleWhen>
137
            </menu>
106
      </menuContribution>
138
      </menuContribution>
107
   </extension>
139
   </extension>
140
   <extension
141
         point="org.eclipse.core.expressions.propertyTesters">
142
      <propertyTester
143
            class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.OldUpdateTester"
144
            id="org.eclipse.equinox.p2.ui.sdk.oldUpdate"
145
            namespace="org.eclipse.equinox.p2.ui.sdk"
146
            properties="oldUpdate"
147
            type="java.lang.Object">
148
      </propertyTester>
149
   </extension>
108
150
109
</plugin>
151
</plugin>
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java (+10 lines)
Lines 36-41 Link Here
36
	private Button garbageCollectorCheck;
36
	private Button garbageCollectorCheck;
37
	private Button deleteImmediatelyRadio, scheduleRadio;
37
	private Button deleteImmediatelyRadio, scheduleRadio;
38
	private Button showLatestRadio, showAllRadio;
38
	private Button showLatestRadio, showAllRadio;
39
	private Button oldUpdateUICheck;
39
	private static final int INDENT = 30;
40
	private static final int INDENT = 30;
40
41
41
	protected Control createContents(Composite parent) {
42
	protected Control createContents(Composite parent) {
Lines 116-121 Link Here
116
			}
117
			}
117
		});
118
		});
118
119
120
		oldUpdateUICheck = new Button(container, SWT.CHECK);
121
		oldUpdateUICheck.setText(ProvSDKMessages.ProvisioningPreferencePage_oldUpdateUI);
122
		gd = new GridData();
123
		gd.horizontalSpan = 2;
124
		oldUpdateUICheck.setLayoutData(gd);
125
119
		initialize();
126
		initialize();
120
127
121
		Dialog.applyDialogFont(container);
128
		Dialog.applyDialogFont(container);
Lines 130-135 Link Here
130
		deleteImmediatelyRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY));
137
		deleteImmediatelyRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY));
131
		showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
138
		showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
132
		showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
139
		showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
140
		oldUpdateUICheck.setSelection(pref.getBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER));
133
		pageChanged();
141
		pageChanged();
134
	}
142
	}
135
143
Lines 148-153 Link Here
148
		scheduleRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY));
156
		scheduleRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_GC_IMMEDIATELY));
149
		showLatestRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
157
		showLatestRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
150
		showAllRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
158
		showAllRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
159
		oldUpdateUICheck.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER));
151
		pageChanged();
160
		pageChanged();
152
	}
161
	}
153
162
Lines 156-161 Link Here
156
		pref.setValue(PreferenceConstants.PREF_ENABLE_GC, garbageCollectorCheck.getSelection());
165
		pref.setValue(PreferenceConstants.PREF_ENABLE_GC, garbageCollectorCheck.getSelection());
157
		pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
166
		pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
158
		pref.setValue(PreferenceConstants.PREF_GC_IMMEDIATELY, deleteImmediatelyRadio.getSelection());
167
		pref.setValue(PreferenceConstants.PREF_GC_IMMEDIATELY, deleteImmediatelyRadio.getSelection());
168
		pref.setValue(PreferenceConstants.PREF_OLD_UPDATE_MANAGER, oldUpdateUICheck.getSelection());
159
		ProvSDKUIActivator.getDefault().savePluginPreferences();
169
		ProvSDKUIActivator.getDefault().savePluginPreferences();
160
		return true;
170
		return true;
161
	}
171
	}
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java (+1 lines)
Lines 26-29 Link Here
26
	public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
26
	public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
27
	public static final String PREF_ENABLE_GC = "enableArtifactGC"; //$NON-NLS-1$
27
	public static final String PREF_ENABLE_GC = "enableArtifactGC"; //$NON-NLS-1$
28
	public static final String PREF_GC_IMMEDIATELY = "gcUnusedFilesImmediately"; //$NON-NLS-1$
28
	public static final String PREF_GC_IMMEDIATELY = "gcUnusedFilesImmediately"; //$NON-NLS-1$
29
	public static final String PREF_OLD_UPDATE_MANAGER = "oldUpdateManager"; //$NON-NLS-1$
29
}
30
}
(-)META-INF/MANIFEST.MF (-1 / +3 lines)
Lines 34-40 Link Here
34
 org.eclipse.equinox.internal.p2.ui.sdk.updates;x-internal:=true,
34
 org.eclipse.equinox.internal.p2.ui.sdk.updates;x-internal:=true,
35
 org.eclipse.equinox.p2.ui.sdk
35
 org.eclipse.equinox.p2.ui.sdk
36
Require-Bundle: org.eclipse.ui,
36
Require-Bundle: org.eclipse.ui,
37
 org.eclipse.core.runtime
37
 org.eclipse.core.runtime,
38
 org.eclipse.update.ui;bundle-version="3.2.100",
39
 org.eclipse.core.expressions
38
Eclipse-LazyStart: true
40
Eclipse-LazyStart: true
39
Bundle-RequiredExecutionEnvironment: J2SE-1.4,
41
Bundle-RequiredExecutionEnvironment: J2SE-1.4,
40
 CDC-1.1/Foundation-1.1
42
 CDC-1.1/Foundation-1.1
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/ManageConfigurationHandler.java (+29 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;
12
13
import org.eclipse.core.commands.*;
14
import org.eclipse.ui.IWorkbenchWindow;
15
import org.eclipse.ui.handlers.HandlerUtil;
16
import org.eclipse.update.ui.UpdateManagerUI;
17
18
public class ManageConfigurationHandler extends AbstractHandler {
19
20
	public Object execute(ExecutionEvent event) throws ExecutionException {
21
		IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
22
		if (window == null) {
23
			return null;
24
		}
25
		UpdateManagerUI.openConfigurationManager(window.getShell());
26
		return null;
27
	}
28
29
}
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/FindAndInstallHandler.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.equinox.internal.p2.ui.sdk;
12
13
import org.eclipse.core.commands.*;
14
import org.eclipse.ui.IWorkbenchWindow;
15
import org.eclipse.ui.handlers.HandlerUtil;
16
import org.eclipse.update.ui.UpdateManagerUI;
17
18
/**
19
 *
20
 */
21
public class FindAndInstallHandler extends AbstractHandler {
22
23
	public Object execute(ExecutionEvent event) throws ExecutionException {
24
		IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
25
		if (window == null) {
26
			return null;
27
		}
28
		UpdateManagerUI.openInstaller(window.getShell());
29
		return null;
30
	}
31
32
}
(-)src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/OldUpdateTester.java (+23 lines)
Added Link Here
1
package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
2
3
import org.eclipse.core.expressions.PropertyTester;
4
import org.eclipse.core.runtime.Preferences;
5
import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
6
7
public class OldUpdateTester extends PropertyTester {
8
9
	private static final String OLD_UPDATE = "oldUpdate"; //$NON-NLS-1$
10
11
	public OldUpdateTester() {
12
		super();
13
	}
14
15
	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
16
		if (property.equals(OLD_UPDATE)) {
17
			Preferences pref = ProvSDKUIActivator.getDefault().getPluginPreferences();
18
			return pref.getBoolean(PreferenceConstants.PREF_OLD_UPDATE_MANAGER);
19
		}
20
		return false;
21
	}
22
23
}

Return to bug 215914