mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 01:35:58 +02:00
IDE: renamed build modes to properties
git-svn-id: trunk@19624 -
This commit is contained in:
parent
2fed482283
commit
a557b7dfc8
@ -205,8 +205,8 @@ begin
|
|||||||
|
|
||||||
OnBackupFileInteractive:=@BackupFile;
|
OnBackupFileInteractive:=@BackupFile;
|
||||||
RunCompilerWithOptions:=@OnRunCompilerWithOptions;
|
RunCompilerWithOptions:=@OnRunCompilerWithOptions;
|
||||||
GlobalBuildModeSet:=TGlobalBuildModeSet.Create;
|
GlobalBuildProperties:=TGlobalBuildProperties.Create;
|
||||||
GlobalBuildModeSet.AddStandardModes;
|
GlobalBuildProperties.AddStandardModes;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TBuildManager.Destroy;
|
destructor TBuildManager.Destroy;
|
||||||
@ -214,7 +214,7 @@ begin
|
|||||||
LazConfMacroFunc:=nil;
|
LazConfMacroFunc:=nil;
|
||||||
OnBackupFileInteractive:=nil;
|
OnBackupFileInteractive:=nil;
|
||||||
FreeAndNil(InputHistories);
|
FreeAndNil(InputHistories);
|
||||||
FreeAndNil(GlobalBuildModeSet);
|
FreeAndNil(GlobalBuildProperties);
|
||||||
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
MainBuildBoss:=nil;
|
MainBuildBoss:=nil;
|
||||||
|
@ -50,9 +50,9 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TIDEBuildMode }
|
{ TIDEBuildProperty }
|
||||||
|
|
||||||
TIDEBuildMode = class(TLazBuildProperty)
|
TIDEBuildProperty = class(TLazBuildProperty)
|
||||||
protected
|
protected
|
||||||
procedure SetIdentifier(const AValue: string); override;
|
procedure SetIdentifier(const AValue: string); override;
|
||||||
procedure SetDescription(const AValue: string); override;
|
procedure SetDescription(const AValue: string); override;
|
||||||
@ -67,21 +67,21 @@ type
|
|||||||
procedure SaveToXMLConfig(AXMLConfig: TXMLConfig; const Path: string;
|
procedure SaveToXMLConfig(AXMLConfig: TXMLConfig; const Path: string;
|
||||||
UsePathDelim: TPathDelimSwitch);
|
UsePathDelim: TPathDelimSwitch);
|
||||||
procedure CreateDiff(OtherMode: TLazBuildProperty; Tool: TCompilerDiffTool);
|
procedure CreateDiff(OtherMode: TLazBuildProperty; Tool: TCompilerDiffTool);
|
||||||
procedure Assign(Source: TIDEBuildMode);
|
procedure Assign(Source: TIDEBuildProperty);
|
||||||
procedure SetDefaultValue(const AValue: string); override;
|
procedure SetDefaultValue(const AValue: string); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TBuildModeSet = class;
|
TBuildModeSet = class;
|
||||||
|
|
||||||
{ TIDEBuildModes }
|
{ TIDEBuildProperties }
|
||||||
|
|
||||||
TIDEBuildModes = class(TLazBuildProperties)
|
TIDEBuildProperties = class(TLazBuildProperties)
|
||||||
private
|
private
|
||||||
FBuildModeSet: TBuildModeSet;
|
FBuildPropertySet: TBuildModeSet;
|
||||||
fPrevModes, fNextModes: TIDEBuildModes;
|
fPrevModes, fNextModes: TIDEBuildProperties;
|
||||||
procedure SetBuildModeSet(const AValue: TBuildModeSet);
|
procedure SetBuildPropertySet(const AValue: TBuildModeSet);
|
||||||
protected
|
protected
|
||||||
FItems: TFPList;// list of TIDEBuildMode
|
FItems: TFPList;// list of TIDEBuildProperty
|
||||||
function GetItems(Index: integer): TLazBuildProperty; override;
|
function GetItems(Index: integer): TLazBuildProperty; override;
|
||||||
public
|
public
|
||||||
function Add(Identifier: string): TLazBuildProperty; override;
|
function Add(Identifier: string): TLazBuildProperty; override;
|
||||||
@ -91,7 +91,7 @@ type
|
|||||||
procedure Delete(Index: integer); override;
|
procedure Delete(Index: integer); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function IndexOfIdentifier(Identifier: string): integer; override;
|
function IndexOfIdentifier(Identifier: string): integer; override;
|
||||||
function ModeWithIdentifier(Identifier: string): TIDEBuildMode; override;
|
function ModeWithIdentifier(Identifier: string): TIDEBuildProperty; override;
|
||||||
procedure Move(OldIndex, NewIndex: integer); override;
|
procedure Move(OldIndex, NewIndex: integer); override;
|
||||||
procedure LoadFromXMLConfig(AXMLConfig: TXMLConfig; const Path: string;
|
procedure LoadFromXMLConfig(AXMLConfig: TXMLConfig; const Path: string;
|
||||||
DoSwitchPathDelims: boolean);
|
DoSwitchPathDelims: boolean);
|
||||||
@ -100,7 +100,7 @@ type
|
|||||||
procedure CreateDiff(OtherProperties: TLazBuildProperties;
|
procedure CreateDiff(OtherProperties: TLazBuildProperties;
|
||||||
Tool: TCompilerDiffTool);
|
Tool: TCompilerDiffTool);
|
||||||
procedure Assign(Source: TLazBuildProperties);
|
procedure Assign(Source: TLazBuildProperties);
|
||||||
property BuildModeSet: TBuildModeSet read FBuildModeSet write SetBuildModeSet;// active in BuildModeSet
|
property BuildPropertySet: TBuildModeSet read FBuildPropertySet write SetBuildPropertySet;// active in BuildModeSet
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TBuildModeSet }
|
{ TBuildModeSet }
|
||||||
@ -108,29 +108,29 @@ type
|
|||||||
TBuildModeSet = class
|
TBuildModeSet = class
|
||||||
private
|
private
|
||||||
FEvaluator: TExpressionEvaluator;
|
FEvaluator: TExpressionEvaluator;
|
||||||
FFirstBuildModes: TIDEBuildModes;
|
FFirstBuildModes: TIDEBuildProperties;
|
||||||
procedure Changed;
|
procedure Changed;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function FindModeWithIdentifier(Identifier: string; out BuildModes: TIDEBuildModes;
|
function FindModeWithIdentifier(Identifier: string; out BuildModes: TIDEBuildProperties;
|
||||||
out BuildMode: TIDEBuildMode): boolean;
|
out BuildMode: TIDEBuildProperty): boolean;
|
||||||
function GetUniqueModeName(CheckToo: TIDEBuildModes): string;
|
function GetUniqueModeName(CheckToo: TIDEBuildProperties): string;
|
||||||
property Evaluator: TExpressionEvaluator read FEvaluator;
|
property Evaluator: TExpressionEvaluator read FEvaluator;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGlobalBuildModeSet }
|
{ TGlobalBuildProperties }
|
||||||
|
|
||||||
TGlobalBuildModeSet = class(TBuildModeSet)
|
TGlobalBuildProperties = class(TBuildModeSet)
|
||||||
private
|
private
|
||||||
FMainMode: TIDEBuildMode;
|
FMainProperty: TIDEBuildProperty;
|
||||||
FStdModes: TIDEBuildModes;
|
FStdProperties: TIDEBuildProperties;
|
||||||
FTargetOS: TIDEBuildMode;
|
FTargetOS: TIDEBuildProperty;
|
||||||
public
|
public
|
||||||
procedure AddStandardModes;
|
procedure AddStandardModes;
|
||||||
property StdModes: TIDEBuildModes read FStdModes;
|
property StdModes: TIDEBuildProperties read FStdProperties;
|
||||||
property MainMode: TIDEBuildMode read FMainMode;
|
property MainProperty: TIDEBuildProperty read FMainProperty;
|
||||||
property TargetOS: TIDEBuildMode read FTargetOS;
|
property TargetOS: TIDEBuildProperty read FTargetOS;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGlobalCompilerOptions - compiler options overrides }
|
{ TGlobalCompilerOptions - compiler options overrides }
|
||||||
@ -611,7 +611,7 @@ type
|
|||||||
TCompilerOptions = TBaseCompilerOptions;
|
TCompilerOptions = TBaseCompilerOptions;
|
||||||
|
|
||||||
var
|
var
|
||||||
GlobalBuildModeSet: TGlobalBuildModeSet;
|
GlobalBuildProperties: TGlobalBuildProperties;
|
||||||
|
|
||||||
const
|
const
|
||||||
CompileReasonNames: array[TCompileReason] of string = (
|
CompileReasonNames: array[TCompileReason] of string = (
|
||||||
@ -948,11 +948,11 @@ constructor TBaseCompilerOptions.Create(const AOwner: TObject;
|
|||||||
const AToolClass: TCompilationToolClass);
|
const AToolClass: TCompilationToolClass);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FConditionals := TCompOptConditionals.Create(GlobalBuildModeSet.Evaluator);
|
FConditionals := TCompOptConditionals.Create(GlobalBuildProperties.Evaluator);
|
||||||
FParsedOpts := TParsedCompilerOptions.Create(TCompOptConditionals(FConditionals));
|
FParsedOpts := TParsedCompilerOptions.Create(TCompOptConditionals(FConditionals));
|
||||||
FExecuteBefore := AToolClass.Create;
|
FExecuteBefore := AToolClass.Create;
|
||||||
FExecuteAfter := AToolClass.Create;
|
FExecuteAfter := AToolClass.Create;
|
||||||
fBuildModes := TIDEBuildModes.Create(Self);
|
fBuildProperties := TIDEBuildProperties.Create(Self);
|
||||||
FCompilerMessages:=TCompilerMessagesList.Create;
|
FCompilerMessages:=TCompilerMessagesList.Create;
|
||||||
Clear;
|
Clear;
|
||||||
end;
|
end;
|
||||||
@ -968,7 +968,7 @@ end;
|
|||||||
destructor TBaseCompilerOptions.Destroy;
|
destructor TBaseCompilerOptions.Destroy;
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FCompilerMessages);
|
FreeAndNil(FCompilerMessages);
|
||||||
FreeAndNil(fBuildModes);
|
FreeAndNil(fBuildProperties);
|
||||||
FreeThenNil(fExecuteBefore);
|
FreeThenNil(fExecuteBefore);
|
||||||
FreeThenNil(fExecuteAfter);
|
FreeThenNil(fExecuteAfter);
|
||||||
FreeThenNil(FParsedOpts);
|
FreeThenNil(FParsedOpts);
|
||||||
@ -1231,8 +1231,8 @@ begin
|
|||||||
{ Conditionals }
|
{ Conditionals }
|
||||||
TCompOptConditionals(FConditionals).LoadFromXMLConfig(XMLConfigFile,
|
TCompOptConditionals(FConditionals).LoadFromXMLConfig(XMLConfigFile,
|
||||||
Path+'Conditionals/',PathDelimChange);
|
Path+'Conditionals/',PathDelimChange);
|
||||||
TIDEBuildModes(fBuildModes).LoadFromXMLConfig(XMLConfigFile,
|
TIDEBuildProperties(fBuildProperties).LoadFromXMLConfig(XMLConfigFile,
|
||||||
Path+'BuildModes/',PathDelimChange);
|
Path+'BuildProperties/',PathDelimChange);
|
||||||
// ToDo: replace this with conditional compiler options
|
// ToDo: replace this with conditional compiler options
|
||||||
LCLWidgetType := XMLConfigFile.GetValue(p+'LCLWidgetType/Value', '');
|
LCLWidgetType := XMLConfigFile.GetValue(p+'LCLWidgetType/Value', '');
|
||||||
|
|
||||||
@ -1432,8 +1432,8 @@ begin
|
|||||||
{ Conditionals }
|
{ Conditionals }
|
||||||
TCompOptConditionals(FConditionals).SaveToXMLConfig(XMLConfigFile,
|
TCompOptConditionals(FConditionals).SaveToXMLConfig(XMLConfigFile,
|
||||||
Path+'Conditionals/',UsePathDelim);
|
Path+'Conditionals/',UsePathDelim);
|
||||||
TIDEBuildModes(fBuildModes).SaveToXMLConfig(XMLConfigFile,
|
TIDEBuildProperties(fBuildProperties).SaveToXMLConfig(XMLConfigFile,
|
||||||
Path+'BuildModes/',UsePathDelim);
|
Path+'BuildProperties/',UsePathDelim);
|
||||||
// ToDo: remove
|
// ToDo: remove
|
||||||
XMLConfigFile.SetDeleteValue(p+'LCLWidgetType/Value', LCLWidgetType,'');
|
XMLConfigFile.SetDeleteValue(p+'LCLWidgetType/Value', LCLWidgetType,'');
|
||||||
|
|
||||||
@ -2777,7 +2777,7 @@ begin
|
|||||||
|
|
||||||
// conditionals
|
// conditionals
|
||||||
Conditionals.Assign(CompOpts.Conditionals);
|
Conditionals.Assign(CompOpts.Conditionals);
|
||||||
TIDEBuildModes(BuildModes).Assign(CompOpts.BuildModes);
|
TIDEBuildProperties(BuildProperties).Assign(CompOpts.BuildProperties);
|
||||||
fLCLWidgetType := CompOpts.fLCLWidgetType;
|
fLCLWidgetType := CompOpts.fLCLWidgetType;
|
||||||
|
|
||||||
// Parsing
|
// Parsing
|
||||||
@ -2906,7 +2906,7 @@ begin
|
|||||||
// conditionals
|
// conditionals
|
||||||
Tool.Path:='Conditionals';
|
Tool.Path:='Conditionals';
|
||||||
TCompOptConditionals(Conditionals).CreateDiff(CompOpts.Conditionals,Tool);
|
TCompOptConditionals(Conditionals).CreateDiff(CompOpts.Conditionals,Tool);
|
||||||
TIDEBuildModes(fBuildModes).CreateDiff(CompOpts.BuildModes,Tool);
|
TIDEBuildProperties(fBuildProperties).CreateDiff(CompOpts.BuildProperties,Tool);
|
||||||
Tool.AddDiff('LCLWidgetType',fLCLWidgetType,CompOpts.fLCLWidgetType);
|
Tool.AddDiff('LCLWidgetType',fLCLWidgetType,CompOpts.fLCLWidgetType);
|
||||||
|
|
||||||
// parsing
|
// parsing
|
||||||
@ -3056,7 +3056,7 @@ end;
|
|||||||
constructor TAdditionalCompilerOptions.Create(TheOwner: TObject);
|
constructor TAdditionalCompilerOptions.Create(TheOwner: TObject);
|
||||||
begin
|
begin
|
||||||
fOwner:=TheOwner;
|
fOwner:=TheOwner;
|
||||||
FConditionals:=TCompOptConditionals.Create(GlobalBuildModeSet.Evaluator);
|
FConditionals:=TCompOptConditionals.Create(GlobalBuildProperties.Evaluator);
|
||||||
FParsedOpts:=TParsedCompilerOptions.Create(FConditionals);
|
FParsedOpts:=TParsedCompilerOptions.Create(FConditionals);
|
||||||
Clear;
|
Clear;
|
||||||
end;
|
end;
|
||||||
@ -3456,8 +3456,8 @@ end;
|
|||||||
|
|
||||||
destructor TBuildModeSet.Destroy;
|
destructor TBuildModeSet.Destroy;
|
||||||
var
|
var
|
||||||
BuildMode: TIDEBuildModes;
|
BuildMode: TIDEBuildProperties;
|
||||||
NextMode: TIDEBuildModes;
|
NextMode: TIDEBuildProperties;
|
||||||
begin
|
begin
|
||||||
BuildMode:=FFirstBuildModes;
|
BuildMode:=FFirstBuildModes;
|
||||||
while BuildMode<>nil do begin
|
while BuildMode<>nil do begin
|
||||||
@ -3471,7 +3471,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TBuildModeSet.FindModeWithIdentifier(Identifier: string; out
|
function TBuildModeSet.FindModeWithIdentifier(Identifier: string; out
|
||||||
BuildModes: TIDEBuildModes; out BuildMode: TIDEBuildMode): boolean;
|
BuildModes: TIDEBuildProperties; out BuildMode: TIDEBuildProperty): boolean;
|
||||||
begin
|
begin
|
||||||
BuildMode:=nil;
|
BuildMode:=nil;
|
||||||
BuildModes:=FFirstBuildModes;
|
BuildModes:=FFirstBuildModes;
|
||||||
@ -3483,11 +3483,11 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBuildModeSet.GetUniqueModeName(CheckToo: TIDEBuildModes): string;
|
function TBuildModeSet.GetUniqueModeName(CheckToo: TIDEBuildProperties): string;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
BuildModes: TIDEBuildModes;
|
BuildModes: TIDEBuildProperties;
|
||||||
BuildMode: TIDEBuildMode;
|
BuildMode: TIDEBuildProperty;
|
||||||
begin
|
begin
|
||||||
i:=0;
|
i:=0;
|
||||||
repeat
|
repeat
|
||||||
@ -3497,44 +3497,44 @@ begin
|
|||||||
and ((CheckToo=nil) or (CheckToo.IndexOfIdentifier(Result)<0));
|
and ((CheckToo=nil) or (CheckToo.IndexOfIdentifier(Result)<0));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEBuildMode }
|
{ TIDEBuildProperty }
|
||||||
|
|
||||||
procedure TIDEBuildMode.SetIdentifier(const AValue: string);
|
procedure TIDEBuildProperty.SetIdentifier(const AValue: string);
|
||||||
begin
|
begin
|
||||||
if FIdentifier=AValue then exit;
|
if FIdentifier=AValue then exit;
|
||||||
if (AValue='') or (not IsValidIdent(AValue)) then
|
if (AValue='') or (not IsValidIdent(AValue)) then
|
||||||
raise Exception.Create('TIDEBuildMode.SetIdentifier invalid identifier: '+AValue);
|
raise Exception.Create('TIDEBuildProperty.SetIdentifier invalid identifier: '+AValue);
|
||||||
FIdentifier:=AValue;
|
FIdentifier:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.SetDescription(const AValue: string);
|
procedure TIDEBuildProperty.SetDescription(const AValue: string);
|
||||||
begin
|
begin
|
||||||
if FDescription=AValue then exit;
|
if FDescription=AValue then exit;
|
||||||
FDescription:=AValue;
|
FDescription:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.SetValueDescriptions(const AValue: TStrings);
|
procedure TIDEBuildProperty.SetValueDescriptions(const AValue: TStrings);
|
||||||
begin
|
begin
|
||||||
if FValueDescriptions=AValue then exit;
|
if FValueDescriptions=AValue then exit;
|
||||||
FValueDescriptions.Assign(AValue);
|
FValueDescriptions.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.SetValues(const AValue: TStrings);
|
procedure TIDEBuildProperty.SetValues(const AValue: TStrings);
|
||||||
begin
|
begin
|
||||||
if FValues=AValue then exit;
|
if FValues=AValue then exit;
|
||||||
FValues.Assign(AValue);
|
FValues.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TIDEBuildMode.Create;
|
constructor TIDEBuildProperty.Create;
|
||||||
begin
|
begin
|
||||||
FValues:=TStringList.Create;
|
FValues:=TStringList.Create;
|
||||||
FValueDescriptions:=TStringList.Create;
|
FValueDescriptions:=TStringList.Create;
|
||||||
FDefaultValue:=TCompOptConditionals.Create(GlobalBuildModeSet.Evaluator);
|
FDefaultValue:=TCompOptConditionals.Create(GlobalBuildProperties.Evaluator);
|
||||||
FDefaultValue.Root.NodeType:=cocntAddValue;
|
FDefaultValue.Root.NodeType:=cocntAddValue;
|
||||||
FDefaultValue.Root.ValueType:=cocvtNone;
|
FDefaultValue.Root.ValueType:=cocvtNone;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TIDEBuildMode.Destroy;
|
destructor TIDEBuildProperty.Destroy;
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FValues);
|
FreeAndNil(FValues);
|
||||||
FreeAndNil(FValueDescriptions);
|
FreeAndNil(FValueDescriptions);
|
||||||
@ -3542,7 +3542,7 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.Assign(Source: TLazBuildProperty);
|
procedure TIDEBuildProperty.Assign(Source: TLazBuildProperty);
|
||||||
begin
|
begin
|
||||||
FIdentifier:=Source.Identifier;
|
FIdentifier:=Source.Identifier;
|
||||||
FDefaultValue.Assign(Source.DefaultValue);
|
FDefaultValue.Assign(Source.DefaultValue);
|
||||||
@ -3551,7 +3551,7 @@ begin
|
|||||||
FValues.Assign(Source.Values);
|
FValues.Assign(Source.Values);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.LoadFromXMLConfig(AXMLConfig: TXMLConfig;
|
procedure TIDEBuildProperty.LoadFromXMLConfig(AXMLConfig: TXMLConfig;
|
||||||
const Path: string; DoSwitchPathDelims: boolean);
|
const Path: string; DoSwitchPathDelims: boolean);
|
||||||
begin
|
begin
|
||||||
FIdentifier:=AXMLConfig.GetValue(Path+'Identifier/Value','');
|
FIdentifier:=AXMLConfig.GetValue(Path+'Identifier/Value','');
|
||||||
@ -3568,7 +3568,7 @@ begin
|
|||||||
ValueDescriptions.Add('');
|
ValueDescriptions.Add('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.SaveToXMLConfig(AXMLConfig: TXMLConfig;
|
procedure TIDEBuildProperty.SaveToXMLConfig(AXMLConfig: TXMLConfig;
|
||||||
const Path: string; UsePathDelim: TPathDelimSwitch);
|
const Path: string; UsePathDelim: TPathDelimSwitch);
|
||||||
begin
|
begin
|
||||||
AXMLConfig.SetDeleteValue(Path+'Identifier/Value',FIdentifier,'');
|
AXMLConfig.SetDeleteValue(Path+'Identifier/Value',FIdentifier,'');
|
||||||
@ -3579,7 +3579,7 @@ begin
|
|||||||
UsePathDelim);
|
UsePathDelim);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.CreateDiff(OtherMode: TLazBuildProperty;
|
procedure TIDEBuildProperty.CreateDiff(OtherMode: TLazBuildProperty;
|
||||||
Tool: TCompilerDiffTool);
|
Tool: TCompilerDiffTool);
|
||||||
begin
|
begin
|
||||||
Tool.AddDiff('Identifier',Identifier,OtherMode.Identifier);
|
Tool.AddDiff('Identifier',Identifier,OtherMode.Identifier);
|
||||||
@ -3589,7 +3589,7 @@ begin
|
|||||||
TCompOptConditionals(DefaultValue).CreateDiff(OtherMode.DefaultValue,Tool);
|
TCompOptConditionals(DefaultValue).CreateDiff(OtherMode.DefaultValue,Tool);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.Assign(Source: TIDEBuildMode);
|
procedure TIDEBuildProperty.Assign(Source: TIDEBuildProperty);
|
||||||
begin
|
begin
|
||||||
Identifier:=Source.Identifier;
|
Identifier:=Source.Identifier;
|
||||||
Values:=Source.Values;
|
Values:=Source.Values;
|
||||||
@ -3598,7 +3598,7 @@ begin
|
|||||||
ValueDescriptions:=Source.ValueDescriptions;
|
ValueDescriptions:=Source.ValueDescriptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildMode.SetDefaultValue(const AValue: string);
|
procedure TIDEBuildProperty.SetDefaultValue(const AValue: string);
|
||||||
var
|
var
|
||||||
Node: TCompOptCondNode;
|
Node: TCompOptCondNode;
|
||||||
begin
|
begin
|
||||||
@ -3610,44 +3610,44 @@ begin
|
|||||||
DefaultValue.Root.AddLast(Node);
|
DefaultValue.Root.AddLast(Node);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEBuildModes }
|
{ TIDEBuildProperties }
|
||||||
|
|
||||||
procedure TIDEBuildModes.SetBuildModeSet(const AValue: TBuildModeSet);
|
procedure TIDEBuildProperties.SetBuildPropertySet(const AValue: TBuildModeSet);
|
||||||
begin
|
begin
|
||||||
if FBuildModeSet=AValue then exit;
|
if FBuildPropertySet=AValue then exit;
|
||||||
if FBuildModeSet<>nil then begin
|
if FBuildPropertySet<>nil then begin
|
||||||
if FBuildModeSet.FFirstBuildModes=Self then
|
if FBuildPropertySet.FFirstBuildModes=Self then
|
||||||
FBuildModeSet.FFirstBuildModes:=fNextModes;
|
FBuildPropertySet.FFirstBuildModes:=fNextModes;
|
||||||
if fNextModes<>nil then fNextModes.fPrevModes:=fPrevModes;
|
if fNextModes<>nil then fNextModes.fPrevModes:=fPrevModes;
|
||||||
if fPrevModes<>nil then fPrevModes.fNextModes:=fNextModes;
|
if fPrevModes<>nil then fPrevModes.fNextModes:=fNextModes;
|
||||||
fPrevModes:=nil;
|
fPrevModes:=nil;
|
||||||
fNextModes:=nil;
|
fNextModes:=nil;
|
||||||
FBuildModeSet.Changed;
|
FBuildPropertySet.Changed;
|
||||||
end;
|
end;
|
||||||
FBuildModeSet:=AValue;
|
FBuildPropertySet:=AValue;
|
||||||
if FBuildModeSet<>nil then begin
|
if FBuildPropertySet<>nil then begin
|
||||||
fNextModes:=FBuildModeSet.FFirstBuildModes;
|
fNextModes:=FBuildPropertySet.FFirstBuildModes;
|
||||||
FBuildModeSet.FFirstBuildModes:=Self;
|
FBuildPropertySet.FFirstBuildModes:=Self;
|
||||||
if fNextModes<>nil then fNextModes.fPrevModes:=Self;
|
if fNextModes<>nil then fNextModes.fPrevModes:=Self;
|
||||||
FBuildModeSet.Changed;
|
FBuildPropertySet.Changed;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEBuildModes.GetItems(Index: integer): TLazBuildProperty;
|
function TIDEBuildProperties.GetItems(Index: integer): TLazBuildProperty;
|
||||||
begin
|
begin
|
||||||
Result:=TLazBuildProperty(FItems[Index]);
|
Result:=TLazBuildProperty(FItems[Index]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEBuildModes.Add(Identifier: string): TLazBuildProperty;
|
function TIDEBuildProperties.Add(Identifier: string): TLazBuildProperty;
|
||||||
begin
|
begin
|
||||||
if IndexOfIdentifier(Identifier)>=0 then
|
if IndexOfIdentifier(Identifier)>=0 then
|
||||||
raise Exception.Create('TIDEBuildModes.Add identifier already exists');
|
raise Exception.Create('TIDEBuildProperties.Add identifier already exists');
|
||||||
Result:=TIDEBuildMode.Create;
|
Result:=TIDEBuildProperty.Create;
|
||||||
Result.Identifier:=Identifier;
|
Result.Identifier:=Identifier;
|
||||||
FItems.Add(Result);
|
FItems.Add(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.Clear;
|
procedure TIDEBuildProperties.Clear;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
@ -3656,39 +3656,39 @@ begin
|
|||||||
FItems.Clear;
|
FItems.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEBuildModes.Count: integer;
|
function TIDEBuildProperties.Count: integer;
|
||||||
begin
|
begin
|
||||||
Result:=FItems.Count;
|
Result:=FItems.Count;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TIDEBuildModes.Create(TheOwner: TObject);
|
constructor TIDEBuildProperties.Create(TheOwner: TObject);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
FItems:=TFPList.Create;
|
FItems:=TFPList.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.Delete(Index: integer);
|
procedure TIDEBuildProperties.Delete(Index: integer);
|
||||||
begin
|
begin
|
||||||
TObject(FItems[Index]).Free;
|
TObject(FItems[Index]).Free;
|
||||||
FItems.Delete(Index);
|
FItems.Delete(Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TIDEBuildModes.Destroy;
|
destructor TIDEBuildProperties.Destroy;
|
||||||
begin
|
begin
|
||||||
BuildModeSet:=nil;
|
BuildPropertySet:=nil;
|
||||||
Clear;
|
Clear;
|
||||||
FreeAndNil(FItems);
|
FreeAndNil(FItems);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEBuildModes.IndexOfIdentifier(Identifier: string): integer;
|
function TIDEBuildProperties.IndexOfIdentifier(Identifier: string): integer;
|
||||||
begin
|
begin
|
||||||
Result:=FItems.Count-1;
|
Result:=FItems.Count-1;
|
||||||
while (Result>=0) and (SysUtils.CompareText(Identifier,Items[Result].Identifier)<>0) do
|
while (Result>=0) and (SysUtils.CompareText(Identifier,Items[Result].Identifier)<>0) do
|
||||||
dec(Result);
|
dec(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEBuildModes.ModeWithIdentifier(Identifier: string): TIDEBuildMode;
|
function TIDEBuildProperties.ModeWithIdentifier(Identifier: string): TIDEBuildProperty;
|
||||||
var
|
var
|
||||||
i: LongInt;
|
i: LongInt;
|
||||||
begin
|
begin
|
||||||
@ -3696,43 +3696,43 @@ begin
|
|||||||
if i<0 then
|
if i<0 then
|
||||||
Result:=nil
|
Result:=nil
|
||||||
else
|
else
|
||||||
Result:=TIDEBuildMode(Items[i]);
|
Result:=TIDEBuildProperty(Items[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.Move(OldIndex, NewIndex: integer);
|
procedure TIDEBuildProperties.Move(OldIndex, NewIndex: integer);
|
||||||
begin
|
begin
|
||||||
FItems.Move(OldIndex,NewIndex);
|
FItems.Move(OldIndex,NewIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.LoadFromXMLConfig(AXMLConfig: TXMLConfig;
|
procedure TIDEBuildProperties.LoadFromXMLConfig(AXMLConfig: TXMLConfig;
|
||||||
const Path: string; DoSwitchPathDelims: boolean);
|
const Path: string; DoSwitchPathDelims: boolean);
|
||||||
var
|
var
|
||||||
NewItem: TIDEBuildMode;
|
NewItem: TIDEBuildProperty;
|
||||||
NewCount: LongInt;
|
NewCount: LongInt;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Clear;
|
Clear;
|
||||||
NewCount:=AXMLConfig.GetValue(Path+'Count/Value',0);
|
NewCount:=AXMLConfig.GetValue(Path+'Count/Value',0);
|
||||||
for i:=0 to NewCount-1 do begin
|
for i:=0 to NewCount-1 do begin
|
||||||
NewItem:=TIDEBuildMode.Create;
|
NewItem:=TIDEBuildProperty.Create;
|
||||||
NewItem.LoadFromXMLConfig(AXMLConfig,Path+'Item'+IntToStr(i+1)+'/',DoSwitchPathDelims);
|
NewItem.LoadFromXMLConfig(AXMLConfig,Path+'Item'+IntToStr(i+1)+'/',DoSwitchPathDelims);
|
||||||
if (NewItem.Identifier<>'') and IsValidIdent(NewItem.Identifier) then
|
if (NewItem.Identifier<>'') and IsValidIdent(NewItem.Identifier) then
|
||||||
FItems.Add(NewItem);
|
FItems.Add(NewItem);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.SaveToXMLConfig(AXMLConfig: TXMLConfig;
|
procedure TIDEBuildProperties.SaveToXMLConfig(AXMLConfig: TXMLConfig;
|
||||||
const Path: string; UsePathDelim: TPathDelimSwitch);
|
const Path: string; UsePathDelim: TPathDelimSwitch);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
AXMLConfig.SetDeleteValue(Path+'Count/Value',Count,0);
|
AXMLConfig.SetDeleteValue(Path+'Count/Value',Count,0);
|
||||||
for i:=0 to Count-1 do
|
for i:=0 to Count-1 do
|
||||||
TIDEBuildMode(Items[i]).SaveToXMLConfig(AXMLConfig,
|
TIDEBuildProperty(Items[i]).SaveToXMLConfig(AXMLConfig,
|
||||||
Path+'Item'+IntToStr(i+1)+'/',UsePathDelim);
|
Path+'Item'+IntToStr(i+1)+'/',UsePathDelim);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.CreateDiff(OtherProperties: TLazBuildProperties;
|
procedure TIDEBuildProperties.CreateDiff(OtherProperties: TLazBuildProperties;
|
||||||
Tool: TCompilerDiffTool);
|
Tool: TCompilerDiffTool);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -3740,11 +3740,11 @@ begin
|
|||||||
Tool.AddDiff('Count',Count,OtherProperties.Count);
|
Tool.AddDiff('Count',Count,OtherProperties.Count);
|
||||||
for i:=0 to Count-1 do begin
|
for i:=0 to Count-1 do begin
|
||||||
if i<OtherProperties.Count then
|
if i<OtherProperties.Count then
|
||||||
TIDEBuildMode(Items[i]).CreateDiff(OtherProperties.Items[i],Tool);
|
TIDEBuildProperty(Items[i]).CreateDiff(OtherProperties.Items[i],Tool);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBuildModes.Assign(Source: TLazBuildProperties);
|
procedure TIDEBuildProperties.Assign(Source: TLazBuildProperties);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
Item: TLazBuildProperty;
|
Item: TLazBuildProperty;
|
||||||
@ -3752,28 +3752,28 @@ begin
|
|||||||
Clear;
|
Clear;
|
||||||
for i:=0 to Source.Count-1 do begin
|
for i:=0 to Source.Count-1 do begin
|
||||||
Item:=Add(Source[i].Identifier);
|
Item:=Add(Source[i].Identifier);
|
||||||
TIDEBuildMode(Item).Assign(Source[i]);
|
TIDEBuildProperty(Item).Assign(Source[i]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGlobalBuildModeSet }
|
{ TGlobalBuildProperties }
|
||||||
|
|
||||||
procedure TGlobalBuildModeSet.AddStandardModes;
|
procedure TGlobalBuildProperties.AddStandardModes;
|
||||||
begin
|
begin
|
||||||
fStdModes:=TIDEBuildModes.Create(Self);
|
FStdProperties:=TIDEBuildProperties.Create(Self);
|
||||||
|
|
||||||
fMainMode:=TIDEBuildMode(StdModes.Add('BuildMode'));
|
FMainProperty:=TIDEBuildProperty(StdModes.Add('BuildProperty'));
|
||||||
MainMode.Description:='Main build mode';
|
MainProperty.Description:='Main build mode';
|
||||||
MainMode.Values.Text:='Default'+LineEnding
|
MainProperty.Values.Text:='Default'+LineEnding
|
||||||
+'Debug'+LineEnding
|
+'Debug'+LineEnding
|
||||||
+'Release'+LineEnding
|
+'Release'+LineEnding
|
||||||
+'Mode1'+LineEnding
|
+'Mode1'+LineEnding
|
||||||
+'Mode2'+LineEnding
|
+'Mode2'+LineEnding
|
||||||
+'Mode3'+LineEnding
|
+'Mode3'+LineEnding
|
||||||
+'Mode4'+LineEnding;
|
+'Mode4'+LineEnding;
|
||||||
MainMode.SetDefaultValue('Default');
|
MainProperty.SetDefaultValue('Default');
|
||||||
|
|
||||||
FTargetOS:=TIDEBuildMode(StdModes.Add('TargetOS'));
|
FTargetOS:=TIDEBuildProperty(StdModes.Add('TargetOS'));
|
||||||
TargetOS.Description:='Target operating system';
|
TargetOS.Description:='Target operating system';
|
||||||
TargetOS.Values.Text:=
|
TargetOS.Values.Text:=
|
||||||
'darwin'+LineEnding
|
'darwin'+LineEnding
|
||||||
@ -3806,7 +3806,7 @@ begin
|
|||||||
+'symbian';
|
+'symbian';
|
||||||
TargetOS.SetDefaultValue(GetDefaultTargetOS);
|
TargetOS.SetDefaultValue(GetDefaultTargetOS);
|
||||||
|
|
||||||
StdModes.BuildModeSet:=Self;
|
StdModes.BuildPropertySet:=Self;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCompilerMessagesList }
|
{ TCompilerMessagesList }
|
||||||
|
@ -726,7 +726,7 @@ begin
|
|||||||
// conditional
|
// conditional
|
||||||
{$IFDEF EnableBuildModes}
|
{$IFDEF EnableBuildModes}
|
||||||
ConditionalOptionsFrame.Conditionals:=Options.Conditionals as TCompOptConditionals;
|
ConditionalOptionsFrame.Conditionals:=Options.Conditionals as TCompOptConditionals;
|
||||||
BuildModesFrame.BuildModes:=Options.BuildModes as TIDEBuildModes;
|
BuildModesFrame.BuildProperties:=Options.BuildProperties as TIDEBuildProperties;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
// inherited tab
|
// inherited tab
|
||||||
|
@ -6808,7 +6808,8 @@ begin
|
|||||||
EnvironmentOptions.Save(false);
|
EnvironmentOptions.Save(false);
|
||||||
|
|
||||||
{$IFDEF EnableBuildModes}
|
{$IFDEF EnableBuildModes}
|
||||||
TIDEBuildModes(Project1.CompilerOptions.BuildModes).BuildModeSet:=GlobalBuildModeSet;
|
TIDEBuildProperties(Project1.CompilerOptions.BuildProperties)
|
||||||
|
.BuildPropertySet:=GlobalBuildProperties;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
MainBuildBoss.RescanCompilerDefines(true,true);
|
MainBuildBoss.RescanCompilerDefines(true,true);
|
||||||
@ -8619,9 +8620,9 @@ begin
|
|||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
end;
|
end;
|
||||||
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.DoCloseProject B');{$ENDIF}
|
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.DoCloseProject B');{$ENDIF}
|
||||||
// deactivate project build modes
|
// deactivate project build properties
|
||||||
if Project1<>nil then
|
if Project1<>nil then
|
||||||
TIDEBuildModes(Project1.CompilerOptions.BuildModes).BuildModeSet:=nil;
|
TIDEBuildProperties(Project1.CompilerOptions.BuildProperties).BuildPropertySet:=nil;
|
||||||
IncreaseCompilerParseStamp;
|
IncreaseCompilerParseStamp;
|
||||||
// close Project
|
// close Project
|
||||||
if ProjInspector<>nil then ProjInspector.LazProject:=nil;
|
if ProjInspector<>nil then ProjInspector.LazProject:=nil;
|
||||||
|
@ -232,7 +232,7 @@ type
|
|||||||
|
|
||||||
// conditionals / build modes
|
// conditionals / build modes
|
||||||
FConditionals: TLazCompOptConditionals;
|
FConditionals: TLazCompOptConditionals;
|
||||||
fBuildModes: TLazBuildProperties;
|
fBuildProperties: TLazBuildProperties;
|
||||||
fLCLWidgetType: string;
|
fLCLWidgetType: string;
|
||||||
|
|
||||||
// Parsing:
|
// Parsing:
|
||||||
@ -344,7 +344,7 @@ type
|
|||||||
|
|
||||||
// conditional / build modes
|
// conditional / build modes
|
||||||
property Conditionals: TLazCompOptConditionals read FConditionals;
|
property Conditionals: TLazCompOptConditionals read FConditionals;
|
||||||
property BuildModes: TLazBuildProperties read fBuildModes;
|
property BuildProperties: TLazBuildProperties read fBuildProperties;
|
||||||
// Beware: eventually LCLWidgetType will be replaced by a more generic solution
|
// Beware: eventually LCLWidgetType will be replaced by a more generic solution
|
||||||
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
|
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
|
||||||
|
|
||||||
|
@ -57,13 +57,13 @@ type
|
|||||||
procedure NewValueClick(Sender: TObject);
|
procedure NewValueClick(Sender: TObject);
|
||||||
procedure DeleteValueClick(Sender: TObject);
|
procedure DeleteValueClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FBuildModes: TIDEBuildModes;
|
FBuildProperties: TIDEBuildProperties;
|
||||||
fModeImgID: LongInt;
|
fModeImgID: LongInt;
|
||||||
fValuesImgID: LongInt;
|
fValuesImgID: LongInt;
|
||||||
fValueImgID: LongInt;
|
fValueImgID: LongInt;
|
||||||
fDefValueImgID: LongInt;
|
fDefValueImgID: LongInt;
|
||||||
FEditors: TFPList;// list of TCompOptsExprEditor
|
FEditors: TFPList;// list of TCompOptsExprEditor
|
||||||
procedure SetBuildModes(const AValue: TIDEBuildModes);
|
procedure SetBuildProperties(const AValue: TIDEBuildProperties);
|
||||||
procedure RebuildTreeView;
|
procedure RebuildTreeView;
|
||||||
procedure TreeViewAddBuildMode(BuildProperty: TLazBuildProperty);
|
procedure TreeViewAddBuildMode(BuildProperty: TLazBuildProperty);
|
||||||
procedure TreeViewAddValue(ValuesTVNode: TTreeNode; aValue: string);
|
procedure TreeViewAddValue(ValuesTVNode: TTreeNode; aValue: string);
|
||||||
@ -77,7 +77,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property BuildModes: TIDEBuildModes read FBuildModes write SetBuildModes;
|
property BuildProperties: TIDEBuildProperties read FBuildProperties write SetBuildProperties;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -90,8 +90,8 @@ var
|
|||||||
NewBuildProperty: TLazBuildProperty;
|
NewBuildProperty: TLazBuildProperty;
|
||||||
SetResultNode: TCompOptCondNode;
|
SetResultNode: TCompOptCondNode;
|
||||||
begin
|
begin
|
||||||
NewIdentifier:=GlobalBuildModeSet.GetUniqueModeName(BuildModes);
|
NewIdentifier:=GlobalBuildProperties.GetUniqueModeName(BuildProperties);
|
||||||
NewBuildProperty:=BuildModes.Add(NewIdentifier);
|
NewBuildProperty:=BuildProperties.Add(NewIdentifier);
|
||||||
// add a node
|
// add a node
|
||||||
SetResultNode:=TCompOptCondNode.Create(NewBuildProperty.DefaultValue);
|
SetResultNode:=TCompOptCondNode.Create(NewBuildProperty.DefaultValue);
|
||||||
SetResultNode.NodeType:=cocntSetValue;
|
SetResultNode.NodeType:=cocntSetValue;
|
||||||
@ -151,23 +151,23 @@ end;
|
|||||||
|
|
||||||
procedure TCompOptBuildModesFrame.DeleteBuildModeClick(Sender: TObject);
|
procedure TCompOptBuildModesFrame.DeleteBuildModeClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
BuildMode: TIDEBuildMode;
|
BuildProperty: TIDEBuildProperty;
|
||||||
SelTVNode: TTreeNode;
|
SelTVNode: TTreeNode;
|
||||||
NodeType: TCBMNodeType;
|
NodeType: TCBMNodeType;
|
||||||
i: LongInt;
|
i: LongInt;
|
||||||
Editor: TCompOptsExprEditor;
|
Editor: TCompOptsExprEditor;
|
||||||
begin
|
begin
|
||||||
SelTVNode:=GetSelectedNode(BuildMode,NodeType);
|
SelTVNode:=GetSelectedNode(BuildProperty,NodeType);
|
||||||
if BuildMode=nil then exit;
|
if BuildProperty=nil then exit;
|
||||||
if MessageDlg(lisConfirmDelete,
|
if MessageDlg(lisConfirmDelete,
|
||||||
Format(lisDeleteBuildMode, ['"', BuildMode.Identifier, '"']),
|
Format(lisDeleteBuildMode, ['"', BuildProperty.Identifier, '"']),
|
||||||
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
||||||
then exit;
|
then exit;
|
||||||
i:=BuildModes.IndexOfIdentifier(BuildMode.Identifier);
|
i:=BuildProperties.IndexOfIdentifier(BuildProperty.Identifier);
|
||||||
Editor:=GetEditor(BuildMode);
|
Editor:=GetEditor(BuildProperty);
|
||||||
FEditors.Remove(Editor);
|
FEditors.Remove(Editor);
|
||||||
Editor.Free;
|
Editor.Free;
|
||||||
BuildModes.Delete(i);
|
BuildProperties.Delete(i);
|
||||||
BuildModesTreeView.BeginUpdate;
|
BuildModesTreeView.BeginUpdate;
|
||||||
SelTVNode.Delete;
|
SelTVNode.Delete;
|
||||||
BuildModesTreeView.EndUpdate;
|
BuildModesTreeView.EndUpdate;
|
||||||
@ -235,7 +235,7 @@ procedure TCompOptBuildModesFrame.BuildModesTreeViewEdited(Sender: TObject;
|
|||||||
var
|
var
|
||||||
BuildProperty: TLazBuildProperty;
|
BuildProperty: TLazBuildProperty;
|
||||||
NodeType: TCBMNodeType;
|
NodeType: TCBMNodeType;
|
||||||
ConflictBuildMode: TIDEBuildMode;
|
ConflictBuildProperty: TIDEBuildProperty;
|
||||||
Index: LongInt;
|
Index: LongInt;
|
||||||
begin
|
begin
|
||||||
NodeType:=GetNodeInfo(Node,BuildProperty);
|
NodeType:=GetNodeInfo(Node,BuildProperty);
|
||||||
@ -252,8 +252,8 @@ begin
|
|||||||
S:=BuildProperty.Identifier;
|
S:=BuildProperty.Identifier;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
ConflictBuildMode:=BuildModes.ModeWithIdentifier(S);
|
ConflictBuildProperty:=BuildProperties.ModeWithIdentifier(S);
|
||||||
if (ConflictBuildMode<>nil) and (ConflictBuildMode<>BuildProperty) then
|
if (ConflictBuildProperty<>nil) and (ConflictBuildProperty<>BuildProperty) then
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisCCOErrorCaption,
|
MessageDlg(lisCCOErrorCaption,
|
||||||
Format(lisThereIsAlreadyABuildModeWithTheName, ['"', S, '"']),
|
Format(lisThereIsAlreadyABuildModeWithTheName, ['"', S, '"']),
|
||||||
@ -281,10 +281,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptBuildModesFrame.SetBuildModes(const AValue: TIDEBuildModes);
|
procedure TCompOptBuildModesFrame.SetBuildProperties(
|
||||||
|
const AValue: TIDEBuildProperties);
|
||||||
begin
|
begin
|
||||||
if FBuildModes=AValue then exit;
|
if FBuildProperties=AValue then exit;
|
||||||
FBuildModes:=AValue;
|
FBuildProperties:=AValue;
|
||||||
RebuildTreeView;
|
RebuildTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -295,10 +296,10 @@ begin
|
|||||||
BuildModesTreeView.BeginUpdate;
|
BuildModesTreeView.BeginUpdate;
|
||||||
BuildModesTreeView.Items.Clear;
|
BuildModesTreeView.Items.Clear;
|
||||||
FreeEditors;
|
FreeEditors;
|
||||||
if BuildModes<>nil then begin
|
if BuildProperties<>nil then begin
|
||||||
// first level: build modes
|
// first level: build modes
|
||||||
for i:=0 to BuildModes.Count-1 do
|
for i:=0 to BuildProperties.Count-1 do
|
||||||
TreeViewAddBuildMode(BuildModes.Items[i]);
|
TreeViewAddBuildMode(BuildProperties.Items[i]);
|
||||||
end;
|
end;
|
||||||
BuildModesTreeView.EndUpdate;
|
BuildModesTreeView.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user