mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move registerResourceTemporarily() to ExternalResourceManagerImpl
This commit is contained in:
@@ -31,7 +31,6 @@ import com.intellij.openapi.editor.*;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||
import com.intellij.openapi.editor.ex.DocumentEx;
|
||||
import com.intellij.openapi.editor.impl.DocumentImpl;
|
||||
import com.intellij.openapi.editor.impl.EditorImpl;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
@@ -708,22 +707,4 @@ public abstract class CodeInsightTestCase extends PsiTestCase {
|
||||
assertNotNull("Package " + name + " not found", aPackage);
|
||||
return aPackage;
|
||||
}
|
||||
protected void registerResourceTemporarily(final String url, final String location) {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
ExternalResourceManager.getInstance().addResource(url, location);
|
||||
}
|
||||
});
|
||||
|
||||
Disposer.register(getTestRootDisposable(), new Disposable() {
|
||||
@Override
|
||||
public void dispose() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
ExternalResourceManager.getInstance().removeResource(url);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user