Package de.loskutov.bco.ui.actions

Examples of de.loskutov.bco.ui.actions.DefaultToggleAction


                    tableControl.setSelection(selectionIndex);
                }
            }
        };

        linkWithEditorAction = new DefaultToggleAction(
            BCOConstants.LINK_VIEW_TO_EDITOR) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_LINK_VIEW_TO_EDITOR, newState);
                if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) {
                    showSelectedOnlyAction.setEnabled(true);
                    toggleVerifierAction.setEnabled(true);
                    hideLineInfoAction.setEnabled(true);
                    hideLocalsAction.setEnabled(true);
                    toggleASMifierModeAction.setEnabled(true);
                    if (!toggleASMifierModeAction.isChecked()) {
                        setRawModeAction.setEnabled(true);
                    }
                    activateView();
                    checkOpenEditors(true);
                    inputChanged = true;
                    refreshView();
                }
            }
        };

        showSelectedOnlyAction = new DefaultToggleAction(
            BCOConstants.SHOW_ONLY_SELECTED_ELEMENT) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, newState);
                inputChanged = true;
                refreshView();
            }
        };

        setRawModeAction = new DefaultToggleAction(
            BCOConstants.SHOW_RAW_BYTECODE) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_RAW_BYTECODE, newState);
                inputChanged = true;
                refreshView();
            }
        };

        hideLineInfoAction = new DefaultToggleAction(
            BCOConstants.SHOW_LINE_INFO) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_LINE_INFO, newState);
                inputChanged = true;
                refreshView();
            }
        };

        hideLocalsAction = new DefaultToggleAction(BCOConstants.SHOW_VARIABLES) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_VARIABLES, newState);
                inputChanged = true;
                refreshView();
            }
        };

        hideStackMapAction = new DefaultToggleAction(BCOConstants.SHOW_STACKMAP) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_STACKMAP, newState);
                inputChanged = true;
                refreshView();
            }
        };

        expandStackMapAction = new DefaultToggleAction(
            BCOConstants.EXPAND_STACKMAP) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_EXPAND_STACKMAP, newState);
                inputChanged = true;
                refreshView();
            }
        };

        showHexValuesAction = new DefaultToggleAction(
            BCOConstants.SHOW_HEX_VALUES) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_HEX_VALUES, newState);
                inputChanged = true;
                refreshView();
            }
        };

        toggleASMifierModeAction = new DefaultToggleAction(
            BCOConstants.SHOW_ASMIFIER_CODE) {

            public void run(boolean newState) {
                setMode(BCOConstants.F_SHOW_ASMIFIER_CODE, newState);
                if (newState) {
                    setMode(BCOConstants.F_SHOW_RAW_BYTECODE, true);
                    setRawModeAction.setEnabled(false);
                } else {
                    setRawModeAction.setEnabled(true);
                }
                inputChanged = true;
                refreshView();
            }
        };

        toggleVerifierAction = new DefaultToggleAction(
            BCOConstants.SHOW_ANALYZER) {

            public void run(boolean newState) {
                toggleVerifyMode(mmanager, newState);
                inputChanged = true;
View Full Code Here


    public void createPartControl(Composite parent) {
        browser = new Browser(parent, SWT.BORDER);
        final IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow();
        linkWithView = BytecodeOutlinePlugin.getDefault().getPreferenceStore()
            .getBoolean(BCOConstants.LINK_REF_VIEW_TO_EDITOR);
        linkWithViewAction = new DefaultToggleAction(BCOConstants.LINK_REF_VIEW_TO_EDITOR){
            public void run(boolean newState) {
                linkWithView = newState;
                if(linkWithView){
                    ISelectionService selectionService = workbenchWindow
                        .getSelectionService();
View Full Code Here

     */
    public BytecodeCompare(final TypedElement left, final TypedElement right) {
        super(new CompareConfiguration());
        this.left = left;
        this.right = right;
        toggleAsmifierModeAction = new DefaultToggleAction(
            BCOConstants.DIFF_SHOW_ASMIFIER_CODE, false) {

            public void run(final boolean newState) {
                toggleMode(
                    BCOConstants.F_SHOW_ASMIFIER_CODE, newState, newState);
            }
        };

        hideLineInfoAction = new DefaultToggleAction(
            BCOConstants.DIFF_SHOW_LINE_INFO, false) {

            public void run(final boolean newState) {
                toggleMode(
                    BCOConstants.F_SHOW_LINE_INFO, newState,
                    toggleAsmifierModeAction.isChecked());
            }
        };

        hideLocalsAction = new DefaultToggleAction(
            BCOConstants.DIFF_SHOW_VARIABLES, false) {

            public void run(final boolean newState) {
                toggleMode(
                    BCOConstants.F_SHOW_VARIABLES, newState,
                    toggleAsmifierModeAction.isChecked());
            }
        };

        hideStackMapAction = new DefaultToggleAction(
            BCOConstants.DIFF_SHOW_STACKMAP, false) {

            public void run(final boolean newState) {
                toggleMode(
                    BCOConstants.F_SHOW_STACKMAP, newState,
                    toggleAsmifierModeAction.isChecked());
            }
        };

        expandStackMapAction = new DefaultToggleAction(
            BCOConstants.DIFF_EXPAND_STACKMAP, false) {

            public void run(final boolean newState) {
                toggleMode(
                    BCOConstants.F_EXPAND_STACKMAP, newState,
View Full Code Here

TOP

Related Classes of de.loskutov.bco.ui.actions.DefaultToggleAction

Copyright © 2018 www.massapicom. 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.