diff options
2 files changed, 35 insertions, 7 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java index d294a4927..78623d862 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2016 PalmSource, Inc. and others. + * Copyright (c) 2006, 2018 PalmSource, Inc. 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 @@ -9,6 +9,7 @@ * Ewa Matejska (PalmSource) - Adapted from IGDBServerMILaunchConfigurationConstants * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch * Anna Dushistova (MontaVista) - cloned from IRemoteConnectionConfigurationConstants + * Alexandru Dragut - [535867] Make Path Mapping configurable in TCF Launch config UI *******************************************************************************/ package org.eclipse.tcf.te.tcf.launch.cdt.interfaces; @@ -34,6 +35,20 @@ public interface IRemoteTEConfigurationConstants { public static final String ATTR_REMOTE_PATH = DebugPlugin.getUniqueIdentifier() + ".ATTR_TARGET_PATH"; //$NON-NLS-1$ public static final String ATTR_SKIP_DOWNLOAD_TO_TARGET = DebugPlugin.getUniqueIdentifier() + ".ATTR_SKIP_DOWNLOAD_TO_TARGET"; //$NON-NLS-1$ + /** + * Launch configuration attribute key. Boolean value to set the auto path mapping property + * from local object path to remote object path. + * If the attribute is not set, the default value of this attribute is true. + */ + public static final String ATTR_AUTO_PATH_MAPPING_FROM_LOCAL_TO_REMOTE = DebugPlugin.getUniqueIdentifier() + ".ATTR_AUTO_PATH_MAPPING_FROM_LOCAL_TO_REMOTE"; //$NON-NLS-1$ + + /** + * Launch configuration attribute key. Boolean value to set the auto path mapping property + * from remote object path to local object path. + * If the attribute is not set, the default value of this attribute is true. + */ + public static final String ATTR_AUTO_PATH_MAPPING_FROM_REMOTE_TO_LOCAL = DebugPlugin.getUniqueIdentifier() + ".ATTR_AUTO_PATH_MAPPING_FROM_REMOTE_TO_LOCAL"; //$NON-NLS-1$ + /* * The remote PID to attach to. */ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java index 8264af020..6ddbc9034 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java @@ -1,11 +1,12 @@ /******************************************************************************* - * Copyright (c) 2015, 2016 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2018 Wind River Systems, Inc. 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: * Wind River Systems - initial API and implementation + * Alexandru Dragut - [535867] Make Path Mapping configurable in TCF Launch config UI *******************************************************************************/ package org.eclipse.tcf.te.tcf.launch.cdt.tabs; @@ -73,7 +74,7 @@ public abstract class TEAbstractMainTab extends CMainTab { protected Button skipDownloadButton; protected boolean skipDownloadButtonVisible = true; - protected boolean progTextFireNotification; + protected boolean progTextFireNotification = true; protected boolean remoteProgTextFireNotification; protected boolean remoteProgValidation = true; @@ -147,7 +148,6 @@ public abstract class TEAbstractMainTab extends CMainTab { } } }); - progTextFireNotification = true; } /* @@ -231,8 +231,6 @@ public abstract class TEAbstractMainTab extends CMainTab { updateLaunchConfigurationDialog(); } }); - remoteProgTextFireNotification = true; - remoteBrowseButton = createPushButton(mainComp, Messages.RemoteCMainTab_Remote_Path_Browse_Button, null); remoteBrowseButton.addSelectionListener(new SelectionAdapter() { @@ -550,7 +548,20 @@ public abstract class TEAbstractMainTab extends CMainTab { catch (CoreException ce) { // Ignore } - + + try { + progTextFireNotification = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_AUTO_PATH_MAPPING_FROM_LOCAL_TO_REMOTE, true); + } + catch (CoreException e) { + // Ignore + } + + try { + remoteProgTextFireNotification = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_AUTO_PATH_MAPPING_FROM_REMOTE_TO_LOCAL, true); + } + catch (CoreException e) { + // Ignore + } peerSelector.updateSelectionFrom(remoteConnection); super.initializeFrom(config); @@ -601,6 +612,8 @@ public abstract class TEAbstractMainTab extends CMainTab { config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_PID, (String)null); config.setAttribute(IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET_DEFAULT); config.setAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, (String)null); + config.setAttribute(IRemoteTEConfigurationConstants.ATTR_AUTO_PATH_MAPPING_FROM_LOCAL_TO_REMOTE, true); + config.setAttribute(IRemoteTEConfigurationConstants.ATTR_AUTO_PATH_MAPPING_FROM_REMOTE_TO_LOCAL, true); } protected void showCommandsEditor() { |