mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git.labs.intellij.net:idea/community
This commit is contained in:
@@ -19,6 +19,7 @@ package com.intellij.codeInsight.daemon.impl;
|
||||
import com.intellij.codeInsight.daemon.ChangeLocalityDetector;
|
||||
import com.intellij.codeInspection.SuppressionUtil;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
@@ -166,8 +167,9 @@ public class PsiChangeHandler extends PsiTreeChangeAdapter implements Disposable
|
||||
|
||||
private void updateByChange(PsiElement child, final boolean whitespaceOptimizationAllowed) {
|
||||
final Editor editor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
|
||||
if (editor != null) {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
Application application = ApplicationManager.getApplication();
|
||||
if (editor != null && !application.isUnitTestMode()) {
|
||||
application.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
if (myProject.isDisposed()) return;
|
||||
EditorMarkupModel markupModel = (EditorMarkupModel)editor.getMarkupModel();
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
public final class EmptyIntentionAction implements IntentionAction{
|
||||
private final String myName;
|
||||
|
||||
public EmptyIntentionAction(final String name) {
|
||||
public EmptyIntentionAction(@NotNull String name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
@@ -63,15 +63,11 @@ public final class EmptyIntentionAction implements IntentionAction{
|
||||
|
||||
final EmptyIntentionAction that = (EmptyIntentionAction)o;
|
||||
|
||||
if (myName != null ? !myName.equals(that.myName) : that.myName != null) return false;
|
||||
|
||||
return true;
|
||||
return myName.equals(that.myName);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int result;
|
||||
result = (myName != null ? myName.hashCode() : 0);
|
||||
return result;
|
||||
return myName.hashCode();
|
||||
}
|
||||
|
||||
// used by TeamCity plugin
|
||||
|
||||
@@ -45,24 +45,12 @@ public abstract class WeaksTestCase extends TestCase {
|
||||
|
||||
protected static void gc() {
|
||||
System.gc();
|
||||
try {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
while (Runtime.getRuntime().freeMemory() > 100000) {
|
||||
list.add(new byte[1000]);
|
||||
}
|
||||
|
||||
System.gc();
|
||||
list = null;
|
||||
}
|
||||
catch (OutOfMemoryError e) {
|
||||
// ignore
|
||||
}
|
||||
System.gc();
|
||||
|
||||
WeakReference<Object> weakReference = new WeakReference<Object>(new Object());
|
||||
do {
|
||||
System.gc();
|
||||
}
|
||||
}
|
||||
while (weakReference.get() != null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user