mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fork junit tests: initial
This commit is contained in:
+11
-2
@@ -23,8 +23,9 @@ public abstract class OutputObjectRegistry {
|
||||
private int myLastIndex = 0;
|
||||
private PacketProcessor myMainTransport;
|
||||
|
||||
public OutputObjectRegistry(PacketProcessor transport) {
|
||||
myMainTransport = transport;
|
||||
protected OutputObjectRegistry(PacketProcessor mainTransport, int lastIndex) {
|
||||
myLastIndex = lastIndex;
|
||||
myMainTransport = mainTransport;
|
||||
}
|
||||
|
||||
public String referenceTo(Object test) {
|
||||
@@ -97,4 +98,12 @@ public abstract class OutputObjectRegistry {
|
||||
public void forget(Object test) {
|
||||
myKnownKeys.remove(test);
|
||||
}
|
||||
|
||||
public int getKnownObject(Object description) {
|
||||
final Object o = myKnownKeys.get(description);
|
||||
if (o instanceof String) {
|
||||
return Integer.parseInt((String)o);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -24,7 +24,12 @@ public class SegmentedOutputStream extends OutputStream implements PacketProcess
|
||||
private boolean myStarted = false;
|
||||
|
||||
public SegmentedOutputStream(PrintStream transportStream) {
|
||||
this(transportStream, false);
|
||||
}
|
||||
|
||||
public SegmentedOutputStream(PrintStream transportStream, boolean started) {
|
||||
myPrintStream = transportStream;
|
||||
myStarted = started;
|
||||
try {
|
||||
flush();
|
||||
}
|
||||
@@ -75,4 +80,8 @@ public class SegmentedOutputStream extends OutputStream implements PacketProcess
|
||||
writeNext(SegmentedStream.STARTUP_MESSAGE);
|
||||
myStarted = true;
|
||||
}
|
||||
|
||||
public PrintStream getPrintStream() {
|
||||
return myPrintStream;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user