implemented TIDEExceptions.LoadFromXMLConfig and SaveToXMLConfig

git-svn-id: trunk@6329 -
This commit is contained in:
vincents 2004-12-03 14:35:30 +00:00
parent cd48c6349c
commit aa49666b28
3 changed files with 36 additions and 2 deletions

View File

@ -8,6 +8,9 @@ codetools
custom
Obsolete: Use packages instead
User defined components for the IDE
fpcunit
template for a fpcunit gui test runner
gtk
GTK specific components

View File

@ -121,6 +121,7 @@ const
XMLBreakPointsNode = 'BreakPoints';
XMLBreakPointGroupsNode = 'BreakPointGroups';
XMLWatchesNode = 'Watches';
XMLExceptionsNode = 'Exceptions';
type
EDebuggerException = class(Exception);
@ -3514,14 +3515,36 @@ end;
procedure TIDEExceptions.LoadFromXMLConfig (const AXMLConfig: TXMLConfig;
const APath: string);
var
NewCount: Integer;
i: Integer;
IDEException: TIDEException;
begin
// TODO
Clear;
NewCount := AXMLConfig.GetValue(APath + 'Count', 0);
for i := 0 to NewCount-1 do
begin
IDEException := TIDEException(inherited Add(''));
IDEException.LoadFromXMLConfig(AXMLConfig,
Format('%sItem%d/', [APath, i + 1]));
end;
end;
procedure TIDEExceptions.SaveToXMLConfig (const AXMLConfig: TXMLConfig;
const APath: string);
var
Cnt: Integer;
i: Integer;
IDEException: TIDEException;
begin
// TODO
Cnt := Count;
AXMLConfig.SetDeleteValue(APath + 'Count', Cnt, 0);
for i := 0 to Cnt - 1 do
begin
IDEException := Items[i];
IDEException.SaveToXMLConfig(AXMLConfig,
Format('%sItem%d/', [APath, i + 1]));
end;
end;
procedure TIDEExceptions.SetItem(const AIndex: Integer;
@ -3552,6 +3575,9 @@ finalization
end.
{ =============================================================================
$Log$
Revision 1.66 2004/12/03 14:35:30 vincents
implemented TIDEExceptions.LoadFromXMLConfig and SaveToXMLConfig
Revision 1.65 2004/11/23 12:25:47 vincents
fixed fpc 1.0.x compilation

View File

@ -1495,6 +1495,7 @@ begin
@Project1.LongenFilename,
@FBreakPointGroups.GetGroupByName);
FWatches.LoadFromXMLConfig(XMLConfig,'Debugging/'+XMLWatchesNode+'/');
FExceptions.LoadFromXMLConfig(XMLConfig,'Debugging/'+XMLExceptionsNode+'/');
end;
{------------------------------------------------------------------------------
@ -1509,6 +1510,7 @@ begin
FBreakPoints.SaveToXMLConfig(XMLConfig,'Debugging/'+XMLBreakPointsNode+'/',
@Project1.ShortenFilename);
FWatches.SaveToXMLConfig(XMLConfig,'Debugging/'+XMLWatchesNode+'/');
FExceptions.SaveToXMLConfig(XMLConfig,'Debugging/'+XMLExceptionsNode+'/');
end;
procedure TDebugManager.DoRestoreDebuggerMarks(AnUnitInfo: TUnitInfo);
@ -1941,6 +1943,9 @@ end.
{ =============================================================================
$Log$
Revision 1.80 2004/12/03 14:35:30 vincents
implemented TIDEExceptions.LoadFromXMLConfig and SaveToXMLConfig
Revision 1.79 2004/11/24 08:18:13 mattias
TTextStrings improvements (Exchange, Put), clean ups