From e4066b51251d47314ec18c821c7f1f06ceb9d404 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Mon, 13 Apr 2020 16:10:24 +0200 Subject: [PATCH] modified: bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/Typinferenz.java Bug 180 - Andere Einsetzung als im Bytecode geloest --- .../src/typinferenzplugin/Typinferenz.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/Typinferenz.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/Typinferenz.java index d09b66d..c3311d2 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/Typinferenz.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/Typinferenz.java @@ -93,13 +93,13 @@ public class Typinferenz { Set tips = new HashSet<>(); String outputDirectory = getOutputDirectory(); - List genericResults = new ArrayList<>();//wird in getBytecode bestimmt + List simplifyResultsForAllSourceFiles = new ArrayList<>();//wird in getBytecode bestimmt if (this.forByteCode.size() > 0) { for (SourceFile sf : compiler.sourceFiles.values()) { try { - HashMap bytecode = getBytecode(sf, this.forByteCode, outputDirectory, genericResults); - compiler.generateBytecodForFile(outputDirectory, bytecode, sf, new ArrayList<>(forByteCode)); - this.writeClassFile(outputDirectory, bytecode); + //HashMap bytecode = getBytecode(sf, this.forByteCode, outputDirectory, genericResults); + compiler.generateBytecodForFile(outputDirectory, /*bytecode,*/ sf, new ArrayList<>(forByteCode), simplifyResultsForAllSourceFiles); + //this.writeClassFile(outputDirectory, bytecode); } catch (BytecodeGeneratorError | IOException ex) { ErrorMarker toAdd = new ErrorMarker(ex.getMessage(), new CodePoint(sf.getOffset())); ret.add(toAdd); @@ -108,7 +108,7 @@ public class Typinferenz { } int i = 0; for (ResultSet tiResult : newResults) { - tips.addAll(TypeInsertFactory.createTypeInsertPoints(parsedSource, tiResult, newResults, genericResults.get(i))); + tips.addAll(TypeInsertFactory.createTypeInsertPoints(parsedSource, tiResult, newResults, simplifyResultsForAllSourceFiles)); i++; for (TypeInsert p : tips) { TypeReplaceMarker toAdd = new TypeReplaceMarker(editor, tiResult, p); @@ -167,6 +167,7 @@ public class Typinferenz { return ret; } + //wird nicht mehr benoetigt public synchronized HashMap getBytecode(SourceFile sf, Collection resultSets, String path, List genericResultsRet) { try { HashMap classFiles = new HashMap<>();