Skip to content

Commit

Permalink
[#615] fix missing space in outline view text
Browse files Browse the repository at this point in the history
fixes #615
  • Loading branch information
ghentschke authored and mickaelistria committed May 15, 2023
1 parent c6d9e20 commit 0750c3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void testDocumentSymbolDetail () {
DocumentSymbol info = new DocumentSymbol("Foo", SymbolKind.Class,
new Range(new Position(1, 0), new Position(1, 2)),
new Range(new Position(1, 0), new Position(1, 2)),
" : additional detail");
": additional detail");
assertEquals("Foo : additional detail", labelProvider.getStyledText(info).getString());
}

Expand All @@ -82,7 +82,7 @@ public void testDocumentSymbolDetailWithKind () {
DocumentSymbol info = new DocumentSymbol("Foo", SymbolKind.Class,
new Range(new Position(1, 0), new Position(1, 2)),
new Range(new Position(1, 0), new Position(1, 2)),
" : additional detail");
": additional detail");
assertEquals("Foo : additional detail :Class", labelProvider.getStyledText(info).getString());
}

Expand All @@ -92,7 +92,7 @@ public void testDocumentSymbolWithFileDetail () {
DocumentSymbol info = new DocumentSymbol("Foo", SymbolKind.Class,
new Range(new Position(1, 0), new Position(1, 2)),
new Range(new Position(1, 0), new Position(1, 2)),
" : additional detail");
": additional detail");
SymbolsModel.DocumentSymbolWithFile infoWithFile = new SymbolsModel.DocumentSymbolWithFile(info, null);
assertEquals("Foo : additional detail", labelProvider.getStyledText(infoWithFile).getString());
}
Expand All @@ -103,7 +103,7 @@ public void testDocumentSymbolDetailWithFileWithKind () {
DocumentSymbol info = new DocumentSymbol("Foo", SymbolKind.Class,
new Range(new Position(1, 0), new Position(1, 2)),
new Range(new Position(1, 0), new Position(1, 2)),
" : additional detail");
": additional detail");
SymbolsModel.DocumentSymbolWithFile infoWithFile = new SymbolsModel.DocumentSymbolWithFile(info, null);
assertEquals("Foo : additional detail :Class", labelProvider.getStyledText(infoWithFile).getString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public StyledString getStyledText(Object element) {
}

if (detail != null) {
res.append(' ');
res.append(detail, StyledString.DECORATIONS_STYLER);
}

Expand Down

0 comments on commit 0750c3f

Please sign in to comment.