Search in sources :

Example 1 with UsageViewManagerImpl

use of com.intellij.usageView.impl.UsageViewManagerImpl in project intellij-community by JetBrains.

the class HiddenSidebarButtonTest method testHiddenButton.

public void testHiddenButton() throws Exception {
    DesktopLayout layout = myManager.getLayout();
    layout.readExternal(JdomKt.loadElement(LAYOUT));
    for (String ID : IDS) {
        assertFalse(layout.isToolWindowRegistered(ID));
        assertTrue(layout.isToolWindowUnregistered(ID));
    }
    ToolWindowEP[] extensions = Extensions.getExtensions(ToolWindowEP.EP_NAME);
    for (ToolWindowEP extension : extensions) {
        if (Arrays.asList(ToolWindowId.TODO_VIEW, ToolWindowId.FIND, ToolWindowId.PROJECT_VIEW).contains(extension.id)) {
            myManager.initToolWindow(extension);
        }
    }
    new UsageViewManagerImpl(myManager.getProject(), myManager);
    for (int i = 0; i < IDS.length; i++) {
        assertTrue(layout.isToolWindowRegistered(IDS[i]));
        assertFalse(layout.isToolWindowUnregistered(IDS[i]));
        assertTrue(ESTIMATED_TO_SHOW[i] == layout.getInfo(IDS[i], true).isShowStripeButton());
        assertTrue(ESTIMATED_VISIBILITY[i] == myManager.getStripeButton(IDS[i]).isVisible());
    }
}
Also used : UsageViewManagerImpl(com.intellij.usageView.impl.UsageViewManagerImpl) ToolWindowEP(com.intellij.openapi.wm.ToolWindowEP)

Aggregations

ToolWindowEP (com.intellij.openapi.wm.ToolWindowEP)1 UsageViewManagerImpl (com.intellij.usageView.impl.UsageViewManagerImpl)1