Search in sources :

Example 11 with FormatConfiguration

use of com.avaloq.tools.ddk.xtext.format.format.FormatConfiguration in project dsl-devkit by dsldevkit.

the class FormatHyperlinkHelper method getExtendedModels.

/**
 * Gets all extended models.
 *
 * @param model
 *          the model
 * @return list with all extended models
 */
private List<FormatConfiguration> getExtendedModels(final FormatConfiguration model) {
    FormatConfiguration extendedModel = model.getExtendedFormatConfiguration();
    List<FormatConfiguration> result = Lists.newArrayList();
    if (extendedModel != null) {
        result.add(extendedModel);
        result.addAll(getExtendedModels(extendedModel));
    }
    return result;
}
Also used : FormatConfiguration(com.avaloq.tools.ddk.xtext.format.format.FormatConfiguration)

Aggregations

FormatConfiguration (com.avaloq.tools.ddk.xtext.format.format.FormatConfiguration)11 GrammarRule (com.avaloq.tools.ddk.xtext.format.format.GrammarRule)5 Rule (com.avaloq.tools.ddk.xtext.format.format.Rule)4 WildcardRule (com.avaloq.tools.ddk.xtext.format.format.WildcardRule)4 AbstractRule (org.eclipse.xtext.AbstractRule)4 Check (org.eclipse.xtext.validation.Check)4 EnumRule (org.eclipse.xtext.EnumRule)3 ParserRule (org.eclipse.xtext.ParserRule)3 TerminalRule (org.eclipse.xtext.TerminalRule)3 AbstractValidationTest (com.avaloq.tools.ddk.xtext.test.validation.AbstractValidationTest)2 Test (org.junit.Test)2 Constant (com.avaloq.tools.ddk.xtext.format.format.Constant)1 Function (com.google.common.base.Function)1 IOException (java.io.IOException)1 EObject (org.eclipse.emf.ecore.EObject)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Grammar (org.eclipse.xtext.Grammar)1