mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -105,8 +105,7 @@ public abstract class CodeInsightTestCase extends PsiTestCase {
|
||||
try {
|
||||
if (myProject != null) {
|
||||
FileEditorManager editorManager = FileEditorManager.getInstance(myProject);
|
||||
VirtualFile[] openFiles = editorManager.getOpenFiles();
|
||||
for (VirtualFile openFile : openFiles) {
|
||||
for (VirtualFile openFile : editorManager.getOpenFiles()) {
|
||||
editorManager.closeFile(openFile);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -59,8 +59,7 @@ public class AddAllOpenFilesToFavorites extends AnAction implements DumbAware {
|
||||
ArrayList<PsiFile> result = new ArrayList<>();
|
||||
final FileEditorManager editorManager = FileEditorManager.getInstance(project);
|
||||
final PsiManager psiManager = PsiManager.getInstance(project);
|
||||
final VirtualFile[] openFiles = editorManager.getOpenFiles();
|
||||
for (VirtualFile openFile : openFiles) {
|
||||
for (VirtualFile openFile : editorManager.getOpenFiles()) {
|
||||
if (!openFile.isValid()) continue;
|
||||
final PsiFile psiFile = psiManager.findFile(openFile);
|
||||
if (psiFile != null) {
|
||||
|
||||
+1
-2
@@ -297,8 +297,7 @@ public abstract class LightPlatformCodeInsightTestCase extends LightPlatformTest
|
||||
protected void tearDown() throws Exception {
|
||||
try {
|
||||
FileEditorManager editorManager = FileEditorManager.getInstance(getProject());
|
||||
VirtualFile[] openFiles = editorManager.getOpenFiles();
|
||||
for (VirtualFile openFile : openFiles) {
|
||||
for (VirtualFile openFile : editorManager.getOpenFiles()) {
|
||||
editorManager.closeFile(openFile);
|
||||
}
|
||||
deleteVFile();
|
||||
|
||||
+1
-2
@@ -1174,8 +1174,7 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true); // return default value to avoid unnecessary save
|
||||
FileEditorManager editorManager = FileEditorManager.getInstance(getProject());
|
||||
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
|
||||
VirtualFile[] openFiles = editorManager.getOpenFiles();
|
||||
for (VirtualFile openFile : openFiles) {
|
||||
for (VirtualFile openFile : editorManager.getOpenFiles()) {
|
||||
editorManager.closeFile(openFile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user