1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Bug 180256 - Launch configurations should support build variables

This commit is contained in:
Anton Gorenkov 2012-04-02 12:23:36 -07:00 committed by Sergey Prigogin
parent 850063c25d
commit 9ecafd83cd
6 changed files with 21 additions and 20 deletions

View file

@ -1,12 +1,12 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2010 IBM Corporation and others. * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.make.ui.dialogs; package org.eclipse.cdt.make.ui.dialogs;
@ -108,7 +108,7 @@ public abstract class AbstractDiscoveryPage extends DialogPage {
private void handleVariablesButtonSelected(Text textField) { private void handleVariablesButtonSelected(Text textField) {
String variable = getVariable(); String variable = getVariable();
if (variable != null) { if (variable != null) {
textField.append(variable); textField.insert(variable);
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others. * Copyright (c) 2000, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -407,7 +407,7 @@ public class SettingsBlock extends AbstractCOptionPage {
private void handleVariablesButtonSelected(Text textField) { private void handleVariablesButtonSelected(Text textField) {
String variable = getVariable(); String variable = getVariable();
if (variable != null) { if (variable != null) {
textField.append(variable); textField.insert(variable);
} }
} }

View file

@ -1,14 +1,14 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2010 QNX Software Systems and others. * Copyright (c) 2005, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* IBM Corporation * IBM Corporation
* Ericsson - Updated for DSF * Ericsson - Updated for DSF
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.gdb.internal.ui.launching; package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
@ -142,7 +142,8 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
protected void handleVariablesButtonSelected(Text textField) { protected void handleVariablesButtonSelected(Text textField) {
String variable = getVariable(); String variable = getVariable();
if (variable != null) { if (variable != null) {
textField.append(variable); // We should use insert() but not append() to be consistent with the Platform behavior (e.g. Common tab)
textField.insert(variable);
} }
} }

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * IBM Corporation - initial API and implementation
* Ericsson - Updated for DSF * Ericsson - Updated for DSF
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.gdb.internal.ui.launching; package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
@ -239,7 +239,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
protected void handleWorkingDirVariablesButtonSelected() { protected void handleWorkingDirVariablesButtonSelected() {
String variableText = getVariable(); String variableText = getVariable();
if (variableText != null) { if (variableText != null) {
fWorkingDirText.append(variableText); fWorkingDirText.insert(variableText);
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 - 2010 QNX Software Systems and others. * Copyright (c) 2007, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -8,11 +8,11 @@
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946 * Andy Jin - Hardware debugging UI improvements, bug 229946
* Anna Dushistova(MontaVista) - bug 241279 * Anna Dushistova (MontaVista) - bug 241279
* - Hardware Debugging: Host name or ip address not saving in * - Hardware Debugging: Host name or ip address not saving in
* the debug configuration * the debug configuration
* Andy Jin (QNX) - Added DSF debugging, bug 248593 * Andy Jin (QNX) - Added DSF debugging, bug 248593
* Bruce Griffith,Sage Electronic Engineering, LLC - bug 305943 * Bruce Griffith, Sage Electronic Engineering, LLC - bug 305943
* - API generalization to become transport-independent (e.g. to * - API generalization to become transport-independent (e.g. to
* allow connections via serial ports and pipes). * allow connections via serial ports and pipes).
*******************************************************************************/ *******************************************************************************/
@ -141,7 +141,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
private void variablesButtonSelected(Text text) { private void variablesButtonSelected(Text text) {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
if (dialog.open() == StringVariableSelectionDialog.OK) { if (dialog.open() == StringVariableSelectionDialog.OK) {
text.append(dialog.getVariableExpression()); text.insert(dialog.getVariableExpression());
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 - 2010 QNX Software Systems and others. * Copyright (c) 2007, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -8,7 +8,7 @@
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946 * Andy Jin - Hardware debugging UI improvements, bug 229946
* Anna Dushistova(MontaVista) - bug 241279 * Anna Dushistova (MontaVista) - bug 241279
* - Hardware Debugging: Host name or ip address not saving in * - Hardware Debugging: Host name or ip address not saving in
* the debug configuration * the debug configuration
* Andy Jin (QNX) - Added DSF debugging, bug 248593 * Andy Jin (QNX) - Added DSF debugging, bug 248593
@ -139,7 +139,7 @@ public class GDBJtagDebuggerTab extends AbstractLaunchConfigurationTab {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog( StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(
getShell()); getShell());
if (dialog.open() == StringVariableSelectionDialog.OK) { if (dialog.open() == StringVariableSelectionDialog.OK) {
text.append(dialog.getVariableExpression()); text.insert(dialog.getVariableExpression());
} }
} }