Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)

This reverts commit 5d44b6a6a7.
This commit is contained in:
Anthony Dresser
2019-05-20 17:07:32 -07:00
committed by GitHub
parent 1315b8e42a
commit c9a4f8f664
325 changed files with 3332 additions and 4501 deletions

View File

@@ -30,7 +30,6 @@ import { addDisposableListener, EventType } from 'vs/base/browser/dom';
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IRecentFile } from 'vs/platform/history/common/history';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
import { withNullAsUndefined } from 'vs/base/common/types';
export interface IDraggedResource {
resource: URI;
@@ -82,12 +81,7 @@ export function extractResources(e: DragEvent, externalOnly?: boolean): Array<ID
try {
const draggedEditors: ISerializedDraggedEditor[] = JSON.parse(rawEditorsData);
draggedEditors.forEach(draggedEditor => {
resources.push({
resource: URI.parse(draggedEditor.resource),
backupResource: draggedEditor.backupResource ? URI.parse(draggedEditor.backupResource) : undefined,
viewState: withNullAsUndefined(draggedEditor.viewState),
isExternal: false
});
resources.push({ resource: URI.parse(draggedEditor.resource), backupResource: draggedEditor.backupResource ? URI.parse(draggedEditor.backupResource) : undefined, viewState: draggedEditor.viewState, isExternal: false });
});
} catch (error) {
// Invalid transfer
@@ -246,7 +240,7 @@ export class ResourcesDropHandler {
return this.backupFileService.resolveBackupContent(droppedDirtyEditor.backupResource!).then(content => {
// Set the contents of to the resource to the target
return this.backupFileService.backupResource(droppedDirtyEditor.resource, content.value.create(this.getDefaultEOL()).createSnapshot(true));
return this.backupFileService.backupResource(droppedDirtyEditor.resource, content!.create(this.getDefaultEOL()).createSnapshot(true));
}).then(() => false, () => false /* ignore any error */);
}