removed unnecessary projectOpened()/closed()

This commit is contained in:
Alexey Kudravtsev
2015-06-26 14:42:20 +03:00
parent 3a413928f1
commit a6c60c6fc5
4 changed files with 3 additions and 22 deletions
@@ -16,10 +16,8 @@
package com.intellij.openapi.fileEditor;
import com.intellij.openapi.components.impl.ComponentManagerImpl;
import com.intellij.openapi.fileEditor.ex.IdeDocumentHistory;
import com.intellij.openapi.fileEditor.impl.EditorHistoryManager;
import com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl;
import com.intellij.openapi.fileEditor.impl.IdeDocumentHistoryImpl;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.PlatformTestUtil;
@@ -45,8 +43,6 @@ public abstract class HeavyFileEditorManagerTestCase extends CodeInsightFixtureT
super.setUp();
myManager = new FileEditorManagerImpl(getProject(), DockManager.getInstance(getProject()), EditorHistoryManager.getInstance(getProject()));
((ComponentManagerImpl)getProject()).registerComponentInstance(FileEditorManager.class, myManager);
((IdeDocumentHistoryImpl)IdeDocumentHistory.getInstance(getProject())).projectOpened();
EditorHistoryManager.getInstance(getProject()).projectOpened();
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@ import com.intellij.execution.process.ProcessOutput;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.diff.LineTokenizer;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
@@ -96,11 +95,6 @@ public abstract class AbstractVcsTestCase {
projectCreated();
if (myInitChangeListManager) {
((ProjectComponent) ChangeListManager.getInstance(myProject)).projectOpened();
}
((ProjectComponent) VcsDirtyScopeManager.getInstance(myProject)).projectOpened();
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
@@ -165,10 +159,7 @@ public abstract class AbstractVcsTestCase {
protected void tearDownProject() throws Exception {
if (myProject != null) {
((ProjectComponent) VcsDirtyScopeManager.getInstance(myProject)).projectClosed();
((ProjectComponent) ChangeListManager.getInstance(myProject)).projectClosed();
((ChangeListManagerImpl)ChangeListManager.getInstance(myProject)).stopEveryThingIfInTestMode();
((ProjectComponent)ProjectLevelVcsManager.getInstance(myProject)).projectClosed();
myProject = null;
}
if (myProjectFixture != null) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
package org.jetbrains.idea.svn;
import com.intellij.ide.startup.impl.StartupManagerImpl;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vcs.FileStatus;
@@ -96,9 +95,6 @@ public class IgnoredFilesTest extends Svn17TestCase {
myVcsManager = null;
myVcs = null;
((ProjectComponent)myChangeListManager).projectClosed();
((ProjectComponent)myVcsDirtyScopeManager).projectClosed();
tearDownProject();
if (myTempDirFixture != null) {
myTempDirFixture.tearDown();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -238,9 +238,7 @@ public abstract class TaskBranchesTest extends PlatformTestCase {
super.setUp();
myTaskManager = (TaskManagerImpl)TaskManager.getManager(getProject());
myChangeListManager = (ChangeListManagerImpl)ChangeListManager.getInstance(getProject());
myChangeListManager.projectOpened();
myDirtyScopeManager = ((VcsDirtyScopeManagerImpl)VcsDirtyScopeManager.getInstance(getProject()));
myDirtyScopeManager.projectOpened();
}
@NotNull