Skip to content

Commit

Permalink
SLE-396 Fix NPE in Neon
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Nov 13, 2020
1 parent e70aff5 commit 3f4fb03
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.core.resources.IMarker;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
Expand Down Expand Up @@ -116,8 +116,8 @@ public void partInputChanged(IWorkbenchPartReference partRef) {

public SonarLintFlowAnnotator(ITextEditor textEditor) {
this.textEditor = textEditor;
ITextViewer textViewer = textEditor.getAdapter(ITextViewer.class);
textViewer.getDocument().addDocumentListener(new IDocumentListener() {
IDocument doc = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
doc.addDocumentListener(new IDocumentListener() {

@Override
public void documentChanged(DocumentEvent event) {
Expand Down

0 comments on commit 3f4fb03

Please sign in to comment.