diff options
author | Uwe Stieber | 2015-05-20 15:25:29 +0000 |
---|---|---|
committer | Uwe Stieber | 2015-05-20 15:25:29 +0000 |
commit | 7f045a1cd4a5a72ddc8ff52f6b3bbcf46175d4aa (patch) | |
tree | e87e1f688fd26d1c70afee78773c1f6f70084dd7 | |
parent | 46c179cd995bf2d04b22d204760cfc41eb5f94e5 (diff) | |
download | org.eclipse.tcf-7f045a1cd4a5a72ddc8ff52f6b3bbcf46175d4aa.tar.gz org.eclipse.tcf-7f045a1cd4a5a72ddc8ff52f6b3bbcf46175d4aa.tar.xz org.eclipse.tcf-7f045a1cd4a5a72ddc8ff52f6b3bbcf46175d4aa.zip |
Target Explorer: Rework launch tab hierarchy to allow re-use for different launch types
8 files changed, 266 insertions, 128 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml index ef67becd7..ee4380648 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml @@ -17,7 +17,7 @@ Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote <plugin> <extension point="org.eclipse.debug.core.launchDelegates"> <launchDelegate - id="org.eclipse.tcf.te.remotecdt.dsf.debug" + id="org.eclipse.tcf.te.remotecdt.debug" type="org.eclipse.cdt.launch.remoteApplicationLaunchType" modes="debug" delegate="org.eclipse.tcf.te.tcf.launch.cdt.launching.TEGdbLaunchDelegate" @@ -35,7 +35,7 @@ Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote delegateDescription="%terunLaunchDelegate.description"> </launchDelegate> <launchDelegate - id="org.eclipse.tcf.te.remotecdt.dsf.attach" + id="org.eclipse.tcf.te.remotecdt.attach" type="org.eclipse.cdt.launch.attachLaunchType" modes="debug" delegate="org.eclipse.tcf.te.tcf.launch.cdt.launching.TEGdbAttachLaunchDelegate" @@ -53,63 +53,63 @@ Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote id="org.eclipse.tcf.te.remotecdt.run.mainTab" group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup" name="Main" - class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TECDSFMainTab"> + class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEApplicationMainTab"> <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/> </tab> - <tab id="org.eclipse.tcf.te.remotecdt.run.CArgumentsTab" + <tab id="org.eclipse.tcf.te.remotecdt.run.argumentsTab" group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup" name="Arguments" class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/> - <placement after="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/> + <placement after="org.eclipse.tcf.te.remotecdt.run.mainTab"/> </tab> <tab id="org.eclipse.tcf.te.remotecdt.CommonTab" group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup" name="Common" class="org.eclipse.debug.ui.CommonTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/> - <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/> + <placement after="org.eclipse.tcf.te.remotecdt.run.argumentsTab"/> </tab> <!-- Remote Application (Debug) --> <tab - id="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab" + id="org.eclipse.tcf.te.remotecdt.debug.mainTab" group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup" name="Main" - class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TECDSFMainTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/> + class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEApplicationMainTab"> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.debug"/> </tab> <tab - id="org.eclipse.tcf.te.remotecdt.dsf.debug.CArgumentsTab" + id="org.eclipse.tcf.te.remotecdt.debug.argumentsTab" group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup" name="Arguments" class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/> - <placement after="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.debug"/> + <placement after="org.eclipse.tcf.te.remotecdt.debug.mainTab"/> </tab> - <tab id="org.eclipse.tcf.te.remotecdt.dsf.debug.RemoteCDSFDebuggerTab" + <tab id="org.eclipse.tcf.te.remotecdt.debug.debuggerTab" group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup" name="Debugger" - class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEDSFDebuggerTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/> - <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/> + class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEApplicationDebuggerTab"> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.debug"/> + <placement after="org.eclipse.tcf.te.remotecdt.debug.argumentsTab"/> </tab> <tab - id="org.eclipse.tcf.te.remotecdt.debug.dsf.SourceLookupTab" + id="org.eclipse.tcf.te.remotecdt.debug.sourceLookupTab" group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup" name="Source" class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/> - <placement after="org.eclipse.tcf.te.remotecdt.dsf.debug.TEDSFDebuggerTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.debug"/> + <placement after="org.eclipse.tcf.te.remotecdt.debug.debuggerTab"/> </tab> <tab - id="org.eclipse.tcf.te.remotecdt.debug.dsf.CommonTab" + id="org.eclipse.tcf.te.remotecdt.debug.commonTab" group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup" name="Common" class="org.eclipse.debug.ui.CommonTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/> - <placement after="org.eclipse.debug.ui.sourceLookupTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.debug"/> + <placement after="org.eclipse.tcf.te.remotecdt.debug.sourceLookupTab"/> </tab> <!-- Attach Launch --> @@ -117,32 +117,32 @@ Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote id="org.eclipse.tcf.te.remotecdt.attach.mainTab" group="org.eclipse.cdt.launch.attachLaunchTabGroup" name="Main" - class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TECDSFMainAttachTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.attach"/> + class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEAttachMainTab"> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.attach"/> </tab> <tab id="org.eclipse.tcf.te.remotecdt.attach.debuggerTab" group="org.eclipse.cdt.launch.attachLaunchTabGroup" name="Debugger" - class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AttachCDebuggerTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.attach"/> - <placement after="org.eclipse.cdt.dsf.gdb.launch.mainTab"/> + class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEAttachDebuggerTab"> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.attach"/> + <placement after="org.eclipse.tcf.te.remotecdt.attach.mainTab"/> </tab> <tab id="org.eclipse.tcf.te.remotecdt.attach.sourceLookupTab" group="org.eclipse.cdt.launch.attachLaunchTabGroup" name="Source" class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.attach"/> - <placement after="org.eclipse.cdt.dsf.gdb.launch.debuggerTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.attach"/> + <placement after="org.eclipse.tcf.te.remotecdt.attach.debuggerTab"/> </tab> <tab id="org.eclipse.tcf.te.remotecdt.attach.commonTab" group="org.eclipse.cdt.launch.attachLaunchTabGroup" name="Common" class="org.eclipse.debug.ui.CommonTab"> - <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.attach"/> - <placement after="org.eclipse.debug.ui.sourceLookupTab"/> + <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.attach"/> + <placement after="org.eclipse.tcf.te.remotecdt.attach.sourceLookupTab"/> </tab> </extension> diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractDebuggerTab.java index 7dbddcdf6..80cd548b2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractDebuggerTab.java @@ -1,16 +1,12 @@ /******************************************************************************* - * Copyright (c) 2012 Mentor Graphics 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 + * Copyright (c) 2015 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: - * Anna Dushistova (Mentor Graphics) - initial API and implementation - * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs - * Anna Dushistova (MontaVista) - adapted from TEDSFDebuggerTab + * Wind River Systems - initial API and implementation *******************************************************************************/ - package org.eclipse.tcf.te.tcf.launch.cdt.tabs; import org.eclipse.cdt.debug.ui.ICDebuggerPage; @@ -22,13 +18,19 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +/** + * Abstract custom debugger tab implementation. + */ @SuppressWarnings("restriction") -public class TEDSFDebuggerTab extends CDebuggerTab { - +public class TEAbstractDebuggerTab extends CDebuggerTab { + // Do not change the ID. We want to maintain compatibility private final static String DEFAULTS_SET = "org.eclipse.cdt.launch.remote.te.TEDSFDebuggerTab.DEFAULTS_SET"; //$NON-NLS-1$ - public TEDSFDebuggerTab() { - super(SessionType.REMOTE, false); + /** + * Constructor + */ + public TEAbstractDebuggerTab(SessionType sessionType, boolean attach) { + super(sessionType, attach); } /* @@ -61,6 +63,18 @@ public class TEDSFDebuggerTab extends CDebuggerTab { super.initializeFrom(config); } + /* (non-Javadoc) + * @see org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab#initDebuggerTypes(java.lang.String) + */ + @Override + protected void initDebuggerTypes(String selection) { + // Workaround to fix NPE in CDebuggerTab#initializeCommonControl + if ("gdb".equals(selection) || "gdbserver".equals(selection)) { //$NON-NLS-1$ //$NON-NLS-2$ + setDebuggerId(selection); + } + super.initDebuggerTypes(selection); + } + @Override protected void loadDynamicDebugArea() { Composite dynamicTabHolder = getDynamicTabHolder(); @@ -69,24 +83,18 @@ public class TEDSFDebuggerTab extends CDebuggerTab { for (int i = 0; i < children.length; i++) { children[i].dispose(); } - setDynamicTab(new TEDSFGDBDebuggerPage()); + setDynamicTab(new TEGdbDebuggerPage()); ICDebuggerPage debuggerPage = getDynamicTab(); if (debuggerPage == null) { return; } // Ask the dynamic UI to create its Control - debuggerPage - .setLaunchConfigurationDialog(getLaunchConfigurationDialog()); + debuggerPage.setLaunchConfigurationDialog(getLaunchConfigurationDialog()); debuggerPage.createControl(dynamicTabHolder); debuggerPage.getControl().setVisible(true); dynamicTabHolder.layout(true); contentsChanged(); } - @Override - public String getId() { - return "org.eclipse.tcf.te.remotecdt.dsf.debug.TEDSFDebuggerTab"; //$NON-NLS-1$ - } - } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java index 537dae36d..ddf8ba9f1 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAbstractMainTab.java @@ -1,26 +1,11 @@ /******************************************************************************* - * Copyright (c) 2006, 2015 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 - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2015 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: - * Ewa Matejska (PalmSource) - initial API and implementation - * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry - * Martin Oberhuber (Wind River) - [196934] hide disabled system types in remotecdt combo - * Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded - * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code - * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path - * Johann Draschwandtner (Wind River) - [233057][remotecdt]Fix button enablement - * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch - * Anna Dushistova (MontaVista) - [223728] [remotecdt] connection combo is not populated until RSE is activated - * Anna Dushistova (MontaVista) - [267951] [remotecdt] Support systemTypes without files subsystem - * Anna Dushistova (Mentor Graphics) - adapted from RemoteCMainTab - * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs - * Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used - * Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug - * Anna Dushistova (MontaVista) - adapted from RemoteCDSFMainTab + * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.tcf.launch.cdt.tabs; @@ -57,8 +42,11 @@ import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConsta import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages; import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode; +/** + * Abstract custom main tab implementation. + */ @SuppressWarnings("restriction") -public class TECDSFMainTab extends CMainTab { +public class TEAbstractMainTab extends CMainTab { /* Labels and Error Messages */ private static final String REMOTE_PROG_LABEL_TEXT = Messages.RemoteCMainTab_Program; @@ -72,15 +60,42 @@ public class TECDSFMainTab extends CMainTab { protected Label remoteProgLabel; protected Text remoteProgText; protected Button skipDownloadButton; + protected boolean skipDownloadButtonVisible = true; protected boolean progTextFireNotification; protected boolean remoteProgTextFireNotification; + protected boolean remoteProgValidation = true; private Text preRunText; private Label preRunLabel; + private boolean preRunVisible = true; - public TECDSFMainTab() { - super(0); + public static final int NO_DOWNLOAD_GROUP = 2 << 8; + public static final int NO_PRERUN_GROUP = 4 << 8; + + /** + * Constructor + */ + public TEAbstractMainTab() { + super(); + } + + /** + * Constructor + * + * @param flags The flags to configure the main tab. + */ + public TEAbstractMainTab(int flags) { + super(flags); + if ((flags & DONT_CHECK_PROGRAM) != 0) { + remoteProgValidation = false; + } + if ((flags & NO_DOWNLOAD_GROUP) != 0) { + skipDownloadButtonVisible = false; + } + if ((flags & NO_PRERUN_GROUP) != 0) { + preRunVisible = false; + } } @Override @@ -93,7 +108,7 @@ public class TECDSFMainTab extends CMainTab { /* The remote binary location and skip download option */ createVerticalSpacer(comp, 1); createTargetExePathGroup(comp); - createDownloadOption(comp); + if (skipDownloadButtonVisible) createDownloadOption(comp); /* If the local binary path changes, modify the remote binary location */ fProgText.addModifyListener(new ModifyListener() { @@ -122,7 +137,7 @@ public class TECDSFMainTab extends CMainTab { setErrorMessage(CONNECTION_TEXT_ERROR); retVal = false; } - if (retVal) { + if (retVal && remoteProgValidation) { String name = remoteProgText.getText().trim(); if (name.length() == 0) { setErrorMessage(REMOTE_PROG_TEXT_ERROR); @@ -194,26 +209,27 @@ public class TECDSFMainTab extends CMainTab { } }); - // Commands to run before execution - preRunLabel = new Label(mainComp, SWT.NONE); - preRunLabel.setText(PRE_RUN_LABEL_TEXT); - gd = new GridData(); - gd.horizontalSpan = 2; - preRunLabel.setLayoutData(gd); - - preRunText = new Text(mainComp, SWT.MULTI | SWT.BORDER); - gd = new GridData(GridData.FILL_HORIZONTAL); - gd.horizontalSpan = 2; - preRunText.setLayoutData(gd); - preRunText.addModifyListener(new ModifyListener() { - - @SuppressWarnings("synthetic-access") - @Override - public void modifyText(ModifyEvent evt) { - updateLaunchConfigurationDialog(); - } - }); - + if (preRunVisible) { + // Commands to run before execution + preRunLabel = new Label(mainComp, SWT.NONE); + preRunLabel.setText(PRE_RUN_LABEL_TEXT); + gd = new GridData(); + gd.horizontalSpan = 2; + preRunLabel.setLayoutData(gd); + + preRunText = new Text(mainComp, SWT.MULTI | SWT.BORDER); + gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = 2; + preRunText.setLayoutData(gd); + preRunText.addModifyListener(new ModifyListener() { + + @SuppressWarnings("synthetic-access") + @Override + public void modifyText(ModifyEvent evt) { + updateLaunchConfigurationDialog(); + } + }); + } } /* @@ -271,25 +287,29 @@ public class TECDSFMainTab extends CMainTab { remoteProgText.setText(targetPath); remoteProgTextFireNotification = prevRemoteProgTextFireNotification; - String prelaunchCmd = null; - try { - prelaunchCmd = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$ - } - catch (CoreException e) { - // Ignore + if (preRunText != null) { + String prelaunchCmd = null; + try { + prelaunchCmd = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$ + } + catch (CoreException e) { + // Ignore + } + if (prelaunchCmd != null) preRunText.setText(prelaunchCmd); } - preRunText.setText(prelaunchCmd); } protected void updateSkipDownloadFromConfig(ILaunchConfiguration config) { - boolean downloadToTarget = true; - try { - downloadToTarget = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET_DEFAULT); - } - catch (CoreException e) { - // Ignore for now + if (skipDownloadButton != null) { + boolean downloadToTarget = true; + try { + downloadToTarget = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET_DEFAULT); + } + catch (CoreException e) { + // Ignore for now + } + skipDownloadButton.setSelection(downloadToTarget); } - skipDownloadButton.setSelection(downloadToTarget); } /** @@ -368,8 +388,7 @@ public class TECDSFMainTab extends CMainTab { public void initializeFrom(ILaunchConfiguration config) { String remoteConnection = null; try { - remoteConnection = config - .getAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); //$NON-NLS-1$ + remoteConnection = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); //$NON-NLS-1$ } catch (CoreException ce) { // Ignore @@ -392,17 +411,16 @@ public class TECDSFMainTab extends CMainTab { String currentSelection = peerSelector.getPeerId(); config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, currentSelection != null ? currentSelection : null); config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH, remoteProgText.getText()); - config.setAttribute(IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, skipDownloadButton.getSelection()); - config.setAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, preRunText.getText()); + if (skipDownloadButton != null) { + config.setAttribute(IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, skipDownloadButton.getSelection()); + } + if (preRunText != null) { + config.setAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, preRunText.getText()); + } super.performApply(config); } @Override - public String getId() { - return "org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"; //$NON-NLS-1$ - } - - @Override public void setDefaults(ILaunchConfigurationWorkingCopy config) { super.setDefaults(config); config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, EMPTY_STRING); @@ -411,4 +429,4 @@ public class TECDSFMainTab extends CMainTab { config.setAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, EMPTY_STRING); } -}
\ No newline at end of file +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java new file mode 100644 index 000000000..1cc9458eb --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2012, 2015 Mentor Graphics 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: + * Anna Dushistova (Mentor Graphics) - initial API and implementation + * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs + * Anna Dushistova (MontaVista) - adapted from TEDSFDebuggerTab + *******************************************************************************/ + +package org.eclipse.tcf.te.tcf.launch.cdt.tabs; + +import org.eclipse.cdt.dsf.gdb.service.SessionType; + +public class TEApplicationDebuggerTab extends TEAbstractDebuggerTab { + + public TEApplicationDebuggerTab() { + super(SessionType.REMOTE, false); + } + + @Override + public String getId() { + return "org.eclipse.tcf.te.remotecdt.debug.debuggerTab"; //$NON-NLS-1$ + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationMainTab.java new file mode 100644 index 000000000..df9c4e0a1 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationMainTab.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2006, 2015 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Ewa Matejska (PalmSource) - initial API and implementation + * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * Martin Oberhuber (Wind River) - [196934] hide disabled system types in remotecdt combo + * Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded + * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code + * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path + * Johann Draschwandtner (Wind River) - [233057][remotecdt]Fix button enablement + * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch + * Anna Dushistova (MontaVista) - [223728] [remotecdt] connection combo is not populated until RSE is activated + * Anna Dushistova (MontaVista) - [267951] [remotecdt] Support systemTypes without files subsystem + * Anna Dushistova (Mentor Graphics) - adapted from RemoteCMainTab + * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs + * Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used + * Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug + * Anna Dushistova (MontaVista) - adapted from RemoteCDSFMainTab + *******************************************************************************/ +package org.eclipse.tcf.te.tcf.launch.cdt.tabs; + + +public class TEApplicationMainTab extends TEAbstractMainTab { + + /** + * Constructor + */ + public TEApplicationMainTab() { + super(0); + } + + @Override + public String getId() { + return "org.eclipse.tcf.te.remotecdt.debug.mainTab"; //$NON-NLS-1$ + } + + +}
\ No newline at end of file diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAttachDebuggerTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAttachDebuggerTab.java new file mode 100644 index 000000000..563bda9de --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAttachDebuggerTab.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2012, 2015 Mentor Graphics 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: + * Anna Dushistova (Mentor Graphics) - initial API and implementation + * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs + * Anna Dushistova (MontaVista) - adapted from TEDSFDebuggerTab + *******************************************************************************/ + +package org.eclipse.tcf.te.tcf.launch.cdt.tabs; + +import org.eclipse.cdt.dsf.gdb.service.SessionType; + +public class TEAttachDebuggerTab extends TEAbstractDebuggerTab { + + public TEAttachDebuggerTab() { + super(SessionType.REMOTE, true); + } + + @Override + public String getId() { + return "org.eclipse.tcf.te.remotecdt.attach.debuggerTab"; //$NON-NLS-1$ + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainAttachTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAttachMainTab.java index 698e79138..5c614c681 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainAttachTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEAttachMainTab.java @@ -9,13 +9,24 @@ *******************************************************************************/ package org.eclipse.tcf.te.tcf.launch.cdt.tabs; -import org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainAttachTab; +import org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab; /** * Main attach tab implementation. */ @SuppressWarnings("restriction") -public class TECDSFMainAttachTab extends CMainAttachTab { +public class TEAttachMainTab extends TEAbstractMainTab { + /** + * Constructor + */ + public TEAttachMainTab() { + super(CMainTab.DONT_CHECK_PROGRAM | NO_DOWNLOAD_GROUP | NO_PRERUN_GROUP); + } + + @Override + public String getId() { + return "org.eclipse.tcf.te.remotecdt.attach.mainTab"; //$NON-NLS-1$ + } } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEGdbDebuggerPage.java index 31049f2e6..253b9bfca 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEGdbDebuggerPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2014 PalmSource, Inc. and others. + * Copyright (c) 2006, 2015 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 @@ -34,7 +34,7 @@ import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages; import org.eclipse.tcf.te.ui.controls.validator.PortNumberVerifyListener; @SuppressWarnings("restriction") -public class TEDSFGDBDebuggerPage extends GdbDebuggerPage { +public class TEGdbDebuggerPage extends GdbDebuggerPage { protected Text fGDBServerCommandText = null; @@ -44,7 +44,7 @@ public class TEDSFGDBDebuggerPage extends GdbDebuggerPage { private boolean fIsInitializing = false; - public TEDSFGDBDebuggerPage() { + public TEGdbDebuggerPage() { super(); } |