Search in sources :

Example 1 with ValueVariable

use of org.eclipse.core.internal.variables.ValueVariable in project jbosstools-server by jbosstools.

the class StringSubstitutionTest method testSetVariable.

public void testSetVariable() {
    try {
        IValueVariable[] variables = new IValueVariable[] { new ValueVariable("test_variable", null, false, "/here") };
        VariablesPlugin.getDefault().getStringVariableManager().addVariables(variables);
        WorkspaceVFS vfs = (WorkspaceVFS) ArchivesCore.getInstance().getVFS();
        String out = vfs.performStringSubstitution("${test_variable}", null, true);
        assertEquals("/here", out);
        VariablesPlugin.getDefault().getStringVariableManager().removeVariables(variables);
    } catch (CoreException ce) {
        fail(ce.getMessage());
    }
}
Also used : IValueVariable(org.eclipse.core.variables.IValueVariable) ValueVariable(org.eclipse.core.internal.variables.ValueVariable) CoreException(org.eclipse.core.runtime.CoreException) IValueVariable(org.eclipse.core.variables.IValueVariable) WorkspaceVFS(org.jboss.ide.eclipse.archives.core.model.other.internal.WorkspaceVFS)

Aggregations

ValueVariable (org.eclipse.core.internal.variables.ValueVariable)1 CoreException (org.eclipse.core.runtime.CoreException)1 IValueVariable (org.eclipse.core.variables.IValueVariable)1 WorkspaceVFS (org.jboss.ide.eclipse.archives.core.model.other.internal.WorkspaceVFS)1