mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 17:03:12 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -20,8 +20,9 @@ import com.intellij.execution.junit2.SegmentedInputStream;
|
||||
import com.intellij.execution.testframework.Printable;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.rt.execution.junit.segments.PacketProcessor;
|
||||
import com.intellij.util.ui.update.MergingUpdateQueue;
|
||||
import com.intellij.util.ui.update.Update;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -34,6 +35,7 @@ public class Extractor {
|
||||
private final SegmentedInputStream myStream;
|
||||
private OutputPacketProcessor myEventsDispatcher;
|
||||
private static final Logger LOG = Logger.getInstance("#" + Extractor.class.getName());
|
||||
private MergingUpdateQueue myQueue = new MergingUpdateQueue("Test Extractor", 20, true, MergingUpdateQueue.ANY_COMPONENT);
|
||||
|
||||
public Extractor(final InputStream stream, final Charset charset) {
|
||||
myStream = new SegmentedInputStream(stream, charset);
|
||||
@@ -46,7 +48,8 @@ public class Extractor {
|
||||
public void setPacketDispatcher(final PacketProcessor packetProcessor, final DeferredActionsQueue queue) {
|
||||
myFulfilledWorkGate = new DeferredActionsQueue() { //todo make it all later
|
||||
public void addLast(final Runnable runnable) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
myQueue.queue(new Update(runnable) {
|
||||
@Override
|
||||
public void run() {
|
||||
queue.addLast(runnable);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Mappings {
|
||||
final DependencyContext.S file = myClassToSourceFile.get(it);
|
||||
|
||||
if (file != null) {
|
||||
myChangedFiles.add(it);
|
||||
myChangedFiles.add(file);
|
||||
}
|
||||
|
||||
myIsDifferentiated = true;
|
||||
@@ -1625,13 +1625,7 @@ public class Mappings {
|
||||
myClassToSourceFile.put(c, sourceFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
myClassToSubclasses.putAll(delta.myClassToSubclasses);
|
||||
myClassToSourceFile.putAll(delta.myClassToSourceFile);
|
||||
}
|
||||
|
||||
if (delta.isDifferentiated() && false) {
|
||||
for (DependencyContext.S f : delta.getChangedFiles()) {
|
||||
mySourceFileToClasses.remove(f);
|
||||
final Collection<ClassRepr> classes = delta.mySourceFileToClasses.get(f);
|
||||
@@ -1653,6 +1647,9 @@ public class Mappings {
|
||||
}
|
||||
}
|
||||
else {
|
||||
myClassToSubclasses.putAll(delta.myClassToSubclasses);
|
||||
myClassToSourceFile.putAll(delta.myClassToSourceFile);
|
||||
|
||||
mySourceFileToClasses.replaceAll(delta.mySourceFileToClasses);
|
||||
mySourceFileToUsages.replaceAll(delta.mySourceFileToUsages);
|
||||
mySourceFileToAnnotationUsages.replaceAll(delta.mySourceFileToAnnotationUsages);
|
||||
|
||||
@@ -365,11 +365,13 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
|
||||
private void addFlushRequest(MyFlushRunnable flushRunnable, final int millis) {
|
||||
synchronized (myCurrentRequests) {
|
||||
myCurrentRequests.add(flushRunnable);
|
||||
myFlushAlarm.addRequest(flushRunnable, millis, getStateForUpdate());
|
||||
if (myCurrentRequests.add(flushRunnable)) {
|
||||
myFlushAlarm.addRequest(flushRunnable, millis, getStateForUpdate());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void assertIsDispatchThread() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
}
|
||||
@@ -1698,6 +1700,23 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
public boolean isValid() {
|
||||
return myValid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
MyFlushRunnable runnable = (MyFlushRunnable)o;
|
||||
|
||||
if (myValid != runnable.myValid) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (myValid ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
private final class MyClearRunnable extends MyFlushRunnable {
|
||||
|
||||
@@ -13,7 +13,7 @@ duplication.anonymize.fields.checkbox=Anonymize &Fields
|
||||
duplication.anonymize.local.variables.checkbox=Anonymize Local &Variables
|
||||
duplication.minimum.cost.label=Do not show duplicates simpler than
|
||||
duplication.anonymize.uncommon.label=Anonymize uncommon subexpressions simpler than
|
||||
duplicate.anonymize.uncommon.description=(The higher the value is the slower it works)
|
||||
duplicate.anonymize.uncommon.description=<html>(The higher the value is the slower it works.<br> Values greater than 0 abstragate code structure)</html>
|
||||
duplicate.anonymize.uncommon.outside.scope.checkbox=Visible from &outside of the scope only
|
||||
duplicate.location.single.line=line {0} in {1}
|
||||
duplicate.location.multiple.lines=lines {0} to {1} in {2}
|
||||
|
||||
Reference in New Issue
Block a user