}*/
enum OpenedFileState { unknown, opened, closed };
+enum ValgrindLeakCheck
+{
+ no, summary, yes, full;
+
+ property char *
+ {
+ get { return OnGetString(null, null, null); }
+ }
+
+ char * OnGetString(char * tempString, void * fieldData, bool * needClass)
+ {
+ if(this >= no && this <= full)
+ {
+ if(tempString)
+ strcpy(tempString, valgrindLeakCheckNames[this]);
+ return valgrindLeakCheckNames[this];
+ }
+ if(tempString && tempString[0])
+ tempString[0] = '\0';
+ return null;
+ }
+};
+static const char * valgrindLeakCheckNames[ValgrindLeakCheck] = { "no", "summary", "yes", "full" };
class OpenedFileInfo
{
private:
String compiler;
int bitDepth;
+ // TODO: save these new settings when json format is ready
+ bool useValgrind;
+ ValgrindLeakCheck vgLeakCheck;
+ bool vgTrackOrigins;
+ int vgRedzoneSize;
+
+ vgRedzoneSize = -1;
+ vgLeakCheck = summary;
public:
void Save()
delete project;
}
+ void SelectActiveConfig(char * configName)
+ {
+ bool change = false;
+ for(prj : ide.workspace.projects)
+ {
+ for(cfg : prj.configurations)
+ {
+ if(cfg.name && !strcmp(cfg.name, configName))
+ {
+ prj.config = cfg;
+ change = true;
+ break;
+ }
+ }
+ }
+ if(change)
+ {
+ modified = true;
+ ide.UpdateToolBarActiveConfigs(true);
+ ide.projectView.Update(null);
+ Save();
+ }
+ }
+
bool FindPath(ProjectNode node, char * path)
{
if(node.type == file)
Breakpoint bp = (Breakpoint)row.tag;
if(bp)
{
- char * currentLoc = bp.LocationToString();
+ char * currentLoc = bp.CopyUserLocationString();
if(strcmp(location, currentLoc))
{
// todo, parse location
bp = { type = user, enabled = enabled, ignore = ignore, level = level, line = line };
workspace.breakpoints.Add(bp);
- bp.relativeFilePath = CopyString(strFile);
+ bp.relativeFilePath = strFile;
bp.absoluteFilePath = workspace.GetAbsolutePathFromRelative(strFile);
if(!bp.absoluteFilePath)
bp.absoluteFilePath = CopyString("");
bp = { type = user, enabled = enabled, level = -1 };
workspace.breakpoints.Add(bp);
bp.line = atoi(lineNum);
- bp.relativeFilePath = CopyString(relPath);
+ bp.relativeFilePath = relPath;
bp.absoluteFilePath = workspace.GetAbsolutePathFromRelative(relPath);
if(!bp.absoluteFilePath)
- bp.absoluteFilePath = CopyString("");
+ bp.absoluteFilePath = "";
}
}
}