public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fPrgmArgumentsText.insert(variable); } } public void widgetDefaultSelected(SelectionEvent e) {
@Override public void widgetSelected(SelectionEvent e) { configureArgument(); } });
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(shell); if (Window.OK == dialog.open()) Object[] results = dialog.getResult();
/** * Returns the variable expression the user generated from this * dialog, or <code>null</code> if none. * * @return variable expression the user generated from this * dialog, or <code>null</code> if none */ public String getVariableExpression() { Object[] selected = getResult(); if (selected != null && selected.length == 1) { IStringVariable variable = (IStringVariable)selected[0]; StringBuffer buffer = new StringBuffer(); buffer.append("${"); //$NON-NLS-1$ buffer.append(variable.getName()); if (fArgumentValue != null && fArgumentValue.length() > 0) { buffer.append(":"); //$NON-NLS-1$ buffer.append(fArgumentValue); } buffer.append("}"); //$NON-NLS-1$ return buffer.toString(); } return null; }
public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fFileText.insert(variable); } }
public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fVMArgumentsText.insert(variable); } } public void widgetDefaultSelected(SelectionEvent e) {
@SuppressWarnings("synthetic-access") @Override public void widgetSelected(SelectionEvent event) { final StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); final String variable = dialog.getVariableExpression(); if (variable != null) { SARLArgumentsTab.this.sreArgumentsText.insert(variable); } } });
protected void handleVariablesButtonSelected() { StringVariableSelectionDialog dialog= new StringVariableSelectionDialog(fDictionaryPath.getShell()); if (dialog.open() == Window.OK) fDictionaryPath.setText(fDictionaryPath.getText() + dialog.getVariableExpression()); }
protected void handleVariablesButtonSelected() { StringVariableSelectionDialog dialog= new StringVariableSelectionDialog(fDictionaryPath.getShell()); if (dialog.open() == Window.OK) fDictionaryPath.setText(fDictionaryPath.getText() + dialog.getVariableExpression()); }
private void handleInsertVariable() { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(fLocationText.getShell()); if (dialog.open() == Window.OK) fLocationText.insert(dialog.getVariableExpression()); }
@Override public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); int code = dialog.open(); if (code == IDialogConstants.OK_ID) { String variable = dialog.getVariableExpression(); if (variable != null) { text.insert(variable); } } } });
protected void getVariable() { StringVariableSelectionDialog variablesDialog = new StringVariableSelectionDialog(getShell()); int returnCode = variablesDialog.open(); if (returnCode == IDialogConstants.OK_ID) { String variable = variablesDialog.getVariableExpression(); if (variable != null) { fValueText.insert(variable.trim()); } } }
/** * The working dir variables button has been selected */ private void handleWorkingDirVariablesButtonSelected() { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variableText = dialog.getVariableExpression(); if (variableText != null) { fOtherWorkingText.insert(variableText); } }
@Override public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fFileText.insert(variable); } } @Override
/** * The working dir variables button has been selected */ private void handleWorkingDirVariablesButtonSelected() { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variableText = dialog.getVariableExpression(); if (variableText != null) { fOtherWorkingText.insert(variableText); } }
private void getVariable() { StringVariableSelectionDialog variableDialog = new StringVariableSelectionDialog(getShell()); int returnCode = variableDialog.open(); if (returnCode == IDialogConstants.OK_ID) { String variable = variableDialog.getVariableExpression(); if (variable != null) { fText.insert(variable); } } }
public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fVariableString.insert(variable); } } });
@Override public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { fInputFileLocationText.insert(variable); } }
@Override public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); int code = dialog.open(); if (code == IDialogConstants.OK_ID) { String variable = dialog.getVariableExpression(); if (variable != null) { text.insert(variable); } } } });
/** * Provide a listener for the Variables button. * The listener invokes the <code>StringVariableSelectionDialog</code> and * updates the selected Variables back in the VM Arguments Text Box * * @param textControl * @return <code>SelectionListener</code> for the Variables button */ private SelectionListener getVariablesListener(final Text textControl) { return widgetSelectedAdapter(e -> { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); dialog.open(); String variable = dialog.getVariableExpression(); if (variable != null) { textControl.insert(variable); } }); }