From 300756f300f32cc493a03e2383288c704fd79c4c Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 20 Nov 2015 11:10:21 +0100 Subject: [PATCH] debug: move debug service into electron-browser fixes #317 --- src/vs/workbench/parts/debug/browser/debug.contribution.ts | 5 ----- .../parts/debug/electron-browser/debug.contribution.ts | 6 ++++++ .../debug/{browser => electron-browser}/debugService.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) rename src/vs/workbench/parts/debug/{browser => electron-browser}/debugService.ts (100%) diff --git a/src/vs/workbench/parts/debug/browser/debug.contribution.ts b/src/vs/workbench/parts/debug/browser/debug.contribution.ts index 25ebfa08bfe..73509a30614 100644 --- a/src/vs/workbench/parts/debug/browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/browser/debug.contribution.ts @@ -24,14 +24,12 @@ import files = require('vs/workbench/parts/files/browser/files'); import baseeditor = require('vs/workbench/browser/parts/editor/baseEditor'); import filesCommon = require('vs/workbench/parts/files/common/files'); import manager = require('vs/workbench/parts/debug/browser/debugEditorModelManager'); -import service = require('vs/workbench/parts/debug/browser/debugService'); import * as debug from 'vs/workbench/parts/debug/common/debug'; import dbgactions = require('vs/workbench/parts/debug/browser/debugActions'); import editorinputs = require('vs/workbench/parts/debug/browser/debugEditorInputs'); import repleditor = require('vs/workbench/parts/debug/browser/replEditor'); import debugwidget = require('vs/workbench/parts/debug/browser/debugActionsWidget'); import debughover = require('vs/workbench/parts/debug/browser/debugHoverWidget'); -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IKeybindings } from 'vs/platform/keybinding/common/keybindingService'; import { IViewletService } from 'vs/workbench/services/viewlet/common/viewletService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -204,9 +202,6 @@ CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(dbgactions. CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(dbgactions.SelectionToWatchExpressionsAction, dbgactions.SelectionToWatchExpressionsAction.ID, nls.localize('addToWatch', "Debug: Add to Watch"))); CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(dbgactions.RunToCursorAction, dbgactions.RunToCursorAction.ID, nls.localize('runToCursor', "Debug: Run to Cursor"))); -// Register Service -registerSingleton(IDebugService, service.DebugService); - // Register Viewlet (platform.Registry.as(viewlet.Extensions.Viewlets)).registerViewlet(new viewlet.ViewletDescriptor( 'vs/workbench/parts/debug/browser/debugViewlet', diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index c39f1a776d1..6a2e98b4778 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -5,8 +5,14 @@ import { IWorkbenchContributionsRegistry, Extensions } from 'vs/workbench/common/contributions'; import platform = require('vs/platform/platform'); +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { IDebugService } from 'vs/workbench/parts/debug/common/debug'; +import service = require('vs/workbench/parts/debug/electron-browser/debugService'); import { ExtensionOutputHandler } from 'vs/workbench/parts/debug/electron-browser/extensionOutput'; +// Register Service +registerSingleton(IDebugService, service.DebugService); + // Register Extension Output Handler (platform.Registry.as(Extensions.Workbench)).registerWorkbenchContribution( ExtensionOutputHandler diff --git a/src/vs/workbench/parts/debug/browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts similarity index 100% rename from src/vs/workbench/parts/debug/browser/debugService.ts rename to src/vs/workbench/parts/debug/electron-browser/debugService.ts index f111cd31e9a..2d1be15d60c 100644 --- a/src/vs/workbench/parts/debug/browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -20,7 +20,6 @@ import platformplatform = require('vs/platform/platform'); import editor = require('vs/editor/common/editorCommon'); import editorbrowser = require('vs/editor/browser/editorBrowser'); import jsonContributionRegistry = require('vs/languages/json/common/jsonContributionRegistry'); -import { IWindowService } from 'vs/workbench/services/window/electron-browser/windowService'; import wbeditorcommon = require('vs/workbench/common/editor'); import { SystemVariables } from 'vs/workbench/parts/lib/node/systemVariables'; import debug = require('vs/workbench/parts/debug/common/debug'); @@ -50,6 +49,7 @@ import { IPluginService, IPluginDescription } from 'vs/platform/plugins/common/p import { IOutputService } from 'vs/workbench/parts/output/common/output'; import { IKeybindingService, IKeybindingContextKey } from 'vs/platform/keybinding/common/keybindingService'; import { IQuickOpenService } from 'vs/workbench/services/quickopen/browser/quickOpenService'; +import { IWindowService } from 'vs/workbench/services/window/electron-browser/windowService'; var DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint'; var DEBUG_BREAKPOINTS_ACTIVATED_KEY = 'debug.breakpointactivated'; -- GitLab