提交 850396fe 编写于 作者: S Sandeep Somavarapu

Update comments

上级 3acf1428
......@@ -546,7 +546,7 @@ export class WindowsManager implements IWindowsMainService {
// Special case: we started with --wait and we got back a folder to open. In this case
// we actually prefer to not open the folder but operate purely on the file.
if (typeof bestWindowOrFolder === 'string' && filesToWait) {
//TODO:Ben This should not happen
//TODO: #54483 Ben This should not happen
console.error(`This should not happen`, bestWindowOrFolder, WindowsManager.WINDOWS);
bestWindowOrFolder = !openFilesInNewWindow ? this.getLastActiveWindow() : null;
}
......@@ -580,7 +580,7 @@ export class WindowsManager implements IWindowsMainService {
// We found a suitable folder to open: add it to foldersToOpen
else if (typeof bestWindowOrFolder === 'string') {
//TODO:Ben This should not happen
//TODO: #54483 Ben This should not happen
// foldersToOpen.push(bestWindowOrFolder);
console.error(`This should not happen`, bestWindowOrFolder, WindowsManager.WINDOWS);
}
......
......@@ -79,7 +79,7 @@ export const ResourceSelectedForCompareContext = new RawContextKey<boolean>('res
export const REMOVE_ROOT_FOLDER_COMMAND_ID = 'removeRootFolder';
export const REMOVE_ROOT_FOLDER_LABEL = nls.localize('removeFolderFromWorkspace', "Remove Folder from Workspace");
// support string paths for backward compatibility. TODO @bpasero remove if not necessary
//TODO #54483 support string paths for backward compatibility. check with @bpasero and remove if not necessary
export const openWindowCommand = (accessor: ServicesAccessor, paths: (string | URI)[], forceNewWindow: boolean) => {
const windowService = accessor.get(IWindowService);
windowService.openWindow(paths.map(p => typeof p === 'string' ? URI.file(p) : p), { forceNewWindow });
......@@ -354,7 +354,6 @@ CommandsRegistry.registerCommand({
});
function revealResourcesInOS(resources: URI[], windowsService: IWindowsService, notificationService: INotificationService, workspaceContextService: IWorkspaceContextService): void {
// 54483: Check with @Isi
if (resources.length) {
sequence(resources.map(r => () => windowsService.showItemInFolder(paths.normalize(r.fsPath, true))));
} else if (workspaceContextService.getWorkspace().folders.length) {
......
......@@ -435,7 +435,6 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
// Update resource context based on focused element
this.disposables.push(this.explorerViewer.onDidChangeFocus((e: { focus: ExplorerItem }) => {
const isSingleFolder = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER;
// 54483: Check with Isi
const resource = e.focus ? e.focus.resource : isSingleFolder ? this.contextService.getWorkspace().folders[0].uri : undefined;
this.resourceContext.set(resource);
this.folderContext.set((isSingleFolder && !e.focus) || e.focus && e.focus.isDirectory);
......
......@@ -270,7 +270,6 @@ export class QueryBuilder {
return [uri.file(paths.normalize(searchPath))];
}
// 54483 Check with Rob
if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.FOLDER) { // TODO: @Sandy Try checking workspace folders length instead.
const workspaceUri = this.workspaceContextService.getWorkspace().folders[0].uri;
return [workspaceUri.with({ path: paths.normalize(paths.join(workspaceUri.path, searchPath)) })];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册