当前位置: 首页>>代码示例>>Java>>正文


Java StringVariableSelectionDialog类代码示例

本文整理汇总了Java中org.eclipse.debug.ui.StringVariableSelectionDialog的典型用法代码示例。如果您正苦于以下问题:Java StringVariableSelectionDialog类的具体用法?Java StringVariableSelectionDialog怎么用?Java StringVariableSelectionDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StringVariableSelectionDialog类属于org.eclipse.debug.ui包,在下文中一共展示了StringVariableSelectionDialog类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
  }
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:20,代码来源:DestdirFieldEditor.java

示例2: createVariableButton

import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入依赖的package包/类
private Button createVariableButton( Composite parent, String text,
		final Text source )
{
	Button button = createPushButton( parent, text, null );
	button.addSelectionListener( new SelectionAdapter( ) {

		public void widgetSelected( SelectionEvent evt )
		{
			StringVariableSelectionDialog dialog = new StringVariableSelectionDialog( source.getShell( ) );
			if ( dialog.open( ) == Window.OK )
				source.insert( dialog.getVariableExpression( ) );
		}

	} );

	return button;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:ScriptMainTab.java

示例3: 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 ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:HiveTab.java

示例4: 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);
    }
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:9,代码来源:PathEditor.java

示例5: 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);
    }
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:10,代码来源:NSISGeneralTab.java

示例6: createControl

import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入依赖的package包/类
public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    comp.setLayout(new GridLayout(1, true));
    comp.setFont(parent.getFont());
    
    comp.setLayoutData(new GridData(GridData.FILL_BOTH));
    setControl(comp);
    
    Group group = new Group(comp, SWT.NONE);
    group.setFont(parent.getFont());
    group.setLayout(new GridLayout());
    group.setLayoutData(new GridData(GridData.FILL_BOTH));
    
    group.setText("Program arguments:");
    argumentsText = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 40;
    gd.widthHint = 100;
    argumentsText.setLayoutData(gd);
    argumentsText.setFont(parent.getFont());
    argumentsText.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent evt) {
            scheduleUpdateJob();
        }
    });
    
    Button varsButton = createPushButton(group, "Variables...", null); 
    varsButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    varsButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
            dialog.open();
            String variable = dialog.getVariableExpression();
            if (variable != null) {
                argumentsText.insert(variable);
            }
        }
    });
}
 
开发者ID:robovm,项目名称:robovm-eclipse,代码行数:41,代码来源:IOSArgumentsTab.java

示例7: 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);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:12,代码来源:WorkingDirectoryBlock.java

示例8: 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;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:10,代码来源:ControlUtils.java

示例9: newValueFromCommandVariablesDialog

import org.eclipse.debug.ui.StringVariableSelectionDialog; //导入依赖的package包/类
protected String newValueFromCommandVariablesDialog() throws OperationCancellation {
	StringVariableSelectionDialog variablesDialog = new StringVariableSelectionDialog(
		commandArgumentsField.getFieldControl().getShell());
	
	variablesDialog.setElements(variablesResolver.getVariables());
	
	String addedVar = ControlUtils.openStringVariableSelectionDialog(variablesDialog);
	return commandArgumentsField.getFieldValue() + addedVar;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:10,代码来源:CommandInvocationEditor.java

示例10: 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());
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:6,代码来源:MkSpellingConfigurationBlock.java

示例11: 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();
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:AbstractMainTab.java

示例12: 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());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:SpellingConfigurationBlock.java


注:本文中的org.eclipse.debug.ui.StringVariableSelectionDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。