mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -19,19 +19,12 @@ package com.intellij.openapi.wm.impl.status;
|
||||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
|
||||
import com.intellij.codeInsight.daemon.impl.HectorComponent;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightLevelUtil;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.ide.PowerSaveMode;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerAdapter;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerEvent;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
|
||||
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.StatusBar;
|
||||
import com.intellij.openapi.wm.StatusBarWidget;
|
||||
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -39,7 +32,6 @@ import com.intellij.psi.PsiManager;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.messages.MessageBusConnection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class FragmentContent extends DiffContent {
|
||||
private final DiffContent myOriginal;
|
||||
private final FileType myType;
|
||||
private final MyDocumentsSynchonizer mySynchonizer;
|
||||
public final static Key<Document> ORIGINAL_DOCUMENT = new Key<Document>("ORIGINAL_DOCUMENT");
|
||||
public static final Key<Document> ORIGINAL_DOCUMENT = new Key<Document>("ORIGINAL_DOCUMENT");
|
||||
|
||||
public FragmentContent(DiffContent original, TextRange range, Project project, VirtualFile file) {
|
||||
this(original, range, project, file != null ? DiffContentUtil.getContentType(file) : null);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.util;
|
||||
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -62,11 +63,16 @@ public class ExecutionCallback {
|
||||
}
|
||||
|
||||
private void callback() {
|
||||
if (myExecuted.isExecuted() && myRunnables != null) {
|
||||
if (myExecuted.isExecuted()) {
|
||||
Runnable[] all;
|
||||
synchronized (this) {
|
||||
all = myRunnables.toArray(new Runnable[myRunnables.size()]);
|
||||
myRunnables.clear();
|
||||
if (myRunnables == null) {
|
||||
all = ArrayUtil.EMPTY_RUNNABLE_ARRAY;
|
||||
}
|
||||
else {
|
||||
all = myRunnables.toArray(new Runnable[myRunnables.size()]);
|
||||
myRunnables.clear();
|
||||
}
|
||||
}
|
||||
for (Runnable each : all) {
|
||||
each.run();
|
||||
|
||||
@@ -50,6 +50,7 @@ public class ArrayUtil {
|
||||
return newStringArray(count);
|
||||
}
|
||||
};
|
||||
public static final Runnable[] EMPTY_RUNNABLE_ARRAY = new Runnable[0];
|
||||
|
||||
@NotNull
|
||||
public static byte[] realloc(@NotNull byte[] array, final int newSize) {
|
||||
|
||||
Reference in New Issue
Block a user