diff --git a/css/ui.css b/css/ui.css index 7138cb46..79a7e242 100644 --- a/css/ui.css +++ b/css/ui.css @@ -36,6 +36,9 @@ .tooltipbox:hover .tooltiptext { visibility: visible; } +.tooltiperror { + color: #ff3333; +} #controls_top { position: absolute; padding: 0.5em; diff --git a/src/project.js b/src/project.js index f644945d..ac413f95 100644 --- a/src/project.js +++ b/src/project.js @@ -131,8 +131,9 @@ function CodeProject(worker, platform_id, platform, store) { function buildWorkerMessage(mainpath, maintext, depends) { var msg = {updates:[], buildsteps:[]}; // TODO: add preproc directive for __MAINFILE__ - msg.updates.push({path:getFilenameForPath(mainpath), data:maintext}); - msg.buildsteps.push({path:getFilenameForPath(mainpath), platform:platform_id, tool:platform.getToolForFilename(mainpath), mainfile:true}); + var mainfilename = getFilenameForPath(mainpath); + msg.updates.push({path:mainfilename, data:maintext}); + msg.buildsteps.push({path:mainfilename, platform:platform_id, tool:platform.getToolForFilename(mainpath), mainfile:true}); for (var i=0; i= 0) { @@ -247,7 +247,7 @@ function SourceEditor(path, mode) { self.setCurrentLine = function(line) { function addCurrentMarker(line) { var div = document.createElement("div"); - div.style.color = '#66ffff'; // TODO + div.style.color = '#66ffff'; div.appendChild(document.createTextNode("\u25b6")); editor.setGutterMarker(line, "gutter-info", div); } @@ -262,19 +262,20 @@ function SourceEditor(path, mode) { self.clearCurrentLine = function() { if (currentDebugLine) { editor.clearGutter("gutter-info"); - editor.setSelection(editor.getCursor()); // TODO?? + editor.setSelection(editor.getCursor()); currentDebugLine = 0; } } self.refresh = function() { + // TODO: only use local sourcefile var state = lastDebugState; if (state && state.c) { var PC = state.c.PC; var line = sourcefile.findLineForOffset(PC); if (line >= 0) { console.log("BREAKPOINT", hex(PC), line); - getActiveEditor().setCurrentLine(line); + self.setCurrentLine(line); // TODO: switch to disasm } } @@ -935,7 +936,7 @@ function setCompileOutput(data) { assemblyfile = lst.assemblyfile; } } - if (!sourcefile) sourcefile = new SourceFile(); + if (!sourcefile) sourcefile = new SourceFile(); symbolmap = data.symbolmap; addr2symbol = invertMap(symbolmap); if (!addr2symbol[0x0]) addr2symbol[0x0] = '__START__'; // needed for ... @@ -1149,7 +1150,6 @@ function getSymbolAtAddress(a) { return ''; } -// TODO function updateDebugWindows() { if (platform.isRunning()) { projectWindows.tick();