# HG changeset patch # User dadubrow # Date 1271363710 18000 # Node ID af71d0898edfa3765e23634fdbc24f5f21b78275 # Parent 2c56cf4ec790faa06f70a9ce3292081c6e839158 modify IConnectionFactory2 diff -r 2c56cf4ec790 -r af71d0898edf connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory.java Thu Apr 15 13:10:13 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory.java Thu Apr 15 15:35:10 2010 -0500 @@ -37,13 +37,14 @@ * @param parent Composite * @param errorReporter IValidationErrorReporter * @param initialSettings Map may be null - * @deprecated + * @deprecated use IConnectionFactory2.createEditingUI(Composite, IValidationErrorReporter, Map, com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener) */ void createEditingUI(Composite parent, IValidationErrorReporter errorReporter, Map initialSettings); /** * Returns the settings from the editing UI as name value pairs * @return Map + * @deprecated use IConnectionFactory2.IEditingUI.getSettings() or IConnectionFactory2.getDefaultSettings() */ Map getSettingsFromUI(); diff -r 2c56cf4ec790 -r af71d0898edf connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory2.java Thu Apr 15 13:10:13 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionFactory2.java Thu Apr 15 15:35:10 2010 -0500 @@ -48,4 +48,5 @@ IEditingUI createEditingUI(Composite parent, IValidationErrorReporter errorReporter, Map initialSettings, ISettingsChangedListener settingsListener); + Map getDefaultSettings(); } diff -r 2c56cf4ec790 -r af71d0898edf connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Thu Apr 15 13:10:13 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Thu Apr 15 15:35:10 2010 -0500 @@ -840,6 +840,9 @@ } public Map getSettings() { + if (editingUI != null) + return editingUI.getSettings(); + if (connectionFactory == null) { IConnection connectionToEdit = settingsWizard.getConnectionToEdit(); if (connectionToEdit == null || !connectionToEdit.getConnectionType().equals(getConnectionType())) { diff -r 2c56cf4ec790 -r af71d0898edf core/com.nokia.carbide.cpp/META-INF/MANIFEST.MF --- a/core/com.nokia.carbide.cpp/META-INF/MANIFEST.MF Thu Apr 15 13:10:13 2010 -0500 +++ b/core/com.nokia.carbide.cpp/META-INF/MANIFEST.MF Thu Apr 15 15:35:10 2010 -0500 @@ -13,7 +13,8 @@ org.eclipse.core.resources, org.eclipse.core.filesystem, org.eclipse.ui.ide, - org.eclipse.cdt.core + org.eclipse.cdt.core, + org.eclipse.equinox.p2.ui;bundle-version="2.0.0" Bundle-ActivationPolicy: lazy Export-Package: com.nokia.carbide.cpp, com.nokia.carbide.cpp.logging diff -r 2c56cf4ec790 -r af71d0898edf core/com.nokia.carbide.cpp/src/com/nokia/carbide/cpp/ProductPlugin.java --- a/core/com.nokia.carbide.cpp/src/com/nokia/carbide/cpp/ProductPlugin.java Thu Apr 15 13:10:13 2010 -0500 +++ b/core/com.nokia.carbide.cpp/src/com/nokia/carbide/cpp/ProductPlugin.java Thu Apr 15 15:35:10 2010 -0500 @@ -17,8 +17,10 @@ package com.nokia.carbide.cpp; import org.eclipse.ui.plugin.*; +import org.eclipse.equinox.p2.ui.Policy; import org.eclipse.jface.resource.ImageDescriptor; import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; /** * The main plugin class to be used in the desktop. @@ -28,6 +30,8 @@ //The shared instance. private static ProductPlugin plugin; + private ServiceRegistration policyRegistration; + /** * The constructor. */ @@ -40,12 +44,16 @@ */ public void start(BundleContext context) throws Exception { super.start(context); + Policy policy = new Policy(); + policy.setRestartPolicy(Policy.RESTART_POLICY_PROMPT); + policyRegistration = context.registerService(Policy.class.getName(), policy, null); } /** * This method is called when the plug-in is stopped */ public void stop(BundleContext context) throws Exception { + policyRegistration.unregister(); super.stop(context); plugin = null; }