Package org.antlr.works.grammar.decisiondfa

Source Code of org.antlr.works.grammar.decisiondfa.DecisionDFAItem

package org.antlr.works.grammar.decisiondfa;

import org.antlr.works.components.GrammarWindow;
import org.antlr.works.editor.EditorInspectorItem;
import org.antlr.works.editor.idea.IdeaAction;

import java.util.ArrayList;
import java.util.List;

public class DecisionDFAItem extends EditorInspectorItem {

    private GrammarWindow window;

    public DecisionDFAItem(GrammarWindow window) {
        this.window = window;
    }

    @Override
    public List<IdeaAction> getIdeaActions() {
        List<IdeaAction> actions = new ArrayList<IdeaAction>();
        actions.add(new IdeaAction("Show Decision DFA", this, IDEA_DECISION_DFA, token));
        return actions;
    }

    @Override
    public void ideaActionFire(IdeaAction action, int actionID) {
        switch(actionID) {
            case IDEA_DECISION_DFA:
                DecisionDFA decision = new DecisionDFA(window);
                decision.launch();
                break;
        }
    }

}
TOP

Related Classes of org.antlr.works.grammar.decisiondfa.DecisionDFAItem

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.