From e82ef923884d852147ec6b180ad997530b9fc11d Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 2 Oct 2018 16:57:09 -0400 Subject: [PATCH] move editor out of debugger --- src/app/debugger/debugger.js | 22 ---------------------- src/app/debugger/debuggerUI.js | 2 ++ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/app/debugger/debugger.js b/src/app/debugger/debugger.js index d6b10e5222..58cda21350 100644 --- a/src/app/debugger/debugger.js +++ b/src/app/debugger/debugger.js @@ -5,16 +5,12 @@ var EventManager = remixLib.EventManager var executionContext = require('../../execution-context') var globalRegistry = require('../../global/registry') -/** - * Manage remix and source highlighting - */ function Debugger () { var self = this this.event = new EventManager() this.registry = globalRegistry this.offsetToLineColumnConverter = this.registry.get('offsettolinecolumnconverter').api - this.editor = this.registry.get('editor').api this.compiler = this.registry.get('compiler').api this.debugger = new Ethdebugger( @@ -37,26 +33,10 @@ function Debugger () { this.debugger.setBreakpointManager(this.breakPointManager) - self.editor.event.register('breakpointCleared', (fileName, row) => { - this.breakPointManager.remove({fileName: fileName, row: row}) - }) - - self.editor.event.register('breakpointAdded', (fileName, row) => { - this.breakPointManager.add({fileName: fileName, row: row}) - }) - executionContext.event.register('contextChanged', this, function (context) { self.switchProvider(context) }) - // unload if a file has changed (but not if tabs were switched) - self.editor.event.register('contentChanged', function () { - self.debugger.unLoad() - }) - - // - // ==================== - // listen to events this.debugger.event.register('newTraceLoaded', this, function () { self.event.trigger('debuggerStatus', [true]) }) @@ -65,8 +45,6 @@ function Debugger () { self.event.trigger('debuggerStatus', [false]) }) - // ==================== - // add providers this.debugger.addProvider('vm', executionContext.vm()) this.debugger.addProvider('injected', executionContext.internalWeb3()) this.debugger.addProvider('web3', executionContext.internalWeb3()) diff --git a/src/app/debugger/debuggerUI.js b/src/app/debugger/debuggerUI.js index 2c1369d5c7..ae99d2a0e8 100644 --- a/src/app/debugger/debuggerUI.js +++ b/src/app/debugger/debuggerUI.js @@ -12,6 +12,8 @@ var EventManager = remixLib.EventManager var executionContext = require('../../execution-context') var globalRegistry = require('../../global/registry') +var globalRegistry = require('../../global/registry') + var yo = require('yo-yo') var csjs = require('csjs-inject')