From 14c49c22a72c6f2be4eee4856b73a1b1b5680f62 Mon Sep 17 00:00:00 2001 From: Michael Uhl Date: Tue, 15 Jan 2019 23:21:25 +0100 Subject: [PATCH] Marker verschwinden jetzt. --- .../src/typinferenzplugin/editor/JavEditor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java index 2d6d87f..8516b8b 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java @@ -120,7 +120,7 @@ public class JavEditor extends TextEditor{ }catch(TypeinferenceException texc){ markers.add(new ErrorMarker(texc.getMessage(),new CodePoint(texc.getOffset()))); } - //Anschlie�end die TypeReplaceMarker im Quellcode anzeigen: https://stackoverflow.com/questions/8945371/how-to-implement-quick-fix-quick-assist-for-custom-eclipse-editor + //Anschließend die TypeReplaceMarker im Quellcode anzeigen: https://stackoverflow.com/questions/8945371/how-to-implement-quick-fix-quick-assist-for-custom-eclipse-editor System.out.println("Typinferez durchgef�hrt. Berechnete Marker:\n"+markers); IResource activeDocument = extractResource(); @@ -130,6 +130,7 @@ public class JavEditor extends TextEditor{ this.placeMarkers(activeDocument, markers); } this.sourceFile = typeinference.getSourceFile(); + this.errorMarkers.addAll(markers); this.updateOutlinePage(); //this.outlinePage.update(this.sourceFile,this.markers); } @@ -155,7 +156,7 @@ public class JavEditor extends TextEditor{ String message = rm.getMessage(); m.setAttribute(IMarker.MESSAGE, message); m.setAttribute(IMarker.SEVERITY, 1); - //rm.setAnnotation(this.addAnnotation(m, point.getPositionInCode())); + rm.setAnnotation(this.addAnnotation(m, point.getPositionInCode())); } catch (CoreException e) { new ErrorOutput("Fehler beim Generieren eines Markers"); e.printStackTrace(); @@ -188,7 +189,7 @@ public class JavEditor extends TextEditor{ } /** - * L�scht die zu marker geh�rende Annotation + * Löscht die zu marker geh�rende Annotation * @param marker */ private void deleteAnnotation(JavMarker marker){