Skip to content

Commit

Permalink
Fix SourceViewerInformationControl not updating String input (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
RedeemerSK authored and iloveeclipse committed Jan 25, 2024
1 parent 58c8b0c commit b37394e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ private void initializeFont() {
@Override
public void setInput(Object input) {
String content= null;
boolean doSetInformation= true;
if (input instanceof String) {
content= (String) input;
} else if (input instanceof JavaSourceInformationInput) {
Expand All @@ -388,13 +389,14 @@ public void setInput(Object input) {
fSemanticHighlightingManager.getReconciler().refresh(); // triggers semantic coloring job
} else {
setContentFrom(fSemanticHighlightingViewer);
doSetInformation= false;
}
}
}

if (fViewer.getDocument() == null) {
if (doSetInformation) {
setInformation(content);
} // else document already set to content of fSemanticHighlightingViewer
}

if (fShell != null && !fShell.isDisposed()) {
Display display= fShell.getDisplay();
Expand Down

0 comments on commit b37394e

Please sign in to comment.