本文整理汇总了Java中org.eclipse.debug.ui.StringVariableSelectionDialog.open方法的典型用法代码示例。如果您正苦于以下问题:Java StringVariableSelectionDialog.open方法的具体用法?Java StringVariableSelectionDialog.open怎么用?Java StringVariableSelectionDialog.open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.ui.StringVariableSelectionDialog
的用法示例。
在下文中一共展示了StringVariableSelectionDialog.open方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: variablesPressed
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
public String variablesPressed() {
StringVariableSelectionDialog varDlg = new StringVariableSelectionDialog(getShell());
varDlg.open();
String variableExpression = varDlg.getVariableExpression();
String currentDestdir = getTextControl().getText();
if(variableExpression == null) {
return currentDestdir;
}
Point pt = getTextControl().getSelection();
String result = currentDestdir.substring(0, pt.x);
result = result.concat(variableExpression);
result = result.concat(currentDestdir.substring(pt.y, currentDestdir.length()));
return result;
}
示例2: chooseVariable
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
protected void chooseVariable ()
{
final StringVariableSelectionDialog dlg = new StringVariableSelectionDialog ( getShell () );
dlg.setDialogBoundsSettings ( getDialogBoundsSettings ( HiveTab.VARIABLE_SELECTION_DIALOG ), Dialog.DIALOG_PERSISTSIZE );
if ( dlg.open () == Window.OK )
{
this.fileText.insert ( dlg.getVariableExpression () );
makeDirty ();
}
}
示例3: selectVariable
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
private void selectVariable() {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
dialog.open();
String variable = dialog.getVariableExpression();
if (variable != null) {
addVariable(variable);
}
}
示例4: handleBrowseVariables
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
void handleBrowseVariables(Shell shell)
{
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(shell);
dialog.open();
String variable = dialog.getVariableExpression();
if (variable != null) {
mScript.insert(variable);
}
}
示例5: handleWorkingDirVariablesButtonSelected
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
/**
* 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);
}
}
示例6: openStringVariableSelectionDialog
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
public static String openStringVariableSelectionDialog(StringVariableSelectionDialog dialog)
throws OperationCancellation {
dialog.open();
String result = dialog.getVariableExpression();
if(result == null) {
throw new OperationCancellation();
}
return result;
}
示例7: handleVariablesButtonSelected
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
protected void handleVariablesButtonSelected() {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(fDictionaryPath.getShell());
if (dialog.open() == Window.OK)
fDictionaryPath.setText(fDictionaryPath.getText() + dialog.getVariableExpression());
}
示例8: getVariable
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
/**
* 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();
}
示例9: handleVariablesButtonSelected
import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入方法依赖的package包/类
protected void handleVariablesButtonSelected() {
StringVariableSelectionDialog dialog= new StringVariableSelectionDialog(fDictionaryPath.getShell());
if (dialog.open() == Window.OK)
fDictionaryPath.setText(fDictionaryPath.getText() + dialog.getVariableExpression());
}