Package com.intellij.openapi.wm.ex

Examples of com.intellij.openapi.wm.ex.ToolWindowManagerEx


    private void addPanel() {
        initTree();
        myStructure = new LeiningenProjectStructure(myProject, myProjectsManager, myTree);
        JPanel panel = new LeiningenProjectNavigatorPanel(myProject, myTree);
        final ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(myProject);
        myToolWindow = manager.registerToolWindow(TOOL_WINDOW_ID, panel, ToolWindowAnchor.RIGHT, myProject, true);
        myToolWindow.setIcon(LeiningenIcons.PROJECT_ICON);
        final ToolWindowManagerAdapter listener = new ToolWindowManagerAdapter() {
            boolean wasVisible = false;

            @Override
            public void stateChanged() {
                if (myToolWindow.isDisposed()) return;
                boolean visible = myToolWindow.isVisible();
                if (!visible || visible == wasVisible) return;
                scheduleStructureUpdate();
                wasVisible = visible;
            }
        };
        manager.addToolWindowManagerListener(listener);
        Disposer.register(myProject, new Disposable() {
            public void dispose() {
                manager.removeToolWindowManagerListener(listener);
            }
        });
        scheduleStructureUpdate();
    }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.wm.ex.ToolWindowManagerEx

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.