Search in sources :

Example 6 with TemplateContextTypeXSL

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

the class TestTemplateContextTypeXSL method testDateVariableAvailable.

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

Example 7 with TemplateContextTypeXSL

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

the class TestTemplateContextTypeXSL method testWordSelectionVariableAvailable.

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

Example 8 with TemplateContextTypeXSL

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

the class TestTemplateContextTypeXSL method testLineSelectionVariableAvailable.

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

Example 9 with TemplateContextTypeXSL

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

the class TestTemplateContextTypeXSL method testCursorVariableAvailable.

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

Example 10 with TemplateContextTypeXSL

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

the class TestTemplateContextTypeXSL method testXMLEncodingVariableAvailable.

@Test
public void testXMLEncodingVariableAvailable() throws Exception {
    TemplateContextTypeXSL contextType = new TemplateContextTypeXSL();
    Iterator<TemplateVariableResolver> variables = contextType.resolvers();
    while (variables.hasNext()) {
        TemplateVariableResolver resolver = variables.next();
        if (resolver.getType().equals("encoding")) {
            return;
        }
    }
    fail("Encoding Selection 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