From 07e034a638ef32804f1c15b8ad6bef5a7e65fec7 Mon Sep 17 00:00:00 2001 From: Michael Uhl Date: Tue, 15 Jan 2019 23:12:53 +0100 Subject: [PATCH] =?UTF-8?q?Marker=20verschwinden=20jetzt.=20(Zun=C3=A4chst?= =?UTF-8?q?=20ohne=20Annotation).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/typinferenzplugin/editor/JafCompletionProcess.java | 5 ++--- .../src/typinferenzplugin/editor/JavEditor.java | 3 ++- .../src/typinferenzplugin/editor/JavViewerConfiguration.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JafCompletionProcess.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JafCompletionProcess.java index 47d85b4..a0998ab 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JafCompletionProcess.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JafCompletionProcess.java @@ -1,7 +1,6 @@ package typinferenzplugin.editor; -import static org.eclipse.core.runtime.IStatus.ERROR; -import static org.eclipse.core.runtime.IStatus.WARNING; +import static org.eclipse.core.runtime.IStatus.*; import static typinferenzplugin.Activator.PLUGIN_ID; import java.lang.reflect.Field; @@ -43,7 +42,7 @@ public class JafCompletionProcess implements IContentAssistProcessor { public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { try { IDocument doc = viewer.getDocument(); - + if (isAfterDotOper(offset, doc)) { String prefix = lastWord(doc, offset); diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java index dcd52c7..2d6d87f 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java @@ -155,7 +155,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(); @@ -183,6 +183,7 @@ public class JavEditor extends TextEditor{ iamf.connect(document); iamf.addAnnotation(ma,new Position(offset,1)); iamf.disconnect(document); + return ma; } diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavViewerConfiguration.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavViewerConfiguration.java index 3bd516f..07519d4 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavViewerConfiguration.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavViewerConfiguration.java @@ -125,6 +125,7 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie QuickAssistAssistant ret = new QuickAssistAssistant(); ret.setQuickAssistProcessor(new QuickAssistProcessor(this.editor)); ret.setInformationControlCreator(getInformationControlCreator(sourceViewer)); + return ret; }