Repository navigation
IDE: tree views, view containers, menus and when clauses for VS Code extensions (#261, part 1) - #294
Merged
Merged
Conversation
… Code extensions (#261) - Extensions' view containers in the activity bar, views in their own containers or under Explorer, Source Control and Run and Debug - window.createTreeView / registerTreeDataProvider with lazy children, icons, checkboxes, reveal, title, message and badge; elements stay in the host behind opaque handles - viewsWelcome, view/title, view/item/context, editor/title, editor/title/context, editor/context and explorer/context menus - VS Code's when-clause grammar over setContext and workbench keys; enablement and commandPalette when - Codicons from Monaco's font; icon files inlined by the main process only from an enabled extension or the workspace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adrián · project thread
Part 1 of #261 (epic #251). Webviews come in part 2.
What it adds
viewsContainers.activitybar/.panel) as activity bar items with the extension's icon; views in their own container or as sections under Explorer, Source Control and Run and Debug.window.createTreeViewandregisterTreeDataProviderwith lazy children, labels with highlights, descriptions, tooltips, codicons (Monaco's font) and image icons,resourceUrifile icons, checkboxes, multi-select,reveal,onDidChangeTreeData, selection/visibility/expand events,title,description,message,badgeandresolveTreeItem. Elements stay in the host behind opaque handles.viewsWelcomewith command buttons and links.view/title,view/item/context(inline buttons and right click),editor/title,editor/title/context,editor/context(Monaco) andexplorer/context;enablementandcommandPalettewhen.whenclauses with VS Code's grammar oversetContextkeys and the workbench's own (view,viewItem,resource*,editorLangId,isWorkspaceTrusted,config.*...).docs/ide/extensions.md.Security
parseViewRequest); tree resources go through the workspace path rules.Testing
npm testinapps/ide: 846 tests, typecheck and lint clean;test/extensionViews.test.tscovers the when-clause parser, protocol helpers, contributions, icon inlining, menus, context keys and a real host with a tree provider.setContext-gated view in the explorer, welcome content, every supported menu, inline action that edits the file and refreshes the tree).