Skip to content

Commit

Permalink
#48901 Expand by default only in custom viewlets
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed May 31, 2018
1 parent 8c00fcf commit e11fa76
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vs/workbench/api/browser/viewsExtensionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ function getViewLocation(value: string): ViewLocation {
}
}

function showCollapsed(location: ViewLocation): boolean {
switch (location) {
case ViewLocation.Explorer:
case ViewLocation.SCM:
case ViewLocation.Debug:
return true;
}
return false;
}

ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyViewDescriptor[] }>('views', [viewsContainersExtensionPoint], schema.viewsContribution)
.setHandler((extensions) => {
for (let extension of extensions) {
Expand All @@ -136,6 +146,7 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyV
location,
when: ContextKeyExpr.deserialize(item.when),
canToggleVisibility: true,
collapsed: showCollapsed(location),
treeView: true
};

Expand Down

0 comments on commit e11fa76

Please sign in to comment.