@@ -21,7 +21,8 @@ import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/co
2121import { IDisposable , dispose , toDisposable , DisposableStore } from 'vs/base/common/lifecycle' ;
2222import { IStorageService , StorageScope } from 'vs/platform/storage/common/storage' ;
2323import { ISerializedEditorGroup , isSerializedEditorGroup } from 'vs/workbench/common/editor/editorGroup' ;
24- import { EditorDropTarget , EditorDropTargetDelegate } from 'vs/workbench/browser/parts/editor/editorDropTarget' ;
24+ import { EditorDropTarget , IEditorDropTargetDelegate } from 'vs/workbench/browser/parts/editor/editorDropTarget' ;
25+ import { IEditorDropService } from 'vs/workbench/services/editor/browser/editorDropService' ;
2526import { Color } from 'vs/base/common/color' ;
2627import { CenteredViewLayout } from 'vs/base/browser/ui/centered/centeredViewLayout' ;
2728import { onUnexpectedError } from 'vs/base/common/errors' ;
@@ -780,6 +781,14 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
780781
781782 //#endregion
782783
784+ //#region IEditorDropService
785+
786+ createEditorDropTarget ( container : HTMLElement , delegate : IEditorDropTargetDelegate ) : IDisposable {
787+ return this . instantiationService . createInstance ( EditorDropTarget , this , container , delegate ) ;
788+ }
789+
790+ //#endregion
791+
783792 //#region Part
784793
785794 // TODO @sbatten @joao find something better to prevent editor taking over #79897
@@ -820,7 +829,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
820829 this . centeredLayoutWidget = this . _register ( new CenteredViewLayout ( this . container , this . gridWidgetView , this . globalMemento [ EditorPart . EDITOR_PART_CENTERED_VIEW_STORAGE_KEY ] ) ) ;
821830
822831 // Drop support
823- this . _register ( this . createEditorDropTarget ( this . container , { } ) ) ;
832+ this . _register ( this . createEditorDropTarget ( this . container , Object . create ( null ) ) ) ;
824833
825834 // No drop in the editor
826835 const overlay = document . createElement ( 'div' ) ;
@@ -1107,6 +1116,12 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
11071116 super . saveState ( ) ;
11081117 }
11091118
1119+ toJSON ( ) : object {
1120+ return {
1121+ type : Parts . EDITOR_PART
1122+ } ;
1123+ }
1124+
11101125 dispose ( ) : void {
11111126
11121127 // Forward to all groups
@@ -1122,20 +1137,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
11221137 }
11231138
11241139 //#endregion
1125-
1126- toJSON ( ) : object {
1127- return {
1128- type : Parts . EDITOR_PART
1129- } ;
1130- }
1131-
1132- //#region TODO@matt this should move into some kind of service
1133-
1134- createEditorDropTarget ( container : HTMLElement , delegate : EditorDropTargetDelegate ) : IDisposable {
1135- return this . instantiationService . createInstance ( EditorDropTarget , this , container , delegate ) ;
1136- }
1137-
1138- //#endregion
11391140}
11401141
11411142registerSingleton ( IEditorGroupsService , EditorPart ) ;
1143+ registerSingleton ( IEditorDropService , EditorPart ) ;
0 commit comments