Designer designer { codeEditor = this, visible = false, saveDialog = codeEditorFormFileDialog };
+ bool noParsing;
+
+ property bool parsing { get { return editBox.syntaxHighlighting && !noParsing && !ide.noParsing; } };
+
void ProcessCaretMove(EditBox editBox, int line, int charPos)
{
char temp[512];
bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
{
CodeEditor editor = (CodeEditor)master;
- if(!active)
+ Window rw = previous ? previous.rootWindow : null;
+ if(!active && rw != editor.paramsList)
{
Destroy(0);
editor.membersListShown = false;
bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
{
CodeEditor editor = (CodeEditor)master;
- if(!active)
+ Window rw = previous ? previous.rootWindow : null;
+ if(!active && previous != editor.editBox && rw != editor.membersList)
{
Destroy(0);
editor.membersListShown = false;
surface.WriteText(x, y, "(", 1);
x += parW;
- if(methodType && !methodType.staticMethod)
+ if(methodType && !methodType.staticMethod && methodType.methodClass)
{
int tw = 0, width;
id ++;
}
- if(!methodType || methodType.staticMethod || !type.params.first || ((Type)type.params.first).kind != voidType || type.params.count > 1)
+ if(!methodType || (methodType.staticMethod || !methodType.methodClass) || !type.params.first || ((Type)type.params.first).kind != voidType || type.params.count > 1)
{
for(param = type.params.first; param; param = param.next)
{
CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
ProjectConfig config = projectView.project.config;
int bitDepth = ide.workspace.bitDepth;
- ide.debugger.RunToCursor(compiler, config, bitDepth, fileName, line, false);
+ bool useValgrind = ide.workspace.useValgrind;
+ ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, false, false);
delete compiler;
}
}
CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
ProjectConfig config = projectView.project.config;
int bitDepth = ide.workspace.bitDepth;
- ide.debugger.RunToCursor(compiler, config, bitDepth, fileName, line, true);
+ bool useValgrind = ide.workspace.useValgrind;
+ ide.debugger.RunToCursor(compiler, config, bitDepth, useValgrind, fileName, line, true, false);
+ delete compiler;
+ }
+ return true;
+ }
+ };
+ MenuItem debugSkipRunToCursorAtSameLevel
+ {
+ debugMenu, $"Run To Cursor At Same Level Skipping Breakpoints", u, Key { f10, alt = 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, true);
delete compiler;
}
return true;
*/
if(active && directActivation)
{
+ AdjustDebugMenus(ide.areDebugMenusUnavailable, ide.isBreakpointTogglingUnavailable, ide.isDebuggerExecuting);
if(openedFileInfo)
openedFileInfo.Activate();
if(designer)
if(fileName)
{
GetExtension(fileName, ext);
- if(!strcmpi(ext, "ec"))
+
+ if(!strcmpi(ext, "ec") || !strcmpi(ext, "eh") || !strcmpi(ext, "c") || !strcmpi(ext, "h") || !strcmpi(ext, "cpp") ||
+ !strcmpi(ext, "hpp") || !strcmpi(ext, "cxx") || !strcmpi(ext, "hxx") || !strcmpi(ext, "cc") || !strcmpi(ext, "hh") ||
+ !strcmpi(ext, "m") || !strcmpi(ext, "mm") || !strcmpi(ext, "cs") || !strcmpi(ext, "java") || !strcmpi(ext, "y") || !strcmpi(ext, "l"))
+ editBox.syntaxHighlighting = true;
+ else
+ editBox.syntaxHighlighting = false;
+
+ if(parsing && !strcmpi(ext, "ec"))
{
codeModified = true;
EnsureUpToDate();
}
- if(!strcmpi(ext, "ec") || !strcmpi(ext, "c") || !strcmpi(ext, "cc") || !strcmpi(ext, "cpp") || !strcmpi(ext, "eh") || !strcmpi(ext, "hh") || !strcmpi(ext, "hpp") || !strcmpi(ext, "h") || !strcmpi(ext, "hxx") || !strcmpi(ext, "cxx"))
- editBox.syntaxHighlighting = true;
- else
- editBox.syntaxHighlighting = false;
{
int spaceW;
display.FontExtent(font.font, " ", 1, &spaceW, null);
return false;
}
- void DebugMenusDisabled()
+ void AdjustDebugMenus(bool unavailable, bool bpNoToggle, bool executing)
{
- bool debugMenusDisabled = ide.GetDebugMenusDisabled();
- debugRunToCursor.disabled = debugMenusDisabled;
- debugSkipRunToCursor.disabled = debugMenusDisabled;
- debugToggleBreakpoint.disabled = debugMenusDisabled;
+ debugRunToCursor.disabled = unavailable || executing;
+ debugSkipRunToCursor.disabled = unavailable || executing;
+ debugSkipRunToCursorAtSameLevel.disabled = unavailable || executing;
+ debugToggleBreakpoint.disabled = bpNoToggle;
}
CodeEditor()
designer.fileName = title;
}
- DebugMenusDisabled();
+ AdjustDebugMenus(ide.areDebugMenusUnavailable, ide.isBreakpointTogglingUnavailable, ide.isDebuggerExecuting);
for(c = 0; c < CodeObjectType::enumSize; c++)
icons[c] = BitmapResource { iconNames[c], window = this };
char * fileName;
ImportedModule module;
char extension[MAX_EXTENSION];
+ PathBackup pathBackup { };
#ifdef _TIMINGS
Time parseCodeStart = GetTime();
Time startTime, startFindClass;
int bitDepth = ide.workspace.bitDepth;
DirExpression objDir = project.GetObjDir(compiler, config, bitDepth);
SetSymbolsDir(objDir.dir);
+ ide.SetPath(true, compiler, config, bitDepth);
+
delete objDir;
delete compiler;
// SetIncludeDirs(ide.projectView.project.config.includeDirs);
#endif
if(inUseDebug && ide.projectView)
ide.debugger.EvaluateWatches();
+
+ delete pathBackup;
}
void UpdateInstanceCodeClass(Class _class, ObjectInfo object, EditBoxStream f, Instance test, bool * prev, bool * lastIsMethod, DataMember * curMember, Class * curClass)
void UpdateFormCode()
{
if(!this) return;
-
+ if(!parsing) return;
+
updatingCode++;
if(codeModified)
{
void EnsureUpToDate()
{
- if(sheet && codeModified)
+ if(sheet && codeModified && parsing)
ParseCode();
}
for(link = (BTNamedLink)nameSpace.classes.first; link; link = (BTNamedLink)((BTNode)link).next)
{
Class _class = link.data;
- if(_class.type != systemClass)
+ if(_class.type != systemClass && !_class.templateClass) // Omit templatized classes
{
DataRow row = membersList.AddString(_class.name);
row.icon = (_class.type == unitClass || _class.type == enumClass) ? icons[typeDataType] : icons[typeClass];
for(link = (BTNamedLink)nameSpace.classes.first; link; link = (BTNamedLink)((BTNode)link).next)
{
Class _class = link.data;
- if(_class.type == enumClass && (dest.kind != classType || !dest._class || dest._class.registered != _class))
+ if(_class.type == enumClass && (dest.kind != classType || ((!dest._class || !dest._class.registered || (dest._class.registered != _class && strcmp(dest._class.registered.dataTypeString, "char *"))) && !dest.classObjectType)) &&
+ dest.kind != pointerType && dest.kind != ellipsisType)
{
OldList conversions { };
Type type { };
Expression memberExp = null;
Identifier realIdentifier = null;
+ if(!parsing) return true;
if(!privateModule) return !didOverride;
insideFunction = null;
EditLine l1, l2;
int x1,y1, x2,y2;
+ if(!parsing) return;
+
charPos = editBox.charPos + 1;
EnsureUpToDate();