Merge branch 'TrickView_EDT_Compliance' into AssertJ_Swing_Tests

This commit is contained in:
Marcus Rockwell 2024-11-13 12:31:11 -05:00
commit de668a7c2e

View File

@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.StringReader; import java.io.StringReader;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
import java.net.URI; import java.net.URI;
import java.time.LocalTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
@ -142,7 +143,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
Collection<SieTemplate> rootInstances; Collection<SieTemplate> rootInstances;
/** the S_sie.resource parsing thread */ /** the S_sie.resource parsing thread */
SwingWorker<Void, Void> sieSwingWorker; SwingWorker<Void, String> sieSwingWorker;
/** exposes the variable hierarchy */ /** exposes the variable hierarchy */
protected TVVariableTree variableTree; protected TVVariableTree variableTree;
@ -1158,7 +1159,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
* results * results
*/ */
private void processSieFile() { private void processSieFile() {
sieSwingWorker = new SwingWorker<Void, Void>() { sieSwingWorker = new SwingWorker<Void, String>() {
{ {
execute(); execute();
@ -1166,7 +1167,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
@Override @Override
public Void doInBackground() throws Exception { public Void doInBackground() throws Exception {
statusLabel.setText("Receiving S_sie.resource file"); publish("Receiving S_sie.resource file");
VariableServerConnection sieChannel = new VariableServerConnection(getHostName(), getPort()); VariableServerConnection sieChannel = new VariableServerConnection(getHostName(), getPort());
//sieChannel.setDebugLevel(3); //sieChannel.setDebugLevel(3);
@ -1203,13 +1204,21 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
sieChannel.close(); sieChannel.close();
if (!isCancelled()) { if (!isCancelled()) {
statusLabel.setText("Parsing S_sie.resource file"); publish("Parsing S_sie.resource file");
rootInstances = SieResourceDomParser.parse(new InputSource(new StringReader(sieData.toString()))); rootInstances = SieResourceDomParser.parse(new InputSource(new StringReader(sieData.toString())));
} }
return null; return null;
} }
@Override
protected void process(List<String> chunks) {
int length = chunks.size();
if (length > 0) {
statusLabel.setText(chunks.get(length - 1));
}
}
@Override @Override
protected void done() { protected void done() {
statusLabel.setText(null); statusLabel.setText(null);