Package org.antlr.works.stringtemplate.menu

Examples of org.antlr.works.stringtemplate.menu.ContextualStringTemplateMenuFactory.addItem()


        boolean overReference = window.getCurrentReference() != null;
        boolean overToken = window.getCurrentToken() != null;
        boolean overSelection = window.getTextPane().getSelectionStart() != window.getTextPane().getSelectionEnd();

        ContextualStringTemplateMenuFactory factory = new ContextualStringTemplateMenuFactory(this);
        factory.addItem(MI_GOTO_RULE);
        if(overReference)
            factory.addItem(MI_GOTO_DECLARATION);

        factory.addSeparator();
        if(overToken)
View Full Code Here


        boolean overSelection = window.getTextPane().getSelectionStart() != window.getTextPane().getSelectionEnd();

        ContextualStringTemplateMenuFactory factory = new ContextualStringTemplateMenuFactory(this);
        factory.addItem(MI_GOTO_RULE);
        if(overReference)
            factory.addItem(MI_GOTO_DECLARATION);

        factory.addSeparator();
        if(overToken)
            factory.addItem(MI_RENAME);
View Full Code Here

        if(overReference)
            factory.addItem(MI_GOTO_DECLARATION);

        factory.addSeparator();
        if(overToken)
            factory.addItem(MI_RENAME);

        if(overToken) {
            factory.addSeparator();
            if(overSelection)
                factory.addItem(MI_FIND_TOKEN);
View Full Code Here

            factory.addItem(MI_RENAME);

        if(overToken) {
            factory.addSeparator();
            if(overSelection)
                factory.addItem(MI_FIND_TOKEN);
            //factory.addItem(MI_FIND_USAGE);
        }

        return factory.menu;
    }
View Full Code Here

        stRulesPanel.refreshRules();
    }

    public JPopupMenu rulesGetContextualMenu() {
        ContextualStringTemplateMenuFactory factory = createContextualStringTemplateMenuFactory();
        XJMenuItemCheck item = (XJMenuItemCheck) factory.addItem(STWindowMenu.MI_SORT_RULES);
        item.setSelected(isRulesSorted());

        return factory.menu;
    }
View Full Code Here

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.