*/
// The new nice dark scheme -- so peaceful on my brain
-
+/*
FontResource panelFont { $"Courier New", 10 };
FontResource codeFont { $"Courier New", 10 };
-/*
+*/
FontResource panelFont { $"Consolas", 12 };
FontResource codeFont { $"Consolas", 12 };
-*/
+
Color selectionColor = lightYellow;
Color selectionText = Color { 30, 40, 50 };
Color viewsBackground = Color { 30, 40, 50 };
extern int __ecereVMethodID_class_OnSaveEdit;
extern int __ecereVMethodID___ecereNameSpace__ecere__com__Module_OnLoad;
+class RTCMenuBits
+{
+public:
+ bool ignoreBreakpoints:1;
+ bool atSameLevel:1;
+ bool oldImplementation:1;
+};
+
class EditFileDialog : FileDialog
{
bool OnCreate()
ProjectView projectView = ide.projectView;
if(projectView)
{
- ProjectNode node = projectView.GetNodeFromWindow(this, null, false);
+ ProjectNode node = projectView.GetNodeFromWindow(this, null, true, false);
if(node)
{
node.modified = modifiedDocument;
{
if(ide.projectView)
{
- ProjectNode node = ide.projectView.GetNodeFromWindow(this, null, false);
+ ProjectNode node = ide.projectView.GetNodeFromWindow(this, null, true, false);
if(!node)
- node = ide.projectView.GetNodeFromWindow(this, null, true);
+ node = ide.projectView.GetNodeFromWindow(this, null, true, true);
if(!node)
{
char * s;
}
};
- Menu fileMenu { menu, $"File", f }; // MenuPlacement?
+ Menu fileMenu { menu, $"File", f };
MenuItem { fileMenu, $"Save", s, Key { s, ctrl = true }, NotifySelect = MenuFileSave };
MenuItem { fileMenu, $"Save As...", a, NotifySelect = MenuFileSaveAs };
- Menu debugMenu { menu, $"Debug", d }; // MenuPlacement?
- MenuItem debugRunToCursor
- {
- debugMenu, $"Run To Cursor", c, Key { f10, ctrl = true };
- bool NotifySelect(MenuItem selection, Modifiers mods)
- {
- ProjectView projectView = ide.projectView;
- if(!projectView.buildInProgress)
- {
- int line = editBox.lineNumber + 1;
- if(projectView)
- {
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
- ProjectConfig config = projectView.project.config;
- int bitDepth = ide.workspace.bitDepth;
- bool useValgrind = ide.workspace.useValgrind;
- ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, false, false);
- delete compiler;
- }
- }
- return true;
- }
- };
- MenuItem debugSkipRunToCursor
- {
- debugMenu, $"Run To Cursor Skipping Breakpoints", u, Key { f10, ctrl = true, shift = true };
- bool NotifySelect(MenuItem selection, Modifiers mods)
- {
- ProjectView projectView = ide.projectView;
- int line = editBox.lineNumber + 1;
- if(projectView)
- {
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
- ProjectConfig config = projectView.project.config;
- int bitDepth = ide.workspace.bitDepth;
- bool useValgrind = ide.workspace.useValgrind;
- ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, true, false);
- delete compiler;
- }
- return true;
- }
- };
- MenuItem debugSkipRunToCursorAtSameLevel
+ Menu debugMenu { menu, $"Debug", d };
+ MenuItem debugRunToCursor { debugMenu, $"Run To Cursor", c, ctrlF10, id = RTCMenuBits { false, false, false }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugSkipRunToCursor { debugMenu, $"Run To Cursor Skipping Breakpoints", u, Key { f10, ctrl = true, shift = true }, id = RTCMenuBits { true, false, false }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugRunToCursorAtSameLevel { debugMenu, $"Run To Cursor At Same Level", l, altF10, id = RTCMenuBits { false, true, false }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugSkipRunToCursorAtSameLevel { debugMenu, $"Run To Cursor At Same Level Skipping Breakpoints", g, Key { f10, shift = true, alt = true }, id = RTCMenuBits { true, true, false }, NotifySelect = RTCMenu_NotifySelect; };
+#if 0
+ MenuItem debugBpRunToCursor { debugMenu, $"BP Run To Cursor"/*, c, ctrlF10*/, id = RTCMenuBits { false, false, true }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugBpSkipRunToCursor { debugMenu, $"BP Run To Cursor Skipping Breakpoints"/*, u, Key { f10, ctrl = true, shift = true }*/, id = RTCMenuBits { true, false, true }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugBpRunToCursorAtSameLevel { debugMenu, $"BP Run To Cursor At Same Level"/*, l, altF10*/, id = RTCMenuBits { false, true, true }, NotifySelect = RTCMenu_NotifySelect; };
+ MenuItem debugBpSkipRunToCursorAtSameLevel { debugMenu, $"BP Run To Cursor At Same Level Skipping Breakpoints"/*, g, Key { f10, shift = true, alt = true }*/, id = RTCMenuBits { true, true, true }, NotifySelect = RTCMenu_NotifySelect; };
+#endif
+ bool RTCMenu_NotifySelect(MenuItem selection, Modifiers mods)
{
- debugMenu, $"Run To Cursor At Same Level Skipping Breakpoints", u, Key { f10, alt = true };
- bool NotifySelect(MenuItem selection, Modifiers mods)
+ ProjectView projectView = ide.projectView;
+ if(!projectView.buildInProgress)
{
- ProjectView projectView = ide.projectView;
+ RTCMenuBits bits = (RTCMenuBits)selection.id;
int line = editBox.lineNumber + 1;
if(projectView)
{
ProjectConfig config = projectView.project.config;
int bitDepth = ide.workspace.bitDepth;
bool useValgrind = ide.workspace.useValgrind;
- ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, true, true);
+ ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, bits.ignoreBreakpoints, bits.atSameLevel, bits.oldImplementation);
delete compiler;
}
- return true;
}
- };
+ return true;
+ }
MenuDivider { debugMenu };
MenuItem debugToggleBreakpoint
{
if(projectView && fileName)
{
int line = editBox.lineNumber + 1;
- Project prj = null;
- if(ide && ide.workspace)
- {
- for(p : ide.workspace.projects)
- {
- if(p.topNode.FindByFullPath(fileName, false))
- {
- prj = p;
- break;
- }
- }
- if(!prj)
- {
- for(p : ide.workspace.projects)
- {
- if(IsPathInsideOf(fileName, p.topNode.path))
- {
- prj = p;
- break;
- }
- }
- }
- }
- ide.debugger.ToggleBreakpoint(fileName, line, prj);
+ ide.debugger.ToggleBreakpoint(fileName, line);
Update(null);
}
return true;
if(CloseConfirmation(false))
{
visible = false;
- OnFileModified({ modified = true }, null);
+ if(modifiedDocument)
+ OnFileModified({ modified = true }, null);
}
debugClosing = false;
return false;
ProjectView projectView = ide.projectView;
if(projectView)
{
- ProjectNode node = projectView.GetNodeFromWindow(this, null, false);
+ ProjectNode node = projectView.GetNodeFromWindow(this, null, false, false);
if(node && node.modified)
{
node.modified = false;
*/
if(active && directActivation)
{
- AdjustDebugMenus(ide.areDebugMenusUnavailable, ide.isBreakpointTogglingUnavailable, ide.isDebuggerExecuting);
+ AdjustDebugMenus();
if(openedFileInfo)
openedFileInfo.Activate();
if(designer)
editBox.Save(f, false);
modifiedDocument = false;
- delete(f);
+ delete f;
return true;
}
return false;
{
bool reload = false;
if(visible == false && inUseDebug == true)
- reload = true;
+ ide.debugger.WatchesReleaseCodeEditor();
else
{
char message[2048];
}
modifiedDocument = false;
- delete(f);
+ delete f;
}
}
return true;
loadingFile = false;
Create();
- delete(f);
+ delete f;
return true;
}
return false;
}
- void AdjustDebugMenus(bool unavailable, bool bpNoToggle, bool executing)
+ void AdjustDebugMenus()
{
- debugRunToCursor.disabled = unavailable || executing;
- debugSkipRunToCursor.disabled = unavailable || executing;
- debugSkipRunToCursorAtSameLevel.disabled = unavailable || executing;
- debugToggleBreakpoint.disabled = bpNoToggle;
+ bool unavailable = ide.areDebugMenusUnavailable;
+ bool isNotNotRunning = unavailable || ide.isDebuggerRunning;
+ bool isNotStopped = unavailable || !ide.isDebuggerStopped;
+ bool noBreakpointToggle = ide.isBreakpointTogglingUnavailable;
+
+ debugRunToCursor.disabled = isNotNotRunning;
+ debugSkipRunToCursor.disabled = isNotNotRunning;
+ debugRunToCursorAtSameLevel.disabled = isNotStopped;
+ debugSkipRunToCursorAtSameLevel.disabled = isNotStopped;
+#if 0
+ debugBpRunToCursor.disabled = isNotNotRunning;
+ debugBpSkipRunToCursor.disabled = isNotNotRunning;
+ debugBpRunToCursorAtSameLevel.disabled = isNotStopped;
+ debugBpSkipRunToCursorAtSameLevel.disabled = isNotStopped;
+#endif
+ debugToggleBreakpoint.disabled = noBreakpointToggle;
}
CodeEditor()
designer.fileName = title;
}
- AdjustDebugMenus(ide.areDebugMenusUnavailable, ide.isBreakpointTogglingUnavailable, ide.isDebuggerExecuting);
+ AdjustDebugMenus();
for(c = 0; c < CodeObjectType::enumSize; c++)
icons[c] = BitmapResource { iconNames[c], window = this };