org.eclipse.core.variables.IStringVariable Java Examples
The following examples show how to use
org.eclipse.core.variables.IStringVariable.
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: StringVariableSelectionDialog.java From birt with Eclipse Public License 1.0 | 6 votes |
/** * 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( ) ); buffer.append( "}" ); //$NON-NLS-1$ return buffer.toString( ); } return null; }
Example #2
Source File: StringVariableSelectionDialog.java From birt with Eclipse Public License 1.0 | 6 votes |
/** * Update variable description and argument button enablement. * * @see org.eclipse.ui.dialogs.AbstractElementListSelectionDialog#handleSelectionChanged() */ protected void handleSelectionChanged( ) { super.handleSelectionChanged( ); Object[] objects = getSelectedElements( ); String text = null; if ( objects.length == 1 ) { IStringVariable variable = (IStringVariable) objects[0]; text = variable.getDescription( ); } if ( text == null ) { text = ""; //$NON-NLS-1$ } fDescriptionText.setText( text ); }
Example #3
Source File: StringVariableSelectionDialog.java From birt with Eclipse Public License 1.0 | 5 votes |
public String getText( Object element ) { if ( element instanceof IStringVariable ) { IStringVariable variable = (IStringVariable) element; return variable.getName( ); } return super.getText( element ); }
Example #4
Source File: VariablesResolver.java From goclipse with Eclipse Public License 1.0 | 5 votes |
@Override public IStringVariable[] getVariables() { IValueVariable[] valueVars = getValueVariables(); IDynamicVariable[] dynVars = getDynamicVariables(); ArrayList2<IStringVariable> variables = new ArrayList2<>(valueVars.length + dynVars.length); variables.addElements(dynVars); variables.addElements(valueVars); return variables.toArray(IStringVariable.class); }
Example #5
Source File: MockStringVariableManager.java From Pydev with Eclipse Public License 1.0 | 4 votes |
@Override public IStringVariable[] getVariables() { throw new AssertionFailedError("Unexpected method call in MockStringVariableManager"); }
Example #6
Source File: MockStringVariableManager.java From Pydev with Eclipse Public License 1.0 | 4 votes |
@Override public String getContributingPluginId(IStringVariable variable) { throw new AssertionFailedError("Unexpected method call in MockStringVariableManager"); }
Example #7
Source File: ForwardingVariableManager.java From goclipse with Eclipse Public License 1.0 | 4 votes |
@Override public IStringVariable[] getVariables() { return parentVarMgr.getVariables(); }
Example #8
Source File: ForwardingVariableManager.java From goclipse with Eclipse Public License 1.0 | 4 votes |
@Override public String getContributingPluginId(IStringVariable variable) { return parentVarMgr.getContributingPluginId(variable); }