Search in sources :

Example 1 with TemplateContextTypeXSL

use of org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL in project webtools.sourceediting by eclipse.

the class TestTemplateContextTypeXSL method testDollarVariableAvailable.

@Test
public void testDollarVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("dollar")) {
            return;
        }
    }
    fail("User variable resolver was not found.");
}
Also used : TemplateContextTypeXSL(org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Example 2 with TemplateContextTypeXSL

use of org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL in project webtools.sourceediting by eclipse.

the class TestTemplateContextTypeXSL method testUserVariableAvailable.

@Test
public void testUserVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("user")) {
            return;
        }
    }
    fail("User variable resolver was not found.");
}
Also used : TemplateContextTypeXSL(org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Example 3 with TemplateContextTypeXSL

use of org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL in project webtools.sourceediting by eclipse.

the class TestTemplateContextTypeXSL method testTimeVariableAvailable.

@Test
public void testTimeVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("time")) {
            return;
        }
    }
    fail("Time variable resolver was not found.");
}
Also used : TemplateContextTypeXSL(org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Example 4 with TemplateContextTypeXSL

use of org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL in project webtools.sourceediting by eclipse.

the class TestTemplateContextTypeXSL method testYearVariableAvailable.

@Test
public void testYearVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("year")) {
            return;
        }
    }
    fail("Year variable resolver was not found.");
}
Also used : TemplateContextTypeXSL(org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Example 5 with TemplateContextTypeXSL

use of org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL in project webtools.sourceediting by eclipse.

the class TestTemplateContextTypeXSL method testXSLVersionVariableAvailable.

@Test
public void testXSLVersionVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("xsl_version")) {
            return;
        }
    }
    fail("XSL Version variable resolver was not found.");
}
Also used : TemplateContextTypeXSL(org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Aggregations

TemplateVariableResolver (org.eclipse.jface.text.templates.TemplateVariableResolver)10 TemplateContextTypeXSL (org.eclipse.wst.xsl.ui.internal.templates.TemplateContextTypeXSL)10