mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-11 22:29:44 +01:00
h2pas: added tools after, IDE: fixed find in files single line reg expr
git-svn-id: trunk@9947 -
This commit is contained in:
parent
776e097c46
commit
edf2642c1d
@ -28,7 +28,7 @@ uses
|
|||||||
// CodeTools
|
// CodeTools
|
||||||
BasicCodeTools,
|
BasicCodeTools,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
TextTools, IDEExternToolIntf, IDEDialogs, LazIDEIntf,
|
TextTools, IDEExternToolIntf, IDEDialogs, LazIDEIntf, SrcEditorIntf,
|
||||||
IDEMsgIntf, IDETextConverter;
|
IDEMsgIntf, IDETextConverter;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -49,6 +49,38 @@ type
|
|||||||
function Execute(aText: TIDETextConverter): TModalResult; override;
|
function Execute(aText: TIDETextConverter): TModalResult; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TReplaceEdgedBracketPairWithStar }
|
||||||
|
|
||||||
|
TReplaceEdgedBracketPairWithStar = class(TCustomTextReplaceTool)
|
||||||
|
public
|
||||||
|
class function ClassDescription: string; override;
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TReplace0PointerWithNULL }
|
||||||
|
|
||||||
|
TReplaceMacro0PointerWithNULL = class(TCustomTextConverterTool)
|
||||||
|
public
|
||||||
|
class function ClassDescription: string; override;
|
||||||
|
function Execute(aText: TIDETextConverter): TModalResult; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TReplaceUnitFilenameWithUnitName }
|
||||||
|
|
||||||
|
TReplaceUnitFilenameWithUnitName = class(TCustomTextReplaceTool)
|
||||||
|
public
|
||||||
|
class function ClassDescription: string; override;
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TRemoveSystemTypes }
|
||||||
|
|
||||||
|
TRemoveSystemTypes = class(TCustomTextConverterTool)
|
||||||
|
public
|
||||||
|
class function ClassDescription: string; override;
|
||||||
|
function Execute(aText: TIDETextConverter): TModalResult; override;
|
||||||
|
end;
|
||||||
|
|
||||||
TH2PasProject = class;
|
TH2PasProject = class;
|
||||||
TH2PasConverter = class;
|
TH2PasConverter = class;
|
||||||
|
|
||||||
@ -102,6 +134,7 @@ type
|
|||||||
FPackAllRecords: boolean;
|
FPackAllRecords: boolean;
|
||||||
FPalmOSSYSTrap: boolean;
|
FPalmOSSYSTrap: boolean;
|
||||||
FPforPointers: boolean;
|
FPforPointers: boolean;
|
||||||
|
FPostH2PasTools: TComponent;
|
||||||
FPreH2PasTools: TComponent;
|
FPreH2PasTools: TComponent;
|
||||||
FStripComments: boolean;
|
FStripComments: boolean;
|
||||||
FStripCommentsAndInfo: boolean;
|
FStripCommentsAndInfo: boolean;
|
||||||
@ -156,6 +189,7 @@ type
|
|||||||
function NormalizeFilename(const AFilename: string): string;
|
function NormalizeFilename(const AFilename: string): string;
|
||||||
function HasEnabledFiles: boolean;
|
function HasEnabledFiles: boolean;
|
||||||
procedure AddDefaultPreH2PasTools;
|
procedure AddDefaultPreH2PasTools;
|
||||||
|
procedure AddDefaultPostH2PasTools;
|
||||||
public
|
public
|
||||||
property CHeaderFileCount: integer read GetCHeaderFileCount;
|
property CHeaderFileCount: integer read GetCHeaderFileCount;
|
||||||
property CHeaderFiles[Index: integer]: TH2PasFile read GetCHeaderFiles;
|
property CHeaderFiles[Index: integer]: TH2PasFile read GetCHeaderFiles;
|
||||||
@ -165,6 +199,7 @@ type
|
|||||||
property IsVirtual: boolean read FIsVirtual;
|
property IsVirtual: boolean read FIsVirtual;
|
||||||
property Converter: TH2PasConverter read FConverter;
|
property Converter: TH2PasConverter read FConverter;
|
||||||
property PreH2PasTools: TComponent read FPreH2PasTools;
|
property PreH2PasTools: TComponent read FPreH2PasTools;
|
||||||
|
property PostH2PasTools: TComponent read FPostH2PasTools;
|
||||||
|
|
||||||
// h2pas options
|
// h2pas options
|
||||||
property ConstantsInsteadOfEnums: boolean read FConstantsInsteadOfEnums write SetConstantsInsteadOfEnums;
|
property ConstantsInsteadOfEnums: boolean read FConstantsInsteadOfEnums write SetConstantsInsteadOfEnums;
|
||||||
@ -620,18 +655,39 @@ begin
|
|||||||
CHeaderFiles[CHeaderFileCount-1].Free;
|
CHeaderFiles[CHeaderFileCount-1].Free;
|
||||||
FPreH2PasTools.Free;
|
FPreH2PasTools.Free;
|
||||||
FPreH2PasTools:=TComponent.Create(nil);
|
FPreH2PasTools:=TComponent.Create(nil);
|
||||||
if AddDefaults then
|
FPostH2PasTools.Free;
|
||||||
|
FPostH2PasTools:=TComponent.Create(nil);
|
||||||
|
if AddDefaults then begin
|
||||||
AddDefaultPreH2PasTools;
|
AddDefaultPreH2PasTools;
|
||||||
|
AddDefaultPostH2PasTools;
|
||||||
|
end;
|
||||||
FModified:=false;
|
FModified:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TH2PasProject.Assign(Source: TPersistent);
|
procedure TH2PasProject.Assign(Source: TPersistent);
|
||||||
|
|
||||||
|
procedure CopyTools(SrcList: TComponent; var DestList: TComponent);
|
||||||
|
var
|
||||||
|
SrcComponent: TComponent;
|
||||||
|
NewComponent: TObject;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
DestList.Free;
|
||||||
|
DestList:=TComponent.Create(nil);
|
||||||
|
for i:=0 to SrcList.ComponentCount-1 do begin
|
||||||
|
SrcComponent:=SrcList.Components[i];
|
||||||
|
if SrcComponent is TCustomTextConverterTool then begin
|
||||||
|
NewComponent:=
|
||||||
|
TComponentClass(SrcComponent.ClassType).Create(DestList);
|
||||||
|
TCustomTextConverterTool(NewComponent).Assign(SrcComponent);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
Src: TH2PasProject;
|
Src: TH2PasProject;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
NewCHeaderFile: TH2PasFile;
|
NewCHeaderFile: TH2PasFile;
|
||||||
SrcComponent: TComponent;
|
|
||||||
NewComponent: TObject;
|
|
||||||
begin
|
begin
|
||||||
if Source is TH2PasProject then begin
|
if Source is TH2PasProject then begin
|
||||||
Src:=TH2PasProject(Source);
|
Src:=TH2PasProject(Source);
|
||||||
@ -661,16 +717,8 @@ begin
|
|||||||
NewCHeaderFile.Project:=Self;
|
NewCHeaderFile.Project:=Self;
|
||||||
NewCHeaderFile.Assign(Src.CHeaderFiles[i]);
|
NewCHeaderFile.Assign(Src.CHeaderFiles[i]);
|
||||||
end;
|
end;
|
||||||
FPreH2PasTools.Free;
|
CopyTools(Src.FPreH2PasTools,FPreH2PasTools);
|
||||||
FPreH2PasTools:=TComponent.Create(nil);
|
CopyTools(Src.FPostH2PasTools,FPostH2PasTools);
|
||||||
for i:=0 to Src.FPreH2PasTools.ComponentCount-1 do begin
|
|
||||||
SrcComponent:=Src.FPreH2PasTools.Components[i];
|
|
||||||
if SrcComponent is TCustomTextConverterTool then begin
|
|
||||||
NewComponent:=
|
|
||||||
TComponentClass(SrcComponent.ClassType).Create(FPreH2PasTools);
|
|
||||||
TCustomTextConverterTool(NewComponent).Assign(SrcComponent);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
@ -705,16 +753,41 @@ begin
|
|||||||
for i:=0 to CHeaderFileCount-1 do
|
for i:=0 to CHeaderFileCount-1 do
|
||||||
if not CHeaderFiles[i].IsEqual(AProject.CHeaderFiles[i]) then
|
if not CHeaderFiles[i].IsEqual(AProject.CHeaderFiles[i]) then
|
||||||
exit(false);
|
exit(false);
|
||||||
if not CompareComponents(FPreH2PasTools,AProject.FPreH2PasTools) then
|
if (not CompareComponents(FPreH2PasTools,AProject.FPreH2PasTools))
|
||||||
|
or (not CompareComponents(FPostH2PasTools,AProject.FPostH2PasTools)) then
|
||||||
exit(false);
|
exit(false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TH2PasProject.Load(Config: TConfigStorage);
|
procedure TH2PasProject.Load(Config: TConfigStorage);
|
||||||
|
procedure LoadTools(const SubPath: string; List: TComponent);
|
||||||
|
var
|
||||||
|
NewComponent: TComponent;
|
||||||
|
NewCount: LongInt;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
// load PreH2PasTools
|
||||||
|
Config.AppendBasePath(SubPath);
|
||||||
|
try
|
||||||
|
NewCount:=Config.GetValue('Count',0);
|
||||||
|
for i:=0 to NewCount-1 do begin
|
||||||
|
Config.AppendBasePath('Tool'+IntToStr(i+1));
|
||||||
|
try
|
||||||
|
NewComponent:=nil;
|
||||||
|
LoadComponentFromConfig(Config,'Value',NewComponent,
|
||||||
|
@TextConverterToolClasses.FindClass,List);
|
||||||
|
finally
|
||||||
|
Config.UndoAppendBasePath;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Config.UndoAppendBasePath;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
NewCount: LongInt;
|
NewCount: LongInt;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
NewCHeaderFile: TH2PasFile;
|
NewCHeaderFile: TH2PasFile;
|
||||||
NewComponent: TComponent;
|
|
||||||
begin
|
begin
|
||||||
Clear(false);
|
Clear(false);
|
||||||
|
|
||||||
@ -756,28 +829,34 @@ begin
|
|||||||
Config.UndoAppendBasePath;
|
Config.UndoAppendBasePath;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// load PreH2PasTools
|
LoadTools('PreH2PasTools',FPreH2PasTools);
|
||||||
Config.AppendBasePath('PreH2PasTools');
|
LoadTools('PostH2PasTools',FPostH2PasTools);
|
||||||
try
|
|
||||||
NewCount:=Config.GetValue('Count',0);
|
|
||||||
for i:=0 to NewCount-1 do begin
|
|
||||||
Config.AppendBasePath('Tool'+IntToStr(i+1));
|
|
||||||
try
|
|
||||||
NewComponent:=nil;
|
|
||||||
LoadComponentFromConfig(Config,'Value',NewComponent,
|
|
||||||
@TextConverterToolClasses.FindClass,FPreH2PasTools);
|
|
||||||
finally
|
|
||||||
Config.UndoAppendBasePath;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
Config.UndoAppendBasePath;
|
|
||||||
end;
|
|
||||||
|
|
||||||
FModified:=false;
|
FModified:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TH2PasProject.Save(Config: TConfigStorage);
|
procedure TH2PasProject.Save(Config: TConfigStorage);
|
||||||
|
|
||||||
|
procedure SaveTools(const SubPath: string; List: TComponent);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
Config.AppendBasePath(SubPath);
|
||||||
|
try
|
||||||
|
Config.SetDeleteValue('Count',List.ComponentCount,0);
|
||||||
|
for i:=0 to List.ComponentCount-1 do begin
|
||||||
|
Config.AppendBasePath('Tool'+IntToStr(i+1));
|
||||||
|
try
|
||||||
|
SaveComponentToConfig(Config,'Value',List.Components[i]);
|
||||||
|
finally
|
||||||
|
Config.UndoAppendBasePath;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Config.UndoAppendBasePath;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
@ -817,21 +896,8 @@ begin
|
|||||||
Config.UndoAppendBasePath;
|
Config.UndoAppendBasePath;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Config.AppendBasePath('PreH2PasTools');
|
SaveTools('PreH2PasTools',FPreH2PasTools);
|
||||||
try
|
SaveTools('PostH2PasTools',FPostH2PasTools);
|
||||||
Config.SetDeleteValue('Count',FPreH2PasTools.ComponentCount,0);
|
|
||||||
for i:=0 to FPreH2PasTools.ComponentCount-1 do begin
|
|
||||||
Config.AppendBasePath('Tool'+IntToStr(i+1));
|
|
||||||
try
|
|
||||||
SaveComponentToConfig(Config,'Value',FPreH2PasTools.Components[i]);
|
|
||||||
finally
|
|
||||||
Config.UndoAppendBasePath;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
Config.UndoAppendBasePath;
|
|
||||||
end;
|
|
||||||
|
|
||||||
FModified:=false;
|
FModified:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -950,6 +1016,14 @@ procedure TH2PasProject.AddDefaultPreH2PasTools;
|
|||||||
begin
|
begin
|
||||||
TRemoveCPlusPlusExternCTool.Create(FPreH2PasTools);
|
TRemoveCPlusPlusExternCTool.Create(FPreH2PasTools);
|
||||||
TRemoveEmptyCMacrosTool.Create(FPreH2PasTools);
|
TRemoveEmptyCMacrosTool.Create(FPreH2PasTools);
|
||||||
|
TReplaceEdgedBracketPairWithStar.Create(FPreH2PasTools);
|
||||||
|
TReplaceMacro0PointerWithNULL.Create(FPreH2PasTools);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TH2PasProject.AddDefaultPostH2PasTools;
|
||||||
|
begin
|
||||||
|
TReplaceUnitFilenameWithUnitName.Create(FPostH2PasTools);
|
||||||
|
TRemoveSystemTypes.Create(FPostH2PasTools);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TH2PasConverter }
|
{ TH2PasConverter }
|
||||||
@ -1221,10 +1295,10 @@ begin
|
|||||||
|
|
||||||
TextConverter.Filename:=TempCHeaderFilename;
|
TextConverter.Filename:=TempCHeaderFilename;
|
||||||
FLastUsedFilename:=TextConverter.Filename;
|
FLastUsedFilename:=TextConverter.Filename;
|
||||||
TextConverter.LoadFromFile(InputFilename);
|
|
||||||
DebugLn(['TH2PasConverter.ConvertFile TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
DebugLn(['TH2PasConverter.ConvertFile TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
||||||
|
|
||||||
// run converters for .h file to make it compatible for h2pas
|
// run converters for .h file to make it compatible for h2pas
|
||||||
|
TextConverter.LoadFromFile(InputFilename);
|
||||||
Result:=TextConverter.Execute(Project.PreH2PasTools);
|
Result:=TextConverter.Execute(Project.PreH2PasTools);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
DebugLn(['TH2PasConverter.ConvertFile Failed running Project.PreH2PasTools on ',TempCHeaderFilename]);
|
DebugLn(['TH2PasConverter.ConvertFile Failed running Project.PreH2PasTools on ',TempCHeaderFilename]);
|
||||||
@ -1236,9 +1310,9 @@ begin
|
|||||||
try
|
try
|
||||||
Tool.Title:='h2pas';
|
Tool.Title:='h2pas';
|
||||||
Tool.H2PasFile:=AFile;
|
Tool.H2PasFile:=AFile;
|
||||||
DebugLn(['TH2PasConverter.ConvertFile AAA TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
//DebugLn(['TH2PasConverter.ConvertFile AAA TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
||||||
Tool.TargetFilename:=TextConverter.Filename;
|
Tool.TargetFilename:=TextConverter.Filename;
|
||||||
DebugLn(['TH2PasConverter.ConvertFile BBB TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
//DebugLn(['TH2PasConverter.ConvertFile BBB TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
|
||||||
Tool.Filename:=GetH2PasFilename;
|
Tool.Filename:=GetH2PasFilename;
|
||||||
Tool.CmdLineParams:=AFile.GetH2PasParameters(Tool.TargetFilename);
|
Tool.CmdLineParams:=AFile.GetH2PasParameters(Tool.TargetFilename);
|
||||||
Tool.ScanOutput:=true;
|
Tool.ScanOutput:=true;
|
||||||
@ -1253,12 +1327,22 @@ begin
|
|||||||
Tool.Free;
|
Tool.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TODO: beautify unit
|
// run beautification tools for new pascal code
|
||||||
|
TextConverter.InitWithFilename(OutputFilename);
|
||||||
|
DebugLn(['TH2PasConverter.ConvertFile OutputFilename: ',copy(TextConverter.Source,1,300)]);
|
||||||
|
Result:=TextConverter.Execute(Project.PostH2PasTools);
|
||||||
|
if Result<>mrOk then begin
|
||||||
|
DebugLn(['TH2PasConverter.ConvertFile Failed running Project.PostH2PasTools on ',TempCHeaderFilename]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
TextConverter.Filename:=OutputFilename;// save
|
||||||
finally
|
finally
|
||||||
TextConverter.Free;
|
TextConverter.Free;
|
||||||
if (LazarusIDE<>nil) then
|
if (LazarusIDE<>nil) then begin
|
||||||
|
// reload changed files, so that IDE does not report changed files
|
||||||
LazarusIDE.DoRevertEditorFile(TempCHeaderFilename);
|
LazarusIDE.DoRevertEditorFile(TempCHeaderFilename);
|
||||||
|
LazarusIDE.DoRevertEditorFile(OutputFilename);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
@ -1354,7 +1438,7 @@ var
|
|||||||
TempStr: String;
|
TempStr: String;
|
||||||
Identifier: PChar;
|
Identifier: PChar;
|
||||||
begin
|
begin
|
||||||
DebugLn(['AddEmptyMacro MacroName="',MacroName,'"']);
|
//DebugLn(['AddEmptyMacro MacroName="',MacroName,'"']);
|
||||||
if EmptyMacros=nil then
|
if EmptyMacros=nil then
|
||||||
EmptyMacros:=TAvgLvlTree.Create(TListSortCompare(@CompareIdentifiers));
|
EmptyMacros:=TAvgLvlTree.Create(TListSortCompare(@CompareIdentifiers));
|
||||||
Identifier:=@MacroName[1];
|
Identifier:=@MacroName[1];
|
||||||
@ -1371,7 +1455,7 @@ var
|
|||||||
Identifier: PChar;
|
Identifier: PChar;
|
||||||
Node: TAvgLvlTreeNode;
|
Node: TAvgLvlTreeNode;
|
||||||
begin
|
begin
|
||||||
DebugLn(['DeleteEmptyMacro MacroName="',MacroName,'"']);
|
//DebugLn(['DeleteEmptyMacro MacroName="',MacroName,'"']);
|
||||||
if EmptyMacros=nil then exit;
|
if EmptyMacros=nil then exit;
|
||||||
Identifier:=@MacroName[1];
|
Identifier:=@MacroName[1];
|
||||||
Node:=EmptyMacros.Find(Identifier);
|
Node:=EmptyMacros.Find(Identifier);
|
||||||
@ -1456,6 +1540,105 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TReplaceMacro0PointerWithNULL }
|
||||||
|
|
||||||
|
function TReplaceMacro0PointerWithNULL.ClassDescription: string;
|
||||||
|
begin
|
||||||
|
Result:='Replace macro values 0 pointer like (char *)0 with NULL';
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TReplaceMacro0PointerWithNULL.Execute(aText: TIDETextConverter
|
||||||
|
): TModalResult;
|
||||||
|
var
|
||||||
|
Lines: TStrings;
|
||||||
|
i: Integer;
|
||||||
|
Line: string;
|
||||||
|
MacroStart, MacroLen: integer;
|
||||||
|
begin
|
||||||
|
Result:=mrCancel;
|
||||||
|
if aText=nil then exit;
|
||||||
|
Lines:=aText.Strings;
|
||||||
|
i:=0;
|
||||||
|
while i<=Lines.Count-1 do begin
|
||||||
|
Line:=Lines[i];
|
||||||
|
if REMatches(Line,'^#define\s+([a-zA-Z0-9_]+)\s+(\(.*\*\)0)\s*($|//|/\*)')
|
||||||
|
then begin
|
||||||
|
REVarPos(2,MacroStart,MacroLen);
|
||||||
|
Line:=copy(Line,1,MacroStart-1)+'NULL'
|
||||||
|
+copy(Line,MacroStart+MacroLen,length(Line));
|
||||||
|
Lines[i]:=Line;
|
||||||
|
end;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
Result:=mrOk;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TReplaceEdgedBracketPairWithStar }
|
||||||
|
|
||||||
|
function TReplaceEdgedBracketPairWithStar.ClassDescription: string;
|
||||||
|
begin
|
||||||
|
Result:='Replace [] with *';
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TReplaceEdgedBracketPairWithStar.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
SearchFor:='[]';
|
||||||
|
ReplaceWith:='*';
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TReplaceUnitFilenameWithUnitName }
|
||||||
|
|
||||||
|
function TReplaceUnitFilenameWithUnitName.ClassDescription: string;
|
||||||
|
begin
|
||||||
|
Result:='Replace "unit filename;" with "unit name;"';
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TReplaceUnitFilenameWithUnitName.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
SearchFor:='^(unit\s).*(/|\\)([a-z_0-9]+;)';
|
||||||
|
ReplaceWith:='$1$3';
|
||||||
|
Options:=Options+[trtRegExpr];
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TRemoveSystemTypes }
|
||||||
|
|
||||||
|
function TRemoveSystemTypes.ClassDescription: string;
|
||||||
|
begin
|
||||||
|
Result:='Remove type redefinitons like PLongint';
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRemoveSystemTypes.Execute(aText: TIDETextConverter): TModalResult;
|
||||||
|
var
|
||||||
|
Source: String;
|
||||||
|
Flags: TSrcEditSearchOptions;
|
||||||
|
Prompt: Boolean;
|
||||||
|
SearchFor: string;
|
||||||
|
begin
|
||||||
|
Result:=mrCancel;
|
||||||
|
if aText=nil then exit;
|
||||||
|
Source:=aText.Source;
|
||||||
|
Flags:=[sesoReplace,sesoReplaceAll,sesoRegExpr];
|
||||||
|
Prompt:=false;
|
||||||
|
SearchFor:='^\s*('
|
||||||
|
+'PLongint\s*=\s*\^Longint'
|
||||||
|
+'|PSmallInt\s*=\s*\^SmallInt'
|
||||||
|
+'|PByte\s*=\s*\^Byte'
|
||||||
|
+'|PWord\s*=\s*\^Word'
|
||||||
|
+'|PDWord\s*=\s*\^DWord'
|
||||||
|
+'|PDouble\s*=\s*\^Double'
|
||||||
|
+'|PChar\s*=\s*\^Char'
|
||||||
|
+');\s*$';
|
||||||
|
Result:=IDESearchInText('',Source,SearchFor,'',Flags,Prompt,nil);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
SearchFor:='\btype\s+type\b';
|
||||||
|
Flags:=Flags+[sesoMultiLine];
|
||||||
|
Result:=IDESearchInText('',Source,SearchFor,'type',Flags,Prompt,nil);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
aText.Source:=Source;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ object H2PasDialog: TH2PasDialog
|
|||||||
HorzScrollBar.Page = 784
|
HorzScrollBar.Page = 784
|
||||||
VertScrollBar.Page = 500
|
VertScrollBar.Page = 500
|
||||||
Caption = 'H2PasDialog'
|
Caption = 'H2PasDialog'
|
||||||
|
ClientHeight = 501
|
||||||
|
ClientWidth = 785
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnCloseQuery = FormCloseQuery
|
OnCloseQuery = FormCloseQuery
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
@ -16,13 +18,15 @@ object H2PasDialog: TH2PasDialog
|
|||||||
AnchorSideBottom.Control = OpenSettingsButton
|
AnchorSideBottom.Control = OpenSettingsButton
|
||||||
Height = 465
|
Height = 465
|
||||||
Width = 785
|
Width = 785
|
||||||
ActivePage = SettingsTabSheet
|
ActivePage = PostH2PasTabSheet
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabIndex = 3
|
TabIndex = 3
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object FilesTabSheet: TTabSheet
|
object FilesTabSheet: TTabSheet
|
||||||
Caption = 'FilesTabSheet'
|
Caption = 'FilesTabSheet'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
object CHeaderFilesCheckListBox: TCheckListBox
|
object CHeaderFilesCheckListBox: TCheckListBox
|
||||||
Height = 435
|
Height = 435
|
||||||
Width = 255
|
Width = 255
|
||||||
@ -103,6 +107,8 @@ object H2PasDialog: TH2PasDialog
|
|||||||
Width = 521
|
Width = 521
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
Caption = 'FileInfoGroupBox'
|
Caption = 'FileInfoGroupBox'
|
||||||
|
ClientHeight = 230
|
||||||
|
ClientWidth = 517
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object FileInfoLabel: TLabel
|
object FileInfoLabel: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
@ -117,16 +123,22 @@ object H2PasDialog: TH2PasDialog
|
|||||||
end
|
end
|
||||||
object PreH2PasTabSheet: TTabSheet
|
object PreH2PasTabSheet: TTabSheet
|
||||||
Caption = 'PreH2PasTabSheet'
|
Caption = 'PreH2PasTabSheet'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
object PreH2PasGroupBox: TGroupBox
|
object PreH2PasGroupBox: TGroupBox
|
||||||
Height = 435
|
Height = 435
|
||||||
Width = 781
|
Width = 781
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'PreH2PasGroupBox'
|
Caption = 'PreH2PasGroupBox'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object h2pasOptionsTabSheet: TTabSheet
|
object h2pasOptionsTabSheet: TTabSheet
|
||||||
Caption = 'h2pasOptionsTabSheet'
|
Caption = 'h2pasOptionsTabSheet'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
object LibNameLabel: TLabel
|
object LibNameLabel: TLabel
|
||||||
AnchorSideTop.Control = LibnameEdit
|
AnchorSideTop.Control = LibnameEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
@ -240,8 +252,24 @@ object H2PasDialog: TH2PasDialog
|
|||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object PostH2PasTabSheet: TTabSheet
|
||||||
|
Caption = 'PostH2PasTabSheet'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
|
object PostH2PasGroupBox: TGroupBox
|
||||||
|
Height = 435
|
||||||
|
Width = 781
|
||||||
|
Align = alClient
|
||||||
|
Caption = 'PostH2PasGroupBox'
|
||||||
|
ClientHeight = 418
|
||||||
|
ClientWidth = 777
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
object SettingsTabSheet: TTabSheet
|
object SettingsTabSheet: TTabSheet
|
||||||
Caption = 'SettingsTabSheet'
|
Caption = 'SettingsTabSheet'
|
||||||
|
ClientHeight = 435
|
||||||
|
ClientWidth = 781
|
||||||
object H2PasFilenameLabel: TLabel
|
object H2PasFilenameLabel: TLabel
|
||||||
AnchorSideTop.Control = H2PasFilenameEdit
|
AnchorSideTop.Control = H2PasFilenameEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
|
|||||||
@ -3,136 +3,144 @@
|
|||||||
LazarusResources.Add('TH2PasDialog','FORMDATA',[
|
LazarusResources.Add('TH2PasDialog','FORMDATA',[
|
||||||
'TPF0'#12'TH2PasDialog'#11'H2PasDialog'#4'Left'#3#245#0#6'Height'#3#245#1#3'T'
|
'TPF0'#12'TH2PasDialog'#11'H2PasDialog'#4'Left'#3#245#0#6'Height'#3#245#1#3'T'
|
||||||
+'op'#3#205#0#5'Width'#3#17#3#18'HorzScrollBar.Page'#3#16#3#18'VertScrollBar.'
|
+'op'#3#205#0#5'Width'#3#17#3#18'HorzScrollBar.Page'#3#16#3#18'VertScrollBar.'
|
||||||
+'Page'#3#244#1#7'Caption'#6#11'H2PasDialog'#10'KeyPreview'#9#12'OnCloseQuery'
|
+'Page'#3#244#1#7'Caption'#6#11'H2PasDialog'#12'ClientHeight'#3#245#1#11'Clie'
|
||||||
+#7#14'FormCloseQuery'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDes'
|
+'ntWidth'#3#17#3#10'KeyPreview'#9#12'OnCloseQuery'#7#14'FormCloseQuery'#8'On'
|
||||||
+'troy'#9'OnKeyDown'#7#11'FormKeyDown'#8'Position'#7#15'poDesktopCenter'#0#12
|
+'Create'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#11'F'
|
||||||
+'TPageControl'#15'MainPageControl'#24'AnchorSideBottom.Control'#7#18'OpenSet'
|
+'ormKeyDown'#8'Position'#7#15'poDesktopCenter'#0#12'TPageControl'#15'MainPag'
|
||||||
+'tingsButton'#6'Height'#3#209#1#5'Width'#3#17#3#10'ActivePage'#7#16'Settings'
|
+'eControl'#24'AnchorSideBottom.Control'#7#18'OpenSettingsButton'#6'Height'#3
|
||||||
+'TabSheet'#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
|
+#209#1#5'Width'#3#17#3#10'ActivePage'#7#17'PostH2PasTabSheet'#5'Align'#7#5'a'
|
||||||
+'akBottom'#0#8'TabIndex'#2#3#8'TabOrder'#2#4#0#9'TTabSheet'#13'FilesTabSheet'
|
+'lTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'
|
||||||
+#7'Caption'#6#13'FilesTabSheet'#0#13'TCheckListBox'#24'CHeaderFilesCheckList'
|
+#2#3#8'TabOrder'#2#4#0#9'TTabSheet'#13'FilesTabSheet'#7'Caption'#6#13'FilesT'
|
||||||
+'Box'#6'Height'#3#179#1#5'Width'#3#255#0#5'Align'#7#6'alLeft'#7'OnClick'#7#29
|
+'abSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#13'TCheckListBox'
|
||||||
+'CHeaderFilesCheckListBoxClick'#11'OnItemClick'#7'!CHeaderFilesCheckListBoxI'
|
+#24'CHeaderFilesCheckListBox'#6'Height'#3#179#1#5'Width'#3#255#0#5'Align'#7#6
|
||||||
+'temClick'#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'TButton'#21'AddCHeaderFil'
|
+'alLeft'#7'OnClick'#7#29'CHeaderFilesCheckListBoxClick'#11'OnItemClick'#7'!C'
|
||||||
+'esButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorS'
|
+'HeaderFilesCheckListBoxItemClick'#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'T'
|
||||||
+'ideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2#12#5'Wi'
|
+'Button'#21'AddCHeaderFilesButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFi'
|
||||||
+'dth'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7
|
+'lesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Heigh'
|
||||||
+'Caption'#6#21'AddCHeaderFilesButton'#7'OnClick'#7#26'AddCHeaderFilesButtonC'
|
+'t'#2#25#3'Top'#2#12#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSp'
|
||||||
+'lick'#8'TabOrder'#2#1#0#0#7'TButton'#24'DeleteCHeaderFilesButton'#22'Anchor'
|
+'acing.InnerBorder'#2#4#7'Caption'#6#21'AddCHeaderFilesButton'#7'OnClick'#7
|
||||||
+'SideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'a'
|
+#26'AddCHeaderFilesButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#24'DeleteCHea'
|
||||||
+'srBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'3'#5'Width'#3#185#0#18'Bor'
|
+'derFilesButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'A'
|
||||||
+'derSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#24'Dele'
|
+'nchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'3'
|
||||||
+'teCHeaderFilesButton'#7'OnClick'#7#29'DeleteCHeaderFilesButtonClick'#8'TabO'
|
+#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2
|
||||||
+'rder'#2#2#0#0#7'TButton'#27'SelectAllCHeaderFilesButton'#22'AnchorSideLeft.'
|
+#4#7'Caption'#6#24'DeleteCHeaderFilesButton'#7'OnClick'#7#29'DeleteCHeaderFi'
|
||||||
+'Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'
|
+'lesButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#27'SelectAllCHeaderFilesButt'
|
||||||
+#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'a'#5'Width'#3#185#0#18'BorderSpacing'
|
+'on'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLef'
|
||||||
+'.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#27'SelectAllCHead'
|
+'t.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'a'#5'Width'#3
|
||||||
+'erFilesButton'#7'OnClick'#7' SelectAllCHeaderFilesButtonClick'#8'TabOrder'#2
|
+#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
|
||||||
+#3#0#0#7'TButton'#29'UnselectAllCHeaderFilesButton'#22'AnchorSideLeft.Contro'
|
+'n'#6#27'SelectAllCHeaderFilesButton'#7'OnClick'#7' SelectAllCHeaderFilesBut'
|
||||||
+'l'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Lef'
|
+'tonClick'#8'TabOrder'#2#3#0#0#7'TButton'#29'UnselectAllCHeaderFilesButton'
|
||||||
+'t'#3#10#1#6'Height'#2#25#3'Top'#3#137#0#5'Width'#3#185#0#18'BorderSpacing.L'
|
+#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Si'
|
||||||
+'eft'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#29'UnselectAllCHead'
|
+'de'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#3#137#0#5'Width'#3
|
||||||
+'erFilesButton'#7'OnClick'#7'"UnselectAllCHeaderFilesButtonClick'#8'TabOrder'
|
+#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
|
||||||
+#2#4#0#0#9'TSplitter'#21'CHeaderFilesSplitter1'#4'Left'#3#255#0#6'Height'#3
|
+'n'#6#29'UnselectAllCHeaderFilesButton'#7'OnClick'#7'"UnselectAllCHeaderFile'
|
||||||
+#179#1#5'Width'#2#5#7'Beveled'#9#0#0#9'TGroupBox'#16'FileInfoGroupBox'#22'An'
|
+'sButtonClick'#8'TabOrder'#2#4#0#0#9'TSplitter'#21'CHeaderFilesSplitter1'#4
|
||||||
+'chorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7
|
+'Left'#3#255#0#6'Height'#3#179#1#5'Width'#2#5#7'Beveled'#9#0#0#9'TGroupBox'
|
||||||
+#9'asrBottom'#23'AnchorSideRight.Control'#7#13'FilesTabSheet'#20'AnchorSideR'
|
+#16'FileInfoGroupBox'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'
|
||||||
+'ight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#13'FilesTabSheet'
|
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#13'Fil'
|
||||||
+#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#4#1#6'Height'#3#247#0#3
|
+'esTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Con'
|
||||||
+'Top'#3#188#0#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'a'
|
+'trol'#7#13'FilesTabSheet'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3
|
||||||
+'kBottom'#0#7'Caption'#6#16'FileInfoGroupBox'#8'TabOrder'#2#5#0#6'TLabel'#13
|
+#4#1#6'Height'#3#247#0#3'Top'#3#188#0#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6
|
||||||
+'FileInfoLabel'#4'Left'#2#8#6'Height'#2#13#3'Top'#2#1#5'Width'#2'I'#7'Captio'
|
+'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6#16'FileInfoGroupBox'#12'Clien'
|
||||||
+'n'#6#13'FileInfoLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#0#0#9'TTa'
|
+'tHeight'#3#230#0#11'ClientWidth'#3#5#2#8'TabOrder'#2#5#0#6'TLabel'#13'FileI'
|
||||||
+'bSheet'#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'#0#9'TGroupBo'
|
+'nfoLabel'#4'Left'#2#8#6'Height'#2#13#3'Top'#2#1#5'Width'#2'I'#7'Caption'#6
|
||||||
+'x'#16'PreH2PasGroupBox'#6'Height'#3#179#1#5'Width'#3#13#3#5'Align'#7#8'alCl'
|
+#13'FileInfoLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#0#0#9'TTabShee'
|
||||||
+'ient'#7'Caption'#6#16'PreH2PasGroupBox'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'
|
+'t'#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'#12'ClientHeight'#3
|
||||||
+#20'h2pasOptionsTabSheet'#7'Caption'#6#20'h2pasOptionsTabSheet'#0#6'TLabel'
|
+#179#1#11'ClientWidth'#3#13#3#0#9'TGroupBox'#16'PreH2PasGroupBox'#6'Height'#3
|
||||||
+#12'LibNameLabel'#21'AnchorSideTop.Control'#7#11'LibnameEdit'#18'AnchorSideT'
|
+#179#1#5'Width'#3#13#3#5'Align'#7#8'alClient'#7'Caption'#6#16'PreH2PasGroupB'
|
||||||
+'op.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3'Top'#3#25#1#5'Width'#2
|
+'ox'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#8'TabOrder'#2#0#0#0#0#9
|
||||||
+'Q'#17'BorderSpacing.Top'#2#10#7'Caption'#6#12'LibNameLabel'#5'Color'#7#6'cl'
|
+'TTabSheet'#20'h2pasOptionsTabSheet'#7'Caption'#6#20'h2pasOptionsTabSheet'#12
|
||||||
+'None'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'AnchorSideTop.C'
|
+'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#6'TLabel'#12'LibNameLabel'#21
|
||||||
+'ontrol'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2
|
+'AnchorSideTop.Control'#7#11'LibnameEdit'#18'AnchorSideTop.Side'#7#9'asrCent'
|
||||||
+#6#6'Height'#2#13#3'Top'#3'9'#1#5'Width'#2'V'#7'Caption'#6#14'OutputExtLabel'
|
+'er'#4'Left'#2#6#6'Height'#2#13#3'Top'#3#25#1#5'Width'#2'Q'#17'BorderSpacing'
|
||||||
+#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputDirLabel'#21
|
+'.Top'#2#10#7'Caption'#6#12'LibNameLabel'#5'Color'#7#6'clNone'#11'ParentColo'
|
||||||
+'AnchorSideTop.Control'#7#13'OutputDirEdit'#18'AnchorSideTop.Side'#7#9'asrCe'
|
+'r'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'AnchorSideTop.Control'#7#13'Output'
|
||||||
+'nter'#4'Left'#2#6#6'Height'#2#13#3'Top'#3'V'#1#5'Width'#2'U'#7'Caption'#6#14
|
+'ExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3
|
||||||
+'OutputDirLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#11'Libn'
|
+'Top'#3'9'#1#5'Width'#2'V'#7'Caption'#6#14'OutputExtLabel'#5'Color'#7#6'clNo'
|
||||||
+'ameEdit'#22'AnchorSideLeft.Control'#7#12'LibNameLabel'#19'AnchorSideLeft.Si'
|
+'ne'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputDirLabel'#21'AnchorSideTop.Con'
|
||||||
+'de'#7#9'asrBottom'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2']'#6'Hei'
|
+'trol'#7#13'OutputDirEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6
|
||||||
+'ght'#2#23#3'Top'#3#20#1#5'Width'#2'q'#18'BorderSpacing.Left'#2#6#17'BorderS'
|
+#6'Height'#2#13#3'Top'#3'V'#1#5'Width'#2'U'#7'Caption'#6#14'OutputDirLabel'#5
|
||||||
+'pacing.Top'#2#6#13'OnEditingDone'#7#22'LibnameEditEditingDone'#8'TabOrder'#2
|
+'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#11'LibnameEdit'#22'Anchor'
|
||||||
+#0#4'Text'#6#11'LibnameEdit'#0#0#5'TEdit'#13'OutputExtEdit'#22'AnchorSideLef'
|
+'SideLeft.Control'#7#12'LibNameLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'
|
||||||
+'t.Control'#7#14'OutputExtLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#18'A'
|
+#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2']'#6'Height'#2#23#3'Top'#3
|
||||||
+'nchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'b'#6'Height'#2#23#3'Top'#3'4'#1
|
+#20#1#5'Width'#2'q'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13
|
||||||
+#5'Width'#2'P'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEdi'
|
+'OnEditingDone'#7#22'LibnameEditEditingDone'#8'TabOrder'#2#0#4'Text'#6#11'Li'
|
||||||
,'tingDone'#7#24'OutputExtEditEditingDone'#8'TabOrder'#2#1#4'Text'#6#13'Outpu'
|
,'bnameEdit'#0#0#5'TEdit'#13'OutputExtEdit'#22'AnchorSideLeft.Control'#7#14'O'
|
||||||
+'tExtEdit'#0#0#5'TEdit'#13'OutputDirEdit'#22'AnchorSideLeft.Control'#7#14'Ou'
|
+'utputExtLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#18'AnchorSideTop.Side'
|
||||||
+'tputDirLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contr'
|
+#7#9'asrBottom'#4'Left'#2'b'#6'Height'#2#23#3'Top'#3'4'#1#5'Width'#2'P'#18'B'
|
||||||
+'ol'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'a'#6
|
+'orderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#24'Out'
|
||||||
+'Height'#2#23#3'Top'#3'Q'#1#5'Width'#3#141#1#18'BorderSpacing.Left'#2#6#17'B'
|
+'putExtEditEditingDone'#8'TabOrder'#2#1#4'Text'#6#13'OutputExtEdit'#0#0#5'TE'
|
||||||
+'orderSpacing.Top'#2#6#13'OnEditingDone'#7#24'OutputDirEditEditingDone'#8'Ta'
|
+'dit'#13'OutputDirEdit'#22'AnchorSideLeft.Control'#7#14'OutputDirLabel'#19'A'
|
||||||
+'bOrder'#2#2#4'Text'#6#13'OutputDirEdit'#0#0#7'TButton'#21'OutputDirBrowseBu'
|
+'nchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputExt'
|
||||||
+'tton'#22'AnchorSideLeft.Control'#7#13'OutputDirEdit'#19'AnchorSideLeft.Side'
|
+'Edit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'a'#6'Height'#2#23#3'T'
|
||||||
+#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputDirEdit'#24'AnchorSideB'
|
+'op'#3'Q'#1#5'Width'#3#141#1#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
|
||||||
+'ottom.Control'#7#13'OutputDirEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'
|
+#2#6#13'OnEditingDone'#7#24'OutputDirEditEditingDone'#8'TabOrder'#2#2#4'Text'
|
||||||
+#4'Left'#3#238#1#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#2' '#7'Anchors'#11#5
|
+#6#13'OutputDirEdit'#0#0#7'TButton'#21'OutputDirBrowseButton'#22'AnchorSideL'
|
||||||
+'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
|
+'eft.Control'#7#13'OutputDirEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21
|
||||||
+#6#3'...'#7'OnClick'#7#26'OutputDirBrowseButtonClick'#8'TabOrder'#2#3#0#0#11
|
+'AnchorSideTop.Control'#7#13'OutputDirEdit'#24'AnchorSideBottom.Control'#7#13
|
||||||
+'TCheckGroup'#22'h2pasOptionsCheckGroup'#4'Left'#2#6#6'Height'#3#8#1#3'Top'#2
|
+'OutputDirEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#238#1#6'H'
|
||||||
+#4#5'Width'#3#0#3#8'AutoFill'#9#7'Caption'#6#22'h2pasOptionsCheckGroup'#28'C'
|
+'eight'#2#23#3'Top'#3'Q'#1#5'Width'#2' '#7'Anchors'#11#5'akTop'#6'akLeft'#8
|
||||||
+'hildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Ch'
|
+'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'
|
||||||
+'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.'
|
+#7#26'OutputDirBrowseButtonClick'#8'TabOrder'#2#3#0#0#11'TCheckGroup'#22'h2p'
|
||||||
+'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo'
|
+'asOptionsCheckGroup'#4'Left'#2#6#6'Height'#3#8#1#3'Top'#2#4#5'Width'#3#0#3#8
|
||||||
+'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil'
|
+'AutoFill'#9#7'Caption'#6#22'h2pasOptionsCheckGroup'#28'ChildSizing.LeftRigh'
|
||||||
+'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi'
|
+'tSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHo'
|
||||||
+'ng.ControlsPerLine'#2#2#7'Columns'#2#2#11'OnItemClick'#7#31'h2pasOptionsChe'
|
+'rizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7
|
||||||
+'ckGroupItemClick'#8'TabOrder'#2#4#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7
|
+#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScale'
|
||||||
+'Caption'#6#16'SettingsTabSheet'#0#6'TLabel'#18'H2PasFilenameLabel'#21'Ancho'
|
+'Childs'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.'
|
||||||
+'rSideTop.Control'#7#17'H2PasFilenameEdit'#18'AnchorSideTop.Side'#7#9'asrCen'
|
+'Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'
|
||||||
+'ter'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#9#5'Width'#2'x'#7'Caption'#6#18'H2'
|
+#2#2#7'Columns'#2#2#11'OnItemClick'#7#31'h2pasOptionsCheckGroupItemClick'#8
|
||||||
+'PasFilenameLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#9'TCheckBox'#30
|
+'TabOrder'#2#4#0#0#0#9'TTabSheet'#17'PostH2PasTabSheet'#7'Caption'#6#17'Post'
|
||||||
+'OpenLastProjectOnStartCheckBox'#4'Left'#2#6#6'Height'#2#20#3'Top'#2'*'#5'Wi'
|
+'H2PasTabSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#9'TGroupBo'
|
||||||
+'dth'#3#216#0#7'Caption'#6#30'OpenLastProjectOnStartCheckBox'#8'OnChange'#7
|
+'x'#17'PostH2PasGroupBox'#6'Height'#3#179#1#5'Width'#3#13#3#5'Align'#7#8'alC'
|
||||||
+'$OpenLastProjectOnStartCheckBoxChange'#8'TabOrder'#2#0#0#0#7'TButton'#20'Sa'
|
+'lient'#7'Caption'#6#17'PostH2PasGroupBox'#12'ClientHeight'#3#162#1#11'Clien'
|
||||||
+'veSettingsAsButton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'R'#5'Width'#3#137#0
|
+'tWidth'#3#9#3#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7'Cap'
|
||||||
+#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#20'SaveSetting'
|
+'tion'#6#16'SettingsTabSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3
|
||||||
+'sAsButton'#7'OnClick'#7#25'SaveSettingsAsButtonClick'#8'TabOrder'#2#1#0#0#5
|
+#0#6'TLabel'#18'H2PasFilenameLabel'#21'AnchorSideTop.Control'#7#17'H2PasFile'
|
||||||
+'TEdit'#17'H2PasFilenameEdit'#22'AnchorSideLeft.Control'#7#18'H2PasFilenameL'
|
+'nameEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3
|
||||||
+'abel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#132#0#6'Height'#2#23
|
+'Top'#2#9#5'Width'#2'x'#7'Caption'#6#18'H2PasFilenameLabel'#5'Color'#7#6'clN'
|
||||||
+#3'Top'#2#4#5'Width'#3'`'#1#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
|
+'one'#11'ParentColor'#8#0#0#9'TCheckBox'#30'OpenLastProjectOnStartCheckBox'#4
|
||||||
+#2#6#13'OnEditingDone'#7#28'H2PasFilenameEditEditingDone'#8'TabOrder'#2#2#4
|
+'Left'#2#6#6'Height'#2#20#3'Top'#2'*'#5'Width'#3#216#0#7'Caption'#6#30'OpenL'
|
||||||
+'Text'#6#17'H2PasFilenameEdit'#0#0#7'TButton'#25'h2pasFilenameBrowseButton'
|
+'astProjectOnStartCheckBox'#8'OnChange'#7'$OpenLastProjectOnStartCheckBoxCha'
|
||||||
+#22'AnchorSideLeft.Control'#7#17'H2PasFilenameEdit'#19'AnchorSideLeft.Side'#7
|
+'nge'#8'TabOrder'#2#0#0#0#7'TButton'#20'SaveSettingsAsButton'#4'Left'#2#6#6
|
||||||
+#9'asrBottom'#21'AnchorSideTop.Control'#7#17'H2PasFilenameEdit'#24'AnchorSid'
|
+'Height'#2#26#3'Top'#2'R'#5'Width'#3#137#0#8'AutoSize'#9#25'BorderSpacing.In'
|
||||||
+'eBottom.Control'#7#17'H2PasFilenameEdit'#21'AnchorSideBottom.Side'#7#9'asrB'
|
+'nerBorder'#2#4#7'Caption'#6#20'SaveSettingsAsButton'#7'OnClick'#7#25'SaveSe'
|
||||||
+'ottom'#4'Left'#3#228#1#6'Height'#2#23#3'Top'#2#4#5'Width'#2'#'#7'Anchors'#11
|
+'ttingsAsButtonClick'#8'TabOrder'#2#1#0#0#5'TEdit'#17'H2PasFilenameEdit'#22
|
||||||
+#5'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
|
+'AnchorSideLeft.Control'#7#18'H2PasFilenameLabel'#19'AnchorSideLeft.Side'#7#9
|
||||||
+'n'#6#3'...'#7'OnClick'#7#30'h2pasFilenameBrowseButtonClick'#8'TabOrder'#2#3
|
+'asrBottom'#4'Left'#3#132#0#6'Height'#2#23#3'Top'#2#4#5'Width'#3'`'#1#18'Bor'
|
||||||
+#0#0#7'TButton'#17'NewSettingsButton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'|'
|
+'derSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#28'H2Pas'
|
||||||
+#5'Width'#2'v'#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
|
+'FilenameEditEditingDone'#8'TabOrder'#2#2#4'Text'#6#17'H2PasFilenameEdit'#0#0
|
||||||
+#17'NewSettingsButton'#7'OnClick'#7#22'NewSettingsButtonClick'#8'TabOrder'#2
|
+#7'TButton'#25'h2pasFilenameBrowseButton'#22'AnchorSideLeft.Control'#7#17'H2'
|
||||||
+#4#0#0#0#0#7'TButton'#18'OpenSettingsButton'#22'AnchorSideLeft.Control'#7#5
|
+'PasFilenameEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Co'
|
||||||
+'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9
|
+'ntrol'#7#17'H2PasFilenameEdit'#24'AnchorSideBottom.Control'#7#17'H2PasFilen'
|
||||||
+'asrBottom'#4'Left'#2#5#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2'|'#7'Anchor'
|
+'ameEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#228#1#6'Height'
|
||||||
+'s'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25
|
+#2#23#3'Top'#2#4#5'Width'#2'#'#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0
|
||||||
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18'OpenSettingsButton'#7'OnClic'
|
+#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#30'h2pas'
|
||||||
+'k'#7#23'OpenSettingsButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#18'SaveSett'
|
+'FilenameBrowseButtonClick'#8'TabOrder'#2#3#0#0#7'TButton'#17'NewSettingsBut'
|
||||||
+'ingsButton'#22'AnchorSideLeft.Control'#7#18'OpenSettingsButton'#19'AnchorSi'
|
+'ton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'|'#5'Width'#2'v'#8'AutoSize'#9#25
|
||||||
+'deLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Anch'
|
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#17'NewSettingsButton'#7'OnClick'
|
||||||
+'orSideBottom.Side'#7#9'asrBottom'#4'Left'#3#134#0#6'Height'#2#26#3'Top'#3
|
+#7#22'NewSettingsButtonClick'#8'TabOrder'#2#4#0#0#0#0#7'TButton'#18'OpenSett'
|
||||||
+#214#1#5'Width'#2'z'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20
|
+'ingsButton'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Contr'
|
||||||
+'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18
|
+'ol'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#5#6'Heigh'
|
||||||
+'SaveSettingsButton'#7'OnClick'#7#23'SaveSettingsButtonClick'#8'TabOrder'#2#2
|
+'t'#2#26#3'Top'#3#214#1#5'Width'#2'|'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8
|
||||||
+#0#0#7'TButton'#13'ConvertButton'#22'AnchorSideLeft.Control'#7#18'SaveSettin'
|
+'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7
|
||||||
+'gsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
|
+'Caption'#6#18'OpenSettingsButton'#7'OnClick'#7#23'OpenSettingsButtonClick'#8
|
||||||
+#18'SaveSettingsButton'#4'Left'#3#15#1#6'Height'#2#26#3'Top'#3#214#1#5'Width'
|
+'TabOrder'#2#1#0#0#7'TButton'#18'SaveSettingsButton'#22'AnchorSideLeft.Contr'
|
||||||
+#2']'#8'AutoSize'#9#18'BorderSpacing.Left'#2#15#25'BorderSpacing.InnerBorder'
|
+'ol'#7#18'OpenSettingsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'Anch'
|
||||||
+#2#4#7'Caption'#6#13'ConvertButton'#7'OnClick'#7#18'ConvertButtonClick'#8'Ta'
|
+'orSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4
|
||||||
+'bOrder'#2#0#0#0#7'TButton'#11'CloseButton'#23'AnchorSideRight.Control'#7#5
|
+'Left'#3#134#0#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2'z'#7'Anchors'#11#6'a'
|
||||||
,'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
|
,'kLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSp'
|
||||||
+#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#187#2#6'Heigh'
|
+'acing.InnerBorder'#2#4#7'Caption'#6#18'SaveSettingsButton'#7'OnClick'#7#23
|
||||||
+'t'#2#26#3'Top'#3#214#1#5'Width'#2'Q'#7'Anchors'#11#7'akRight'#8'akBottom'#0
|
+'SaveSettingsButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#13'ConvertButton'#22
|
||||||
+#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4
|
+'AnchorSideLeft.Control'#7#18'SaveSettingsButton'#19'AnchorSideLeft.Side'#7#9
|
||||||
+#7'Caption'#6#11'CloseButton'#7'OnClick'#7#16'CloseButtonClick'#8'TabOrder'#2
|
+'asrBottom'#21'AnchorSideTop.Control'#7#18'SaveSettingsButton'#4'Left'#3#15#1
|
||||||
+#3#0#0#0
|
+#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2']'#8'AutoSize'#9#18'BorderSpacing.'
|
||||||
|
+'Left'#2#15#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#13'ConvertButton'
|
||||||
|
+#7'OnClick'#7#18'ConvertButtonClick'#8'TabOrder'#2#0#0#0#7'TButton'#11'Close'
|
||||||
|
+'Button'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9
|
||||||
|
+'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'
|
||||||
|
+#7#9'asrBottom'#4'Left'#3#187#2#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2'Q'#7
|
||||||
|
+'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'
|
||||||
|
+#2#5#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#11'CloseButton'#7'OnClic'
|
||||||
|
+'k'#7#16'CloseButtonClick'#8'TabOrder'#2#3#0#0#0
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -65,6 +65,11 @@ type
|
|||||||
OutputDirLabel: TLabel;
|
OutputDirLabel: TLabel;
|
||||||
OutputDirBrowseButton: TButton;
|
OutputDirBrowseButton: TButton;
|
||||||
|
|
||||||
|
// post h2pas
|
||||||
|
PostH2PasTabSheet: TTabSheet;
|
||||||
|
PostH2PasGroupBox: TGroupBox;
|
||||||
|
PostH2PasEdit: TTextConvListEditor;
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
SettingsTabSheet: TTabSheet;
|
SettingsTabSheet: TTabSheet;
|
||||||
h2pasFilenameBrowseButton: TButton;
|
h2pasFilenameBrowseButton: TButton;
|
||||||
@ -100,6 +105,7 @@ type
|
|||||||
procedure OutputDirBrowseButtonClick(Sender: TObject);
|
procedure OutputDirBrowseButtonClick(Sender: TObject);
|
||||||
procedure OutputDirEditEditingDone(Sender: TObject);
|
procedure OutputDirEditEditingDone(Sender: TObject);
|
||||||
procedure OutputExtEditEditingDone(Sender: TObject);
|
procedure OutputExtEditEditingDone(Sender: TObject);
|
||||||
|
procedure PostH2PasEditModified(Sender: TObject);
|
||||||
procedure PreH2PasEditModified(Sender: TObject);
|
procedure PreH2PasEditModified(Sender: TObject);
|
||||||
procedure SaveSettingsAsButtonClick(Sender: TObject);
|
procedure SaveSettingsAsButtonClick(Sender: TObject);
|
||||||
procedure SaveSettingsButtonClick(Sender: TObject);
|
procedure SaveSettingsButtonClick(Sender: TObject);
|
||||||
@ -187,6 +193,10 @@ begin
|
|||||||
// register text converter tools
|
// register text converter tools
|
||||||
TextConverterToolClasses.RegisterClass(TRemoveCPlusPlusExternCTool);
|
TextConverterToolClasses.RegisterClass(TRemoveCPlusPlusExternCTool);
|
||||||
TextConverterToolClasses.RegisterClass(TRemoveEmptyCMacrosTool);
|
TextConverterToolClasses.RegisterClass(TRemoveEmptyCMacrosTool);
|
||||||
|
TextConverterToolClasses.RegisterClass(TReplaceEdgedBracketPairWithStar);
|
||||||
|
TextConverterToolClasses.RegisterClass(TReplaceMacro0PointerWithNULL);
|
||||||
|
TextConverterToolClasses.RegisterClass(TReplaceUnitFilenameWithUnitName);
|
||||||
|
TextConverterToolClasses.RegisterClass(TRemoveSystemTypes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TH2PasDialog }
|
{ TH2PasDialog }
|
||||||
@ -224,6 +234,8 @@ begin
|
|||||||
LibNameLabel.Caption:='-l Library name';
|
LibNameLabel.Caption:='-l Library name';
|
||||||
PreH2PasTabSheet.Caption:='Before h2pas';
|
PreH2PasTabSheet.Caption:='Before h2pas';
|
||||||
PreH2PasGroupBox.Caption:='Conversions before running h2pas';
|
PreH2PasGroupBox.Caption:='Conversions before running h2pas';
|
||||||
|
PostH2PasTabSheet.Caption:='After h2pas';
|
||||||
|
PostH2PasGroupBox.Caption:='Conversions after running h2pas';
|
||||||
SettingsTabSheet.Caption:='Settings';
|
SettingsTabSheet.Caption:='Settings';
|
||||||
H2PasFilenameLabel.Caption:='h2pas program path';
|
H2PasFilenameLabel.Caption:='h2pas program path';
|
||||||
OpenLastProjectOnStartCheckBox.Caption:='Open last settings on start';
|
OpenLastProjectOnStartCheckBox.Caption:='Open last settings on start';
|
||||||
@ -243,6 +255,15 @@ begin
|
|||||||
Visible:=true;// Note: it's a form, and visible default is false
|
Visible:=true;// Note: it's a form, and visible default is false
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
PostH2PasEdit:=TTextConvListEditor.Create(Self);
|
||||||
|
with PostH2PasEdit do begin
|
||||||
|
Name:='PostH2PasEdit';
|
||||||
|
Align:=alClient;
|
||||||
|
OnModified:=@PostH2PasEditModified;
|
||||||
|
Parent:=PostH2PasGroupBox;
|
||||||
|
Visible:=true;// Note: it's a form, and visible default is false
|
||||||
|
end;
|
||||||
|
|
||||||
LazarusIDE.AddHandlerOnSavedAll(@OnIDESavedAll);
|
LazarusIDE.AddHandlerOnSavedAll(@OnIDESavedAll);
|
||||||
CreateLazarusMenuItems;
|
CreateLazarusMenuItems;
|
||||||
|
|
||||||
@ -256,8 +277,9 @@ begin
|
|||||||
OpenProject(Converter.CurrentProjectFilename,[]);
|
OpenProject(Converter.CurrentProjectFilename,[]);
|
||||||
if Project=nil then begin
|
if Project=nil then begin
|
||||||
Converter.Project:=TH2PasProject.Create;
|
Converter.Project:=TH2PasProject.Create;
|
||||||
end;
|
|
||||||
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
|
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
|
||||||
|
PostH2PasEdit.ListOfTools:=Project.PostH2PasTools;
|
||||||
|
end;
|
||||||
|
|
||||||
UpdateAll;
|
UpdateAll;
|
||||||
end;
|
end;
|
||||||
@ -361,6 +383,7 @@ procedure TH2PasDialog.FormDestroy(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
FreeAndNil(fSrcEditSection);
|
FreeAndNil(fSrcEditSection);
|
||||||
PreH2PasEdit.ListOfTools:=nil;
|
PreH2PasEdit.ListOfTools:=nil;
|
||||||
|
PostH2PasEdit.ListOfTools:=nil;
|
||||||
FreeAndNil(FConverter);
|
FreeAndNil(FConverter);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -438,6 +461,11 @@ begin
|
|||||||
Project.OutputExt:=OutputExtEdit.Text;
|
Project.OutputExt:=OutputExtEdit.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TH2PasDialog.PostH2PasEditModified(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Project.Modified:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TH2PasDialog.PreH2PasEditModified(Sender: TObject);
|
procedure TH2PasDialog.PreH2PasEditModified(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Project.Modified:=true;
|
Project.Modified:=true;
|
||||||
@ -709,6 +737,7 @@ procedure TH2PasDialog.UpdateConvertPage;
|
|||||||
begin
|
begin
|
||||||
ClearMessages;
|
ClearMessages;
|
||||||
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
|
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
|
||||||
|
PostH2PasEdit.ListOfTools:=Project.PostH2PasTools;
|
||||||
//DebugLn(['TH2PasDialog.UpdateConvertPage PreH2PasEdit.ListOfTools=',PreH2PasEdit.ListOfTools.COmponentCount]);
|
//DebugLn(['TH2PasDialog.UpdateConvertPage PreH2PasEdit.ListOfTools=',PreH2PasEdit.ListOfTools.COmponentCount]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -522,7 +522,8 @@ begin
|
|||||||
// Setup the regular expression search engine
|
// Setup the regular expression search engine
|
||||||
RE:=TRegExpr.Create;
|
RE:=TRegExpr.Create;
|
||||||
RE.ModifierI:=(sesoReplace in Flags) and (not (sesoMatchCase in Flags));
|
RE.ModifierI:=(sesoReplace in Flags) and (not (sesoMatchCase in Flags));
|
||||||
RE.ModifierM:= sesoMultiLine in Flags;
|
RE.ModifierM:=true;
|
||||||
|
RE.ModifierS:=sesoMultiLine in Flags;
|
||||||
if (sesoReplace in Flags) then begin
|
if (sesoReplace in Flags) then begin
|
||||||
Src:=OriginalFile.Source;
|
Src:=OriginalFile.Source;
|
||||||
if sesoWholeWord in Flags then
|
if sesoWholeWord in Flags then
|
||||||
|
|||||||
@ -5830,6 +5830,8 @@ begin
|
|||||||
// close file in project
|
// close file in project
|
||||||
Project1.CloseEditorIndex(ActiveUnitInfo.EditorIndex);
|
Project1.CloseEditorIndex(ActiveUnitInfo.EditorIndex);
|
||||||
ActiveUnitInfo.Loaded:=false;
|
ActiveUnitInfo.Loaded:=false;
|
||||||
|
if ActiveUnitInfo<>Project1.MainUnitInfo then
|
||||||
|
ActiveUnitInfo.Source:=nil;
|
||||||
i:=Project1.IndexOf(ActiveUnitInfo);
|
i:=Project1.IndexOf(ActiveUnitInfo);
|
||||||
if (i<>Project1.MainUnitID) and (ActiveUnitInfo.IsVirtual) then begin
|
if (i<>Project1.MainUnitID) and (ActiveUnitInfo.IsVirtual) then begin
|
||||||
Project1.RemoveUnit(i);
|
Project1.RemoveUnit(i);
|
||||||
@ -6552,11 +6554,12 @@ function TMainIDE.DoRevertEditorFile(const Filename: string): TModalResult;
|
|||||||
var
|
var
|
||||||
AnUnitInfo: TUnitInfo;
|
AnUnitInfo: TUnitInfo;
|
||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
Result:=mrCancel;
|
||||||
if (Project1<>nil) then begin
|
if (Project1<>nil) then begin
|
||||||
AnUnitInfo:=Project1.UnitInfoWithFilename(Filename,[]);
|
AnUnitInfo:=Project1.UnitInfoWithFilename(Filename,[]);
|
||||||
if AnUnitInfo.EditorIndex>=0 then
|
if (AnUnitInfo<>nil) and (AnUnitInfo.EditorIndex>=0) then
|
||||||
Result:=DoOpenEditorFile(Filename,AnUnitInfo.EditorIndex,[ofRevert]);
|
Result:=DoOpenEditorFile(AnUnitInfo.Filename,AnUnitInfo.EditorIndex,
|
||||||
|
[ofRevert]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -2977,7 +2977,8 @@ begin
|
|||||||
AnUnitList:=nil;
|
AnUnitList:=nil;
|
||||||
AnUnitInfo:=fFirst[uilAutoRevertLocked];
|
AnUnitInfo:=fFirst[uilAutoRevertLocked];
|
||||||
while (AnUnitInfo<>nil) do begin
|
while (AnUnitInfo<>nil) do begin
|
||||||
if AnUnitInfo.ChangedOnDisk(false) then begin
|
if (AnUnitInfo.Source<>nil)
|
||||||
|
and AnUnitInfo.ChangedOnDisk(false) then begin
|
||||||
if AnUnitList=nil then
|
if AnUnitList=nil then
|
||||||
AnUnitList:=TFPList.Create;
|
AnUnitList:=TFPList.Create;
|
||||||
AnUnitList.Add(AnUnitInfo);
|
AnUnitList.Add(AnUnitInfo);
|
||||||
|
|||||||
@ -418,12 +418,14 @@ begin
|
|||||||
SynREEngine:=TRegExpr.Create;
|
SynREEngine:=TRegExpr.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SynREMatches(const TheText, RegExpr, ModifierStr: string): boolean;
|
function SynREMatches(const TheText, RegExpr, ModifierStr: string;
|
||||||
|
StartPos: integer): boolean;
|
||||||
begin
|
begin
|
||||||
InitSynREEngine;
|
InitSynREEngine;
|
||||||
SynREEngine.ModifierStr:=ModifierStr;
|
SynREEngine.ModifierStr:=ModifierStr;
|
||||||
SynREEngine.Expression:=RegExpr;
|
SynREEngine.Expression:=RegExpr;
|
||||||
Result:=SynREEngine.Exec(TheText);
|
SynREEngine.InputString:=TheText;
|
||||||
|
Result:=SynREEngine.ExecPos(StartPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SynREVar(Index: Integer): string;
|
function SynREVar(Index: Integer): string;
|
||||||
|
|||||||
@ -573,7 +573,7 @@ var
|
|||||||
Flags: TSrcEditSearchOptions;
|
Flags: TSrcEditSearchOptions;
|
||||||
Prompt: Boolean;
|
Prompt: Boolean;
|
||||||
begin
|
begin
|
||||||
DebugLn(['TCustomTextReplaceTool.Execute ',dbgsName(Self),' aText=',dbgsName(aText),' SearchFor="',dbgstr(SearchFor),'"']);
|
//DebugLn(['TCustomTextReplaceTool.Execute ',dbgsName(Self),' aText=',dbgsName(aText),' SearchFor="',dbgstr(SearchFor),'"']);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
if aText=nil then exit;
|
if aText=nil then exit;
|
||||||
if SearchFor='' then exit(mrOk);
|
if SearchFor='' then exit(mrOk);
|
||||||
@ -587,7 +587,7 @@ begin
|
|||||||
Result:=IDESearchInText('',Source,SearchFor,ReplaceWith,Flags,Prompt,nil);
|
Result:=IDESearchInText('',Source,SearchFor,ReplaceWith,Flags,Prompt,nil);
|
||||||
if Result=mrOk then
|
if Result=mrOk then
|
||||||
aText.Source:=Source;
|
aText.Source:=Source;
|
||||||
DebugLn(['TCustomTextReplaceTool.Execute END Result=',Result=mrOk]);
|
//DebugLn(['TCustomTextReplaceTool.Execute END Result=',Result=mrOk]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomTextReplaceTool.Assign(Source: TPersistent);
|
procedure TCustomTextReplaceTool.Assign(Source: TPersistent);
|
||||||
|
|||||||
@ -363,30 +363,19 @@ var
|
|||||||
// Source Editor: First dynamic section for often used context sensitive stuff
|
// Source Editor: First dynamic section for often used context sensitive stuff
|
||||||
// The items are cleared automatically after each popup.
|
// The items are cleared automatically after each popup.
|
||||||
SrcEditMenuSectionFirstDynamic: TIDEMenuSection;
|
SrcEditMenuSectionFirstDynamic: TIDEMenuSection;
|
||||||
// Source Editor: First static section (e.g. Find Declaration)
|
|
||||||
SrcEditMenuSectionFirstStatic: TIDEMenuSection;
|
SrcEditMenuSectionFirstStatic: TIDEMenuSection;
|
||||||
// Source Editor: Find sub menu section (e.g. Procedure Jump)
|
|
||||||
SrcEditSubMenuFind: TIDEMenuSection;
|
SrcEditSubMenuFind: TIDEMenuSection;
|
||||||
// Source Editor: Clipboard section (e.g. cut, copy, paste)
|
|
||||||
SrcEditMenuSectionClipboard: TIDEMenuSection;
|
SrcEditMenuSectionClipboard: TIDEMenuSection;
|
||||||
// Source Editor: File Specific dynamic section
|
// Source Editor: File Specific dynamic section
|
||||||
// The items are cleared automatically after each popup.
|
// The items are cleared automatically after each popup.
|
||||||
SrcEditMenuSectionFileDynamic: TIDEMenuSection;
|
SrcEditMenuSectionFileDynamic: TIDEMenuSection;
|
||||||
// Source Editor: Marks section
|
|
||||||
SrcEditMenuSectionMarks: TIDEMenuSection;
|
SrcEditMenuSectionMarks: TIDEMenuSection;
|
||||||
// Source Editor: Goto Bookmarks Submenu
|
|
||||||
SrcEditSubMenuGotoBookmarks: TIDEMenuSection;
|
SrcEditSubMenuGotoBookmarks: TIDEMenuSection;
|
||||||
// Source Editor: Set Bookmarks Submenu
|
|
||||||
SrcEditSubMenuSetBookmarks: TIDEMenuSection;
|
SrcEditSubMenuSetBookmarks: TIDEMenuSection;
|
||||||
// Source Editor: Flags and options section
|
|
||||||
SrcEditMenuSectionFlags: TIDEMenuSection;
|
SrcEditMenuSectionFlags: TIDEMenuSection;
|
||||||
// Source Editor: Highlighter section
|
|
||||||
SrcEditMenuSectionHighlighter: TIDEMenuSection;
|
SrcEditMenuSectionHighlighter: TIDEMenuSection;
|
||||||
// Source Editor: Debug submenu
|
|
||||||
SrcEditSubMenuDebug: TIDEMenuSection;
|
SrcEditSubMenuDebug: TIDEMenuSection;
|
||||||
// Source Editor: Move Page section
|
|
||||||
SrcEditMenuSectionMovePage: TIDEMenuSection;
|
SrcEditMenuSectionMovePage: TIDEMenuSection;
|
||||||
// Source Editor: Refactor submenu
|
|
||||||
SrcEditSubMenuRefactor: TIDEMenuSection;
|
SrcEditSubMenuRefactor: TIDEMenuSection;
|
||||||
|
|
||||||
// Messages window popupmenu
|
// Messages window popupmenu
|
||||||
@ -404,16 +393,11 @@ var
|
|||||||
DesignerMenuSectionComponentEditor: TIDEMenuSection;
|
DesignerMenuSectionComponentEditor: TIDEMenuSection;
|
||||||
// Designer: custom dynamic section
|
// Designer: custom dynamic section
|
||||||
DesignerMenuSectionCustomDynamic: TIDEMenuSection;
|
DesignerMenuSectionCustomDynamic: TIDEMenuSection;
|
||||||
// Designer: align section
|
|
||||||
DesignerMenuSectionAlign: TIDEMenuSection;
|
DesignerMenuSectionAlign: TIDEMenuSection;
|
||||||
// Designer: tab and order section
|
|
||||||
DesignerMenuSectionOrder: TIDEMenuSection;
|
DesignerMenuSectionOrder: TIDEMenuSection;
|
||||||
DesignerMenuSectionZOrder: TIDEMenuSection;
|
DesignerMenuSectionZOrder: TIDEMenuSection;
|
||||||
// Designer: clipboard section
|
|
||||||
DesignerMenuSectionClipboard: TIDEMenuSection;
|
DesignerMenuSectionClipboard: TIDEMenuSection;
|
||||||
// Designer: miscellaneous section
|
|
||||||
DesignerMenuSectionMisc: TIDEMenuSection;
|
DesignerMenuSectionMisc: TIDEMenuSection;
|
||||||
// Designer: options section
|
|
||||||
DesignerMenuSectionOptions: TIDEMenuSection;
|
DesignerMenuSectionOptions: TIDEMenuSection;
|
||||||
|
|
||||||
function RegisterIDEMenuRoot(const Name: string; MenuItem: TMenuItem = nil
|
function RegisterIDEMenuRoot(const Name: string; MenuItem: TMenuItem = nil
|
||||||
|
|||||||
@ -69,7 +69,7 @@ var
|
|||||||
REException: ExceptClass; // initialized by the IDE
|
REException: ExceptClass; // initialized by the IDE
|
||||||
|
|
||||||
function REMatches(const TheText, RegExpr: string;
|
function REMatches(const TheText, RegExpr: string;
|
||||||
const ModifierStr: string = ''): boolean;
|
const ModifierStr: string = ''; StartPos: integer = 1): boolean;
|
||||||
function REVar(Index: Integer): string; // 1 is the first
|
function REVar(Index: Integer): string; // 1 is the first
|
||||||
procedure REVarPos(Index: Integer; out MatchStart, MatchLength: integer);
|
procedure REVarPos(Index: Integer; out MatchStart, MatchLength: integer);
|
||||||
function REVarCount: Integer;
|
function REVarCount: Integer;
|
||||||
@ -92,8 +92,8 @@ function GetPathElement(const Path: string; StartPos: integer;
|
|||||||
// Internal stuff.
|
// Internal stuff.
|
||||||
|
|
||||||
type
|
type
|
||||||
TREMatchesFunction = function(const TheText, RegExpr, ModifierStr: string
|
TREMatchesFunction = function(const TheText, RegExpr, ModifierStr: string;
|
||||||
): boolean;
|
StartPos: integer): boolean;
|
||||||
TREVarFunction = function(Index: Integer): string;
|
TREVarFunction = function(Index: Integer): string;
|
||||||
TREVarPosProcedure = procedure(Index: Integer;
|
TREVarPosProcedure = procedure(Index: Integer;
|
||||||
out MatchStart, MatchLength: integer);
|
out MatchStart, MatchLength: integer);
|
||||||
@ -114,9 +114,9 @@ var
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
function REMatches(const TheText, RegExpr: string;
|
function REMatches(const TheText, RegExpr: string;
|
||||||
const ModifierStr: string): boolean;
|
const ModifierStr: string; StartPos: integer): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=REMatchesFunction(TheText,RegExpr,ModifierStr);
|
Result:=REMatchesFunction(TheText,RegExpr,ModifierStr,StartPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function REVar(Index: Integer): string;
|
function REVar(Index: Integer): string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user