mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 06:35:28 +02:00
[216858]Need the ability to Import/Export RSE connections for sharing
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216858
This commit is contained in:
parent
e801d86876
commit
209ab5dfcd
5 changed files with 124 additions and 1 deletions
|
@ -914,5 +914,11 @@ You can specify what severity of messages you wish to log - from informational m
|
|||
Messages are logged to the .log file in the .metadata folder of the workspace.
|
||||
</description>
|
||||
</context>
|
||||
<context id="ActionImportConnectionDefinitions">
|
||||
<description>This action imports connection definitions that have been exported from another workbench. A file selection dialog is displayed, and the specified file containing the connection definitions is imported. New connections will appear in the workspace. If a connection by that name already exists in the workspace, the connection being imported will be renamed.</description>
|
||||
</context>
|
||||
<context id="ActionExportConnectionDefinitions">
|
||||
<description>This action exports connection definitions to a file. A file selection dialog is displayed, and you specify the directory and file name into which to export the selected connections and their filters. You may then import the connections into another workbench using the import action.</description>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
</contexts>
|
||||
|
|
|
@ -985,6 +985,10 @@ public class SystemResources extends NLS
|
|||
public static String RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL;
|
||||
public static String RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP;
|
||||
|
||||
public static String RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP;
|
||||
|
||||
public static String RESID_EXPORT_CONNECTIONS_ACTION_LABEL;
|
||||
|
||||
// Encoding
|
||||
public static String RESID_HOST_ENCODING_GROUP_LABEL;
|
||||
public static String RESID_HOST_ENCODING_SETTING_NOTE;
|
||||
|
@ -995,6 +999,14 @@ public class SystemResources extends NLS
|
|||
public static String RESID_HOST_ENCODING_OTHER_LABEL;
|
||||
public static String RESID_HOST_ENCODING_OTHER_TOOLTIP;
|
||||
public static String RESID_HOST_ENCODING_ENTER_TOOLTIP;
|
||||
|
||||
public static String RESID_IMPORT_CONNECTION_ACTION_INVALID_FORMAT;
|
||||
|
||||
public static String RESID_IMPORT_CONNECTION_ACTION_LABEL;
|
||||
|
||||
public static String RESID_IMPORT_CONNECTION_ACTION_READER_MISSING;
|
||||
|
||||
public static String RESID_IMPORT_CONNECTION_ACTION_TOOLTIP;
|
||||
|
||||
static {
|
||||
// load message values from bundle file
|
||||
|
|
|
@ -1053,6 +1053,8 @@ RESID_SERVICESFORM_PROPERTIES_TOOLTIP=Edit the properties of the item selected i
|
|||
## Do not show this message again
|
||||
RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL = Do not show this message again
|
||||
RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP = Select this option if you do not want to see this message again
|
||||
RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP=Export connection definitions
|
||||
RESID_EXPORT_CONNECTIONS_ACTION_LABEL=Export...
|
||||
|
||||
# Strings for Encodings
|
||||
RESID_HOST_ENCODING_GROUP_LABEL=Default encoding
|
||||
|
@ -1064,3 +1066,7 @@ RESID_HOST_ENCODING_REMOTE_TOOLTIP=The default encoding of the platform obtained
|
|||
RESID_HOST_ENCODING_OTHER_LABEL=Other:
|
||||
RESID_HOST_ENCODING_OTHER_TOOLTIP=Specify a different encoding
|
||||
RESID_HOST_ENCODING_ENTER_TOOLTIP=Select or enter an encoding
|
||||
RESID_IMPORT_CONNECTION_ACTION_INVALID_FORMAT=The selected file is not of the correct format to be imported.
|
||||
RESID_IMPORT_CONNECTION_ACTION_LABEL=Import...
|
||||
RESID_IMPORT_CONNECTION_ACTION_READER_MISSING=The reader for this file format is not installed.
|
||||
RESID_IMPORT_CONNECTION_ACTION_TOOLTIP=Import connection definitions
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/********************************************************************************
|
||||
* 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:
|
||||
* David Dykstal (IBM) - [216858] provide ability to import and export connections
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.actions;
|
||||
|
||||
import org.eclipse.rse.internal.ui.SystemResources;
|
||||
import org.eclipse.rse.ui.ISystemContextMenuConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseAction;
|
||||
|
||||
/**
|
||||
* This is the action for clearing in-memory userId and password cache
|
||||
*/
|
||||
public class SystemExportConnectionAction extends SystemBaseAction {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public SystemExportConnectionAction() {
|
||||
super(SystemResources.RESID_EXPORT_CONNECTIONS_ACTION_LABEL, SystemResources.RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP, null);
|
||||
setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
|
||||
setHelp(RSEUIPlugin.HELPPREFIX + "ActionExportConnectionDefinitions"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* The export password action is enabled when the selection contains only connections (hosts)
|
||||
*/
|
||||
public boolean checkObjectType(Object obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this action is selection from the popup menu.
|
||||
*/
|
||||
public void run() {
|
||||
// TODO DWD implement
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/********************************************************************************
|
||||
* 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:
|
||||
* David Dykstal (IBM) - [216858] provide ability to import and export connections
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.actions;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.rse.internal.ui.SystemResources;
|
||||
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
|
||||
import org.eclipse.rse.ui.ISystemContextMenuConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseAction;
|
||||
|
||||
/**
|
||||
* This action is used to import a connection from its package file into the default profile.
|
||||
*/
|
||||
public class SystemImportConnectionAction extends SystemBaseAction {
|
||||
|
||||
private static final SimpleSystemMessage error1 = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, IStatus.ERROR, SystemResources.RESID_IMPORT_CONNECTION_ACTION_INVALID_FORMAT);
|
||||
private static final SimpleSystemMessage error2 = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, IStatus.ERROR, SystemResources.RESID_IMPORT_CONNECTION_ACTION_READER_MISSING);
|
||||
|
||||
/**
|
||||
* Creates a new action to import a connection into a profile.
|
||||
*/
|
||||
public SystemImportConnectionAction() {
|
||||
super(SystemResources.RESID_IMPORT_CONNECTION_ACTION_LABEL, SystemResources.RESID_IMPORT_CONNECTION_ACTION_TOOLTIP, null);
|
||||
setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
|
||||
setHelp(RSEUIPlugin.HELPPREFIX + "ActionImportConnectionDefinitions"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* The import action can be run no matter what the selection is.
|
||||
* @return true
|
||||
*/
|
||||
public boolean checkObjectType(Object obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this action is selection from the popup menu.
|
||||
*/
|
||||
public void run() {
|
||||
// TODO DWD implement
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue