diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java deleted file mode 100644 index 51d3e76..0000000 --- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk - * 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: - * Doug Satchwell (Chase Technology Ltd) - initial API and implementation - * David Carver (STAR) - bug 245772 - NLS Message refactoring - *******************************************************************************/ -package org.eclipse.wst.xsl.internal.debug.ui.actions; - -import org.eclipse.jface.window.Window; -import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.ParameterViewer; -import org.eclipse.wst.xsl.launching.config.LaunchAttribute; -import org.eclipse.wst.xsl.debug.ui.Messages; - -/** - * An action that opens a dialog to allow the user to add a parameter to a transform. - * - * @author Doug Satchwell - */ -public class AddParameterAction extends AbstractParameterAction -{ - /** - * Create a new instance of this. - * - * @param viewer teh viewer - */ - public AddParameterAction(ParameterViewer viewer) - { - super(Messages.getString("AddParameterAction"), viewer); - } - - @Override - public void run() - { - MultipleInputDialog dialog = new MultipleInputDialog(getShell(), Messages.getString("AddParameterAction_Dialog")); - String namelabel = Messages.getString("AddParameterAction_Dialog_Name"); - dialog.addTextField(namelabel, null, false); - String variableslabel = Messages.getString("AddParameterAction_Dialog_Value"); - dialog.addVariablesField(variableslabel, null, false); - dialog.open(); - - if (dialog.getReturnCode() == Window.OK) - { - String name = dialog.getStringValue(namelabel); - String value = dialog.getStringValue(variableslabel); - LaunchAttribute parameter = null; - if (value != null && value.indexOf("${") > -1) //$NON-NLS-1$ - parameter = new LaunchAttribute(name, null, value); - else - parameter = new LaunchAttribute(name, null, value); - getViewer().addParameter(parameter); - } - } - - @Override - public void setEnabled(boolean enabled) - { - // do nothing - } - -} |