You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a DocumentSymbolProvider with a simple provideDocumentSymbols method that returns one SymbolInformation entry for each value of the vscode.SymbolKind enumeration, e.g.
public async provideDocumentSymbols(document: vscode.TextDocument, token: vscode.CancellationToken): Promise<vscode.SymbolInformation[]> {
return new Promise<vscode.SymbolInformation[]>((resolve) => {
let symbols: vscode.SymbolInformation[] = [];
// This is just so we can see a samples of all icons
for (i=0; i<26 ; i++) {
symbols.push(
new vscode.SymbolInformation(i.toString(), i, '', new vscode.Location(document.uri, new vscode.Position(i,0)))
);
}
/**/
resolve(symbols);
});
}
View the result, and observe how the hover tip for entry 0 (i.e. SymbolKind.File) is "property"
Indeed, the icon used for 0 is the same as for 6, which is the enumeration value for SymbolKind.Property.
Also, the above screenshot shows that SymbolKind.Null uses the same icon as SymbolKind.Boolean, and Module, Namespace, Package and Object all use the same icon. At least in all of these cases the hover tips allow us to distinguish between them.
VS Code version: Code 1.28.2 (7f3ce96, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.15063
Also occurs in 1.29 Insider.
The text was updated successfully, but these errors were encountered:
The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
jrieken
added
bug
Issue identified by VS Code Team member as probable bug
and removed
*as-designed
Described behavior is as designed
labels
Nov 2, 2018
Issue Type: Bug
Implement a DocumentSymbolProvider with a simple provideDocumentSymbols method that returns one SymbolInformation entry for each value of the vscode.SymbolKind enumeration, e.g.
View the result, and observe how the hover tip for entry 0 (i.e. SymbolKind.File) is "property"
Indeed, the icon used for 0 is the same as for 6, which is the enumeration value for SymbolKind.Property.
Also, the above screenshot shows that SymbolKind.Null uses the same icon as SymbolKind.Boolean, and Module, Namespace, Package and Object all use the same icon. At least in all of these cases the hover tips allow us to distinguish between them.
VS Code version: Code 1.28.2 (7f3ce96, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.15063
Also occurs in 1.29 Insider.
The text was updated successfully, but these errors were encountered: