Search in sources :

Example 1 with ComponentManagerImpl

use of com.intellij.openapi.components.impl.ComponentManagerImpl in project intellij-community by JetBrains.

the class NonProjectFileAccessTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    EditorNotifications notifications = new EditorNotificationsImpl(getProject());
    ((ComponentManagerImpl) getProject()).registerComponentInstance(EditorNotifications.class, notifications);
    NonProjectFileWritingAccessProvider.enableChecksInTests(getProject());
    ProjectManagerEx.getInstanceEx().blockReloadingProjectOnExternalChanges();
}
Also used : EditorNotifications(com.intellij.ui.EditorNotifications) EditorNotificationsImpl(com.intellij.ui.EditorNotificationsImpl) ComponentManagerImpl(com.intellij.openapi.components.impl.ComponentManagerImpl)

Example 2 with ComponentManagerImpl

use of com.intellij.openapi.components.impl.ComponentManagerImpl in project intellij-community by JetBrains.

the class ReformatOnlyVcsChangedTextTest method registerChangeListManager.

private static void registerChangeListManager(@NotNull ChangeListManager manager) {
    Project project = getProject();
    assert (project instanceof ComponentManagerImpl);
    ComponentManagerImpl projectComponentManager = (ComponentManagerImpl) project;
    projectComponentManager.registerComponentInstance(ChangeListManager.class, manager);
}
Also used : Project(com.intellij.openapi.project.Project) ComponentManagerImpl(com.intellij.openapi.components.impl.ComponentManagerImpl)

Example 3 with ComponentManagerImpl

use of com.intellij.openapi.components.impl.ComponentManagerImpl in project intellij-community by JetBrains.

the class FileEditorManagerTestCase method tearDown.

@Override
protected void tearDown() throws Exception {
    try {
        for (DockContainer container : DockManager.getInstance(getProject()).getContainers()) {
            if (!myOldDockContainers.contains(container)) {
                Disposer.dispose(container);
            }
        }
        myOldDockContainers = null;
        ((ComponentManagerImpl) getProject()).registerComponentInstance(FileEditorManager.class, myOldManager);
        myManager.closeAllFiles();
        ((FileEditorProviderManagerImpl) FileEditorProviderManager.getInstance()).clearSelectedProviders();
    } finally {
        myManager = null;
        myOldManager = null;
        super.tearDown();
    }
}
Also used : DockContainer(com.intellij.ui.docking.DockContainer) ComponentManagerImpl(com.intellij.openapi.components.impl.ComponentManagerImpl) FileEditorProviderManagerImpl(com.intellij.openapi.fileEditor.impl.FileEditorProviderManagerImpl)

Example 4 with ComponentManagerImpl

use of com.intellij.openapi.components.impl.ComponentManagerImpl in project intellij-community by JetBrains.

the class HeavyFileEditorManagerTestCase method setUp.

public void setUp() throws Exception {
    super.setUp();
    myManager = new FileEditorManagerImpl(getProject(), DockManager.getInstance(getProject()));
    ((ComponentManagerImpl) getProject()).registerComponentInstance(FileEditorManager.class, myManager);
}
Also used : FileEditorManagerImpl(com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl) ComponentManagerImpl(com.intellij.openapi.components.impl.ComponentManagerImpl)

Aggregations

ComponentManagerImpl (com.intellij.openapi.components.impl.ComponentManagerImpl)4 FileEditorManagerImpl (com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl)1 FileEditorProviderManagerImpl (com.intellij.openapi.fileEditor.impl.FileEditorProviderManagerImpl)1 Project (com.intellij.openapi.project.Project)1 EditorNotifications (com.intellij.ui.EditorNotifications)1 EditorNotificationsImpl (com.intellij.ui.EditorNotificationsImpl)1 DockContainer (com.intellij.ui.docking.DockContainer)1