Fix wrong result being passed and remove log spam
This commit is contained in:
parent
7c6cd3a4cf
commit
46aac7e366
@ -69,7 +69,6 @@ public class Typinferenz {
|
||||
if (Strings.isNullOrEmpty(editor.getSourceCode())) {
|
||||
return new UnifyResultModel(new ConstraintSet<>(), new FiniteClosure(new HashSet<>(), new OutputStreamWriter(new NullOutputStream())));
|
||||
}
|
||||
|
||||
return compiler.typeInferenceAsync(resultListener, new OutputStreamWriter(new NullOutputStream()));
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOG.log(new Status(ERROR, PLUGIN_ID, e.getMessage(), e));
|
||||
@ -84,7 +83,7 @@ public class Typinferenz {
|
||||
return this.forByteCode;
|
||||
}
|
||||
|
||||
public Vector<JavMarker> updateWithResult(Vector<JavMarker> ret, List<ResultSet> newResults) {
|
||||
public synchronized Vector<JavMarker> updateWithResult(Vector<JavMarker> ret, List<ResultSet> newResults) {
|
||||
this.tiResults.addAll(newResults);
|
||||
this.forByteCode.addAll(newResults);
|
||||
|
||||
@ -95,7 +94,7 @@ public class Typinferenz {
|
||||
if (this.forByteCode.size() > 0) {
|
||||
for (SourceFile sf : compiler.sourceFiles.values()) {
|
||||
try {
|
||||
var generatedClasses = compiler.generateBytecode(sf, newResults);
|
||||
var generatedClasses = compiler.generateBytecode(sf, tiResults);
|
||||
compiler.writeClassFile(generatedClasses, new File(outputDirectory));
|
||||
} catch (IOException ex) {
|
||||
ErrorMarker toAdd = new ErrorMarker(ex.getMessage(), new CodePoint(sf.getOffset()));
|
||||
|
@ -105,7 +105,7 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
|
||||
IResourceChangeListener listener = new IResourceChangeListener() {
|
||||
@Override
|
||||
public void resourceChanged(IResourceChangeEvent arg0) {
|
||||
System.out.println("Text changed");
|
||||
//System.out.println("Text changed");
|
||||
}
|
||||
};
|
||||
ResourcesPlugin.getWorkspace().addResourceChangeListener(listener);
|
||||
|
Loading…
Reference in New Issue
Block a user