Java Code Examples for org.eclipse.debug.ui.StringVariableSelectionDialog#getVariableExpression()

The following examples show how to use org.eclipse.debug.ui.StringVariableSelectionDialog#getVariableExpression() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompilerWorkingDirectoryBlock.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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) {
        otherIsEdited = true;
        fOtherDirText.insert(variableText);
        otherIsEdited = false;
        if (actionListener != null) {
            actionListener.actionPerformed(null);
        }
    }
}
 
Example 2
Source File: EditSdkToolPage.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
private String selectVar() {
    StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
    dialog.addVariableFilter(new StringVariableSelectionDialog.VariableFilter() {
        @Override
        public boolean isFiltered(IDynamicVariable var) {
            return !var.getName().startsWith("xds_"); //$NON-NLS-1$
        }
    });
    dialog.open();
    return dialog.getVariableExpression();
}
 
Example 3
Source File: WorkingDirectoryBlock.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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);
    }
}
 
Example 4
Source File: ControlUtils.java    From goclipse with Eclipse Public License 1.0 5 votes vote down vote up
public static String openStringVariableSelectionDialog(StringVariableSelectionDialog dialog)
		throws OperationCancellation {
	dialog.open();
	String result = dialog.getVariableExpression();
	if(result == null) {
		throw new OperationCancellation();
	}
	return result;
}
 
Example 5
Source File: AbstractMainTab.java    From typescript.java with MIT License 4 votes vote down vote up
/**
 * Prompts the user to choose and configure a variable and returns the
 * resulting string, suitable to be used as an attribute.
 */
private String getVariable() {
	StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
	dialog.open();
	return dialog.getVariableExpression();
}