forked from JavaTX/JavaCompilerCore
Anpassung asynchroner Aufruf des Plugins
======================================== UnifyResultListener muss übergeben werden, da sonst Ergebnisse gemeldet werden (notify), ohne dass das Plugin als UnifyResultListener registriert wurde.
This commit is contained in:
parent
86768153c0
commit
4d4be5420b
@ -34,6 +34,7 @@ import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
import de.dhbwstuttgart.typeinference.unify.TypeUnifyTask;
|
||||
import de.dhbwstuttgart.typeinference.unify.UnifyResultListener;
|
||||
import de.dhbwstuttgart.typeinference.unify.UnifyResultListenerImpl;
|
||||
import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
|
||||
|
||||
@ -277,7 +278,7 @@ public class JavaTXCompiler {
|
||||
}
|
||||
*/
|
||||
|
||||
public UnifyResultModel typeInferenceAsync() throws ClassNotFoundException {
|
||||
public UnifyResultModel typeInferenceAsync(UnifyResultListener resultListener) throws ClassNotFoundException {
|
||||
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
|
||||
//Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
||||
for(SourceFile sf : this.sourceFiles.values()) {
|
||||
@ -288,6 +289,7 @@ public class JavaTXCompiler {
|
||||
final ConstraintSet<Pair> cons = getConstraints();
|
||||
Set<Set<UnifyPair>> results = new HashSet<>();
|
||||
UnifyResultModel urm = new UnifyResultModel();
|
||||
urm.addUnifyResultListener(resultListener);
|
||||
try {
|
||||
Writer logFile = new OutputStreamWriter(new NullOutputStream());
|
||||
//new FileWriter(new File("log_"+sourceFiles.keySet().iterator().next().getName()));
|
||||
|
Loading…
Reference in New Issue
Block a user