Example usage for org.antlr.v4.runtime ParserRuleContext addChild

List of usage examples for org.antlr.v4.runtime ParserRuleContext addChild

Introduction

In this page you can find the example usage for org.antlr.v4.runtime ParserRuleContext addChild.

Prototype

@Deprecated
public TerminalNode addChild(Token matchedToken) 

Source Link

Document

Add a child to this node based upon matchedToken.

Usage

From source file:org.eclipse.titan.designer.editors.configeditor.pages.compgroupmc.ComponentsSubPage.java

License:Open Source License

private void createNewComponentsSection() {
    if (componentsSectionHandler == null) {
        return;/*from  w w w  .j  a v a 2  s.c om*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    componentsSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[COMPONENTS]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.compgroupmc.GroupsSubPage.java

License:Open Source License

private void createNewGroupsSection() {
    if (groupSectionHandler == null) {
        return;/*from w ww  .  j av a 2s  .  c o  m*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    groupSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[GROUPS]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.compgroupmc.MCSubPage.java

License:Open Source License

private void createMCSection() {
    if (mcSectionHandler == null || mcSectionHandler.getLastSectionRoot() != null) {
        return;//from  w  w w.  j  a va2 s.  c om
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    mcSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[MAIN_CONTROLLER]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.execute.ExecuteSubPage.java

License:Open Source License

private void createNewExecuteSection() {
    if (executeSectionHandler == null) {
        return;//w  w  w  .j av a 2 s.c om
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    executeSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[EXECUTE]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.execute.ExternalCommandsSubPage.java

License:Open Source License

private void createExternalCommandsSection() {
    if (executeCommandSectionHandler == null || executeCommandSectionHandler.getLastSectionRoot() != null) {
        return;/*from w w w  .j a  v a2s  .  c  om*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    executeCommandSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[EXTERNAL_COMMANDS]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.include.DefineSubPage.java

License:Open Source License

private void createNewDefineSection() {
    if (defineSectionHandler == null) {
        return;/*w w  w  .j  a  va  2 s  .com*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    defineSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[DEFINE]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.include.IncludeSubPage.java

License:Open Source License

private void createNewIncludeSection() {
    if (includeSectionHandler == null) {
        return;/*from   ww w  . j  a v a2 s  . c  o  m*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    includeSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[INCLUDE]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.logging.LoggingPage.java

License:Open Source License

public void createLoggingSection() {
    if (loggingSectionHandler == null || loggingSectionHandler.getLastSectionRoot() != null) {
        return;/*from w ww .j a va  2 s  .  c o  m*/
    }
    ParserRuleContext sectionRoot = new ParserRuleContext();
    loggingSectionHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[LOGGING]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);
    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}

From source file:org.eclipse.titan.designer.editors.configeditor.pages.modulepar.ModuleParameterSectionPage.java

License:Open Source License

private void createNewModuleParameterSection() {
    if (moduleParametersHandler == null) {
        return;/*from  ww  w  .j  ava 2s .c  om*/
    }

    ParserRuleContext sectionRoot = new ParserRuleContext();
    moduleParametersHandler.setLastSectionRoot(sectionRoot);
    ParseTree header = new AddedParseTree("\n[MODULE_PARAMETERS]");
    ConfigTreeNodeUtilities.addChild(sectionRoot, header);

    ParserRuleContext root = editor.getParseTreeRoot();
    if (root != null) {
        root.addChild(sectionRoot);
    }
}