this, toolTip = $"Active Compiler", size = { 160 }, disabled = true;
bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
{
- if(ide.workspace && ide.projectView && row && strcmp(row.string, ide.workspace.compiler))
+ if(ide.workspace && ide.projectView && row && strcmp(row.string, ide.workspace.activeCompiler))
{
bool silent = ide.projectView.buildInProgress == none ? false : true;
CompilerConfig compiler = ideSettings.GetCompilerConfig(row.string);
- ide.workspace.compiler = row.string;
+ ide.workspace.activeCompiler = row.string;
ide.projectView.ShowOutputBuildLog(!silent);
if(!silent)
ide.projectView.DisplayCompiler(compiler, false);
if(ide.workspace && ide.projectView && row)
{
bool silent = ide.projectView.buildInProgress == none ? false : true;
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.activeCompiler);
ide.workspace.bitDepth = (int)row.tag;
ide.projectView.ShowOutputBuildLog(!silent);
if(!silent)
}
};
+ Window spacer65 { this, size = { 4 } };
+
+ Button forceSingleJob { this, text = $"Force Single Job Compiling", isCheckbox = true; };
+
Window spacer7 { this, size = { 4 } };
void IDEToolbar()
void OnGotoError(const char * line, bool noParsing)
{
- CompilerConfig compiler = ide.workspace ? ideSettings.GetCompilerConfig(ide.workspace.compiler) : null;
+ CompilerConfig compiler = ide.workspace ? ideSettings.GetCompilerConfig(ide.workspace.activeCompiler) : null;
const char * objectFileExt = compiler ? compiler.objectFileExt : objectDefaultFileExt;
ide.GoToError(line, noParsing, objectFileExt);
}
void OnCodeLocationParseAndGoTo(const char * line)
{
- CompilerConfig compiler = ide.workspace ? ideSettings.GetCompilerConfig(ide.workspace.compiler) : null;
+ CompilerConfig compiler = ide.workspace ? ideSettings.GetCompilerConfig(ide.workspace.activeCompiler) : null;
const char * objectFileExt = compiler ? compiler.objectFileExt : objectDefaultFileExt;
ide.CodeLocationParseAndGoTo(line, ide.findInFilesDialog.findProject, ide.findInFilesDialog.findDir, objectFileExt);
}
bool NotifySelect(MenuItem selection, Modifiers mods)
{
globalSettingsDialog.master = this;
- if(ide.workspace && ide.workspace.compiler)
- globalSettingsDialog.workspaceActiveCompiler = ide.workspace.compiler;
+ if(ide.workspace && ide.workspace.activeCompiler)
+ globalSettingsDialog.workspaceActiveCompiler = ide.workspace.activeCompiler;
else if(ideSettings.defaultCompiler)
globalSettingsDialog.workspaceActiveCompiler = ideSettings.defaultCompiler;
globalSettingsDialog.Modal();
bool noParsing;
bool debugStart;
+ bool debugHideIDE;
#ifdef GDB_DEBUG_GUI
GDBDialog gdbDialog
{
if(workspace)
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.activeCompiler);
for(prj : workspace.projects)
projectView.ProjectUpdateMakefileForAllConfigs(prj);
delete compiler;
if(workspace)
{
bool silent = mute || (ide.projectView.buildInProgress == none ? false : true);
- CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.activeCompiler);
if(!silent)
{
projectView.ShowOutputBuildLog(true);
for(compiler : ideSettings.compilerConfigs)
{
DataRow row = toolBar.activeCompiler.AddString(compiler.name);
- if(workspace && workspace.compiler && !strcmp(compiler.name, workspace.compiler))
+ if(workspace && workspace.activeCompiler && !strcmp(compiler.name, workspace.activeCompiler))
toolBar.activeCompiler.currentRow = row;
}
if(!toolBar.activeCompiler.currentRow && toolBar.activeCompiler.firstRow)
toolBar.activeCompiler.SelectRow(toolBar.activeCompiler.firstRow);
+ toolBar.activeBitDepth.SelectRow(toolBar.activeBitDepth.FindRow(workspace ? workspace.bitDepth : 0));
}
void UpdateToolBarActiveConfigs(bool selectionOnly)
ide.projectView.ShowOutputBuildLog(true);
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.activeCompiler);
ide.projectView.DisplayCompiler(compiler, false);
delete compiler;
}
// this crashes on starting ide with epj file, solution please?
// app.UpdateDisplay();
+ workspace.OpenPreviouslyOpenedFiles(noParsing);
workspace.holdTracking = true;
- for(ofi : workspace.openedFiles)
- {
- if(ofi.state != closed)
- {
- Window file = OpenFile(ofi.path, false, true, null, no, normal, noParsing);
- if(file)
- {
- char fileName[MAX_LOCATION];
- ProjectNode node;
- GetLastDirectory(ofi.path, fileName);
- node = projectView.project.topNode.Find(fileName, true);
- if(node)
- node.EnsureVisible();
- }
- }
- }
ide.RepositionWindows(false);
workspace.holdTracking = false;
if(prj)
{
const char * activeConfigName = null;
- CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.activeCompiler);
prj.StartMonitoring();
- workspace.projects.Add(prj);
+ workspace.AddProject(prj, null);
if(toolBar.activeConfig.currentRow && toolBar.activeConfig.currentRow != toolBar.activeConfig.firstRow &&
toolBar.activeConfig.currentRow.string && toolBar.activeConfig.currentRow.string[0])
activeConfigName = toolBar.activeConfig.currentRow.string;
if(document)
{
if(projectView && document._class == class(CodeEditor) && workspace)
- {
- int lineNumber, position;
- Point scroll;
- CodeEditor editor = (CodeEditor)document;
- editor.openedFileInfo = workspace.UpdateOpenedFileInfo(filePath, opened);
- editor.openedFileInfo.holdTracking = true;
- lineNumber = Max(editor.openedFileInfo.lineNumber - 1, 0);
- position = Max(editor.openedFileInfo.position - 1, 0);
- if(editor.editBox.GoToLineNum(lineNumber))
- editor.editBox.GoToPosition(editor.editBox.line, lineNumber, position);
- scroll.x = Max(editor.openedFileInfo.scroll.x, 0);
- scroll.y = Max(editor.openedFileInfo.scroll.y, 0);
- editor.editBox.scroll = scroll;
- editor.openedFileInfo.holdTracking = false;
- }
+ workspace.RestorePreviouslyOpenedFileState((CodeEditor)document);
if(needFileModified)
document.OnFileModified = OnFileModified;
if(binaryDocExt.Find(ext))
ShellOpen(path);
else if(!strcmp(ext, "a") || !strcmp(ext, "o") || !strcmp(ext, "bc") ||
- !strcmp(ext, "lib") || !strcmp(ext, "dll") || !strcmp(ext, "exe"))
+ !strcmp(ext, "lib") || !strcmp(ext, "dll") ||
+ !strcmp(ext, "exe") || !strcmp(ext, "nexe") || !strcmp(ext, "pexe"))
{
char dirPath[MAX_LOCATION];
StripLastDirectory(path, dirPath);
ide.noParsing = true;
else if(!strcmp(app.argv[c], "-debug-start"))
ide.debugStart = true;
+ else if(!strcmp(app.argv[c], "-debug-hide-ide"))
+ ide.debugHideIDE = true;
else if(!strcmp(app.argv[c], "-debug-work-dir"))
debugWorkDir = true;
else if(!strcmp(app.argv[c], "-@"))
GetExtension(app.argv[c], ext);
isProject = !openAsText && !strcmpi(ext, "epj");
- if(isProject && c > 1 + (ide.debugStart ? 1 : 0)) continue;
+ if(isProject && c > 1 + (ide.debugStart ? 1 : 0) + (ide.debugHideIDE ? 1 : 0)) continue;
// Create directory for projects (only)
if(((dirAttribs = FileExists(parentPath)) && dirAttribs.isDirectory) || isProject)
#else
if(!found)
{
+ char * p = null;
char * tokens[256];
int c, numTokens;
GetEnvironment("XDG_DATA_DIRS", v, maxPathLen);
numTokens = TokenizeWith(v, sizeof(tokens) / sizeof(byte *), tokens, ":", false);
+ if(!numTokens)
+ {
+ p = new char[MAX_LOCATION];
+ p[0] = '\0';
+ strcat(p, "/usr/share");
+ tokens[0] = p;
+ numTokens = 1;
+ }
for(c=0; c<numTokens; c++)
{
strncpy(path, tokens[c], MAX_LOCATION); path[MAX_LOCATION-1] = '\0';
PathCat(path, sdkDirName);
PathCat(path, subDir);
- if(name) PathCat(path, name);
- if(FileExists(path) & attribs) found = true;
+ if(name)
+ PathCat(path, name);
+ if(FileExists(path) & attribs)
+ {
+ found = true;
+ break;
+ }
}
+ delete p;
}
#endif
delete v;
else if(!strcmp(app.argv[c], "-t"));
else if(!strcmp(app.argv[c], "-no-parsing"));
else if(!strcmp(app.argv[c], "-debug-start"));
+ else if(!strcmp(app.argv[c], "-debug-hide-ide"));
else if(!strcmp(app.argv[c], "-debug-work-dir"))
debugWorkDir = true;
else if(!strcmp(app.argv[c], "-@"))