Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline displays wrong hover text for SymbolKind.File #62460

Closed
gjsjohnmurray opened this issue Nov 2, 2018 · 5 comments
Closed

Outline displays wrong hover text for SymbolKind.File #62460

gjsjohnmurray opened this issue Nov 2, 2018 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug outline Source outline view issues verified Verification succeeded
Milestone

Comments

@gjsjohnmurray
Copy link
Contributor

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.

    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"

image

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.

@jrieken jrieken added the *as-designed Described behavior is as designed label Nov 2, 2018
@vscodebot
Copy link

vscodebot bot commented Nov 2, 2018

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.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Nov 2, 2018
@jrieken
Copy link
Member

jrieken commented Nov 2, 2018

Yeah, we reuse some icons for different, but related, types.

@gjsjohnmurray
Copy link
Contributor Author

But for SymbolKind.File why does the hover tip say 'property' ?

@jrieken
Copy link
Member

jrieken commented Nov 2, 2018

Yeah, that is weird indeed...

@jrieken jrieken reopened this Nov 2, 2018
@jrieken
Copy link
Member

jrieken commented Nov 2, 2018

@jrieken 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
@jrieken jrieken modified the milestones: October 2018, November 2018 Nov 2, 2018
@jrieken jrieken added the outline Source outline view issues label Nov 2, 2018
@jrieken jrieken closed this as completed in 8e841f4 Nov 2, 2018
@roblourens roblourens added the verified Verification succeeded label Dec 5, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug outline Source outline view issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants