Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

show type hierarchy #71

Merged
merged 2 commits into from
Sep 3, 2021
Merged

show type hierarchy #71

merged 2 commits into from
Sep 3, 2021

Conversation

Eskibear
Copy link
Member

part of microsoft/vscode#15533

The implementation is mostly copied from call hierarchy.

Signed-off-by: Yan Zhang <yanzh@microsoft.com>


export const enum TypeHierarchyDirection {
Subtypes = 'subtypes',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

different from call-hierarchy, I use string enum here.

'symbol-event', 'symbol-operator', 'symbol-type-parameter'
];

export function getThemeIcon(kind: vscode.SymbolKind): vscode.ThemeIcon | undefined {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extract it here, as it's shared between call-h and type-h.


private static _key = 'references-view.typeHierarchyMode';

private _ctxMode = new ContextKey<TypeHierarchyDirection>('references-view.typeHierarchyMode');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

different from call-h, I directly save value of corresponding enum string into memento object for simplicity.

@Eskibear
Copy link
Member Author

Here is a test with the same mock extension mentioned in microsoft/vscode#130922 (comment)

show-type-hierarchy.mp4

@heartacker

This comment has been minimized.

@jrieken jrieken self-assigned this Sep 1, 2021
@jrieken jrieken added this to the September 2021 milestone Sep 1, 2021
@jrieken jrieken self-requested a review September 3, 2021 08:39
Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pushed a commit to change the spelling to 'supertypes'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants