mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
code review
This commit is contained in:
@@ -337,14 +337,13 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
||||
console[severity].apply(console, ...messages);
|
||||
}
|
||||
|
||||
async showItemInFolder(path: URI): Promise<void> {
|
||||
async showItemInFolder(resource: URI): Promise<void> {
|
||||
this.logService.trace('windowsService#showItemInFolder');
|
||||
|
||||
if (path.scheme === Schemas.file) {
|
||||
shell.showItemInFolder(path.fsPath);
|
||||
}
|
||||
if (path.scheme === Schemas.userData) {
|
||||
shell.showItemInFolder(path.path);
|
||||
if (resource.scheme === Schemas.file) {
|
||||
shell.showItemInFolder(resource.fsPath);
|
||||
} else if (resource.scheme === Schemas.userData) {
|
||||
shell.showItemInFolder(resource.path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ const copyRelativePathCommand = {
|
||||
// Editor Title Context Menu
|
||||
appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, copyPathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
|
||||
appendEditorTitleContextMenuItem(COPY_RELATIVE_PATH_COMMAND_ID, copyRelativePathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
|
||||
appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, ResourceContextKey.Scheme.isEqualTo(Schemas.file));
|
||||
appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.isEqualTo(Schemas.userData)));
|
||||
appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, nls.localize('revealInSideBar', "Reveal in Side Bar"), ResourceContextKey.IsFileSystemResource);
|
||||
|
||||
function appendEditorTitleContextMenuItem(id: string, title: string, when: ContextKeyExpr, group?: string): void {
|
||||
|
||||
@@ -25,9 +25,6 @@ import { NoEditorsVisibleContext, SingleEditorGroupsContext } from 'vs/workbench
|
||||
import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import { REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL } from '../contrib/files/browser/fileCommands';
|
||||
import { ResourceContextKey } from 'vs/workbench/common/resources';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
|
||||
// Actions
|
||||
(function registerActions(): void {
|
||||
@@ -38,17 +35,6 @@ import { Schemas } from 'vs/base/common/network';
|
||||
const fileCategory = nls.localize('file', "File");
|
||||
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseWorkspaceAction, CloseWorkspaceAction.ID, CloseWorkspaceAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F) }), 'File: Close Workspace', fileCategory);
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, {
|
||||
command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL },
|
||||
when: ResourceContextKey.Scheme.isEqualTo(Schemas.file),
|
||||
group: '2_files'
|
||||
});
|
||||
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, {
|
||||
command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL },
|
||||
when: ResourceContextKey.Scheme.isEqualTo(Schemas.userData),
|
||||
group: '2_files'
|
||||
});
|
||||
})();
|
||||
|
||||
// Actions: View
|
||||
|
||||
@@ -71,7 +71,7 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService {
|
||||
this.configuration.remoteAuthority = configuration.remoteAuthority;
|
||||
|
||||
if (remoteUserDataUri) {
|
||||
this.appSettingsHome = remoteUserDataUri || URI.file('/User').with({ scheme: Schemas.userData });
|
||||
this.appSettingsHome = remoteUserDataUri;
|
||||
this.settingsResource = joinPath(this.appSettingsHome, 'settings.json').with({ scheme: Schemas.userData });
|
||||
this.keybindingsResource = joinPath(this.appSettingsHome, 'keybindings.json').with({ scheme: Schemas.userData });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user