h2pas: added tools after, IDE: fixed find in files single line reg expr

git-svn-id: trunk@9947 -
This commit is contained in:
mattias 2006-09-20 17:55:26 +00:00
parent 776e097c46
commit edf2642c1d
11 changed files with 459 additions and 220 deletions

View File

@ -28,7 +28,7 @@ uses
// CodeTools
BasicCodeTools,
// IDEIntf
TextTools, IDEExternToolIntf, IDEDialogs, LazIDEIntf,
TextTools, IDEExternToolIntf, IDEDialogs, LazIDEIntf, SrcEditorIntf,
IDEMsgIntf, IDETextConverter;
type
@ -48,6 +48,38 @@ type
class function ClassDescription: string; override;
function Execute(aText: TIDETextConverter): TModalResult; override;
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;
TH2PasConverter = class;
@ -102,6 +134,7 @@ type
FPackAllRecords: boolean;
FPalmOSSYSTrap: boolean;
FPforPointers: boolean;
FPostH2PasTools: TComponent;
FPreH2PasTools: TComponent;
FStripComments: boolean;
FStripCommentsAndInfo: boolean;
@ -156,6 +189,7 @@ type
function NormalizeFilename(const AFilename: string): string;
function HasEnabledFiles: boolean;
procedure AddDefaultPreH2PasTools;
procedure AddDefaultPostH2PasTools;
public
property CHeaderFileCount: integer read GetCHeaderFileCount;
property CHeaderFiles[Index: integer]: TH2PasFile read GetCHeaderFiles;
@ -165,6 +199,7 @@ type
property IsVirtual: boolean read FIsVirtual;
property Converter: TH2PasConverter read FConverter;
property PreH2PasTools: TComponent read FPreH2PasTools;
property PostH2PasTools: TComponent read FPostH2PasTools;
// h2pas options
property ConstantsInsteadOfEnums: boolean read FConstantsInsteadOfEnums write SetConstantsInsteadOfEnums;
@ -620,18 +655,39 @@ begin
CHeaderFiles[CHeaderFileCount-1].Free;
FPreH2PasTools.Free;
FPreH2PasTools:=TComponent.Create(nil);
if AddDefaults then
FPostH2PasTools.Free;
FPostH2PasTools:=TComponent.Create(nil);
if AddDefaults then begin
AddDefaultPreH2PasTools;
AddDefaultPostH2PasTools;
end;
FModified:=false;
end;
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
Src: TH2PasProject;
i: Integer;
NewCHeaderFile: TH2PasFile;
SrcComponent: TComponent;
NewComponent: TObject;
begin
if Source is TH2PasProject then begin
Src:=TH2PasProject(Source);
@ -661,16 +717,8 @@ begin
NewCHeaderFile.Project:=Self;
NewCHeaderFile.Assign(Src.CHeaderFiles[i]);
end;
FPreH2PasTools.Free;
FPreH2PasTools:=TComponent.Create(nil);
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;
CopyTools(Src.FPreH2PasTools,FPreH2PasTools);
CopyTools(Src.FPostH2PasTools,FPostH2PasTools);
Modified:=true;
end;
end else begin
@ -705,16 +753,41 @@ begin
for i:=0 to CHeaderFileCount-1 do
if not CHeaderFiles[i].IsEqual(AProject.CHeaderFiles[i]) then
exit(false);
if not CompareComponents(FPreH2PasTools,AProject.FPreH2PasTools) then
if (not CompareComponents(FPreH2PasTools,AProject.FPreH2PasTools))
or (not CompareComponents(FPostH2PasTools,AProject.FPostH2PasTools)) then
exit(false);
end;
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
NewCount: LongInt;
i: Integer;
NewCHeaderFile: TH2PasFile;
NewComponent: TComponent;
begin
Clear(false);
@ -756,28 +829,34 @@ begin
Config.UndoAppendBasePath;
end;
// load PreH2PasTools
Config.AppendBasePath('PreH2PasTools');
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;
LoadTools('PreH2PasTools',FPreH2PasTools);
LoadTools('PostH2PasTools',FPostH2PasTools);
FModified:=false;
end;
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
i: Integer;
begin
@ -817,21 +896,8 @@ begin
Config.UndoAppendBasePath;
end;
Config.AppendBasePath('PreH2PasTools');
try
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;
SaveTools('PreH2PasTools',FPreH2PasTools);
SaveTools('PostH2PasTools',FPostH2PasTools);
FModified:=false;
end;
@ -950,6 +1016,14 @@ procedure TH2PasProject.AddDefaultPreH2PasTools;
begin
TRemoveCPlusPlusExternCTool.Create(FPreH2PasTools);
TRemoveEmptyCMacrosTool.Create(FPreH2PasTools);
TReplaceEdgedBracketPairWithStar.Create(FPreH2PasTools);
TReplaceMacro0PointerWithNULL.Create(FPreH2PasTools);
end;
procedure TH2PasProject.AddDefaultPostH2PasTools;
begin
TReplaceUnitFilenameWithUnitName.Create(FPostH2PasTools);
TRemoveSystemTypes.Create(FPostH2PasTools);
end;
{ TH2PasConverter }
@ -1221,10 +1295,10 @@ begin
TextConverter.Filename:=TempCHeaderFilename;
FLastUsedFilename:=TextConverter.Filename;
TextConverter.LoadFromFile(InputFilename);
DebugLn(['TH2PasConverter.ConvertFile TempCHeaderFilename="',TempCHeaderFilename,'" CurrentType=',ord(TextConverter.CurrentType),' FileSize=',FileSize(TempCHeaderFilename)]);
// run converters for .h file to make it compatible for h2pas
TextConverter.LoadFromFile(InputFilename);
Result:=TextConverter.Execute(Project.PreH2PasTools);
if Result<>mrOk then begin
DebugLn(['TH2PasConverter.ConvertFile Failed running Project.PreH2PasTools on ',TempCHeaderFilename]);
@ -1236,9 +1310,9 @@ begin
try
Tool.Title:='h2pas';
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;
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.CmdLineParams:=AFile.GetH2PasParameters(Tool.TargetFilename);
Tool.ScanOutput:=true;
@ -1253,12 +1327,22 @@ begin
Tool.Free;
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
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(OutputFilename);
end;
end;
Result:=mrOk;
@ -1354,7 +1438,7 @@ var
TempStr: String;
Identifier: PChar;
begin
DebugLn(['AddEmptyMacro MacroName="',MacroName,'"']);
//DebugLn(['AddEmptyMacro MacroName="',MacroName,'"']);
if EmptyMacros=nil then
EmptyMacros:=TAvgLvlTree.Create(TListSortCompare(@CompareIdentifiers));
Identifier:=@MacroName[1];
@ -1371,7 +1455,7 @@ var
Identifier: PChar;
Node: TAvgLvlTreeNode;
begin
DebugLn(['DeleteEmptyMacro MacroName="',MacroName,'"']);
//DebugLn(['DeleteEmptyMacro MacroName="',MacroName,'"']);
if EmptyMacros=nil then exit;
Identifier:=@MacroName[1];
Node:=EmptyMacros.Find(Identifier);
@ -1456,6 +1540,105 @@ begin
Result:=mrOk;
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.

View File

@ -6,6 +6,8 @@ object H2PasDialog: TH2PasDialog
HorzScrollBar.Page = 784
VertScrollBar.Page = 500
Caption = 'H2PasDialog'
ClientHeight = 501
ClientWidth = 785
KeyPreview = True
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
@ -16,13 +18,15 @@ object H2PasDialog: TH2PasDialog
AnchorSideBottom.Control = OpenSettingsButton
Height = 465
Width = 785
ActivePage = SettingsTabSheet
ActivePage = PostH2PasTabSheet
Align = alTop
Anchors = [akTop, akLeft, akRight, akBottom]
TabIndex = 3
TabOrder = 4
object FilesTabSheet: TTabSheet
Caption = 'FilesTabSheet'
ClientHeight = 435
ClientWidth = 781
object CHeaderFilesCheckListBox: TCheckListBox
Height = 435
Width = 255
@ -103,6 +107,8 @@ object H2PasDialog: TH2PasDialog
Width = 521
Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'FileInfoGroupBox'
ClientHeight = 230
ClientWidth = 517
TabOrder = 5
object FileInfoLabel: TLabel
Left = 8
@ -117,16 +123,22 @@ object H2PasDialog: TH2PasDialog
end
object PreH2PasTabSheet: TTabSheet
Caption = 'PreH2PasTabSheet'
ClientHeight = 435
ClientWidth = 781
object PreH2PasGroupBox: TGroupBox
Height = 435
Width = 781
Align = alClient
Caption = 'PreH2PasGroupBox'
ClientHeight = 435
ClientWidth = 781
TabOrder = 0
end
end
object h2pasOptionsTabSheet: TTabSheet
Caption = 'h2pasOptionsTabSheet'
ClientHeight = 435
ClientWidth = 781
object LibNameLabel: TLabel
AnchorSideTop.Control = LibnameEdit
AnchorSideTop.Side = asrCenter
@ -240,8 +252,24 @@ object H2PasDialog: TH2PasDialog
TabOrder = 4
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
Caption = 'SettingsTabSheet'
ClientHeight = 435
ClientWidth = 781
object H2PasFilenameLabel: TLabel
AnchorSideTop.Control = H2PasFilenameEdit
AnchorSideTop.Side = asrCenter

View File

@ -3,136 +3,144 @@
LazarusResources.Add('TH2PasDialog','FORMDATA',[
'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.'
+'Page'#3#244#1#7'Caption'#6#11'H2PasDialog'#10'KeyPreview'#9#12'OnCloseQuery'
+#7#14'FormCloseQuery'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDes'
+'troy'#9'OnKeyDown'#7#11'FormKeyDown'#8'Position'#7#15'poDesktopCenter'#0#12
+'TPageControl'#15'MainPageControl'#24'AnchorSideBottom.Control'#7#18'OpenSet'
+'tingsButton'#6'Height'#3#209#1#5'Width'#3#17#3#10'ActivePage'#7#16'Settings'
+'TabSheet'#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
+'akBottom'#0#8'TabIndex'#2#3#8'TabOrder'#2#4#0#9'TTabSheet'#13'FilesTabSheet'
+#7'Caption'#6#13'FilesTabSheet'#0#13'TCheckListBox'#24'CHeaderFilesCheckList'
+'Box'#6'Height'#3#179#1#5'Width'#3#255#0#5'Align'#7#6'alLeft'#7'OnClick'#7#29
+'CHeaderFilesCheckListBoxClick'#11'OnItemClick'#7'!CHeaderFilesCheckListBoxI'
+'temClick'#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'TButton'#21'AddCHeaderFil'
+'esButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorS'
+'ideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2#12#5'Wi'
+'dth'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#21'AddCHeaderFilesButton'#7'OnClick'#7#26'AddCHeaderFilesButtonC'
+'lick'#8'TabOrder'#2#1#0#0#7'TButton'#24'DeleteCHeaderFilesButton'#22'Anchor'
+'SideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'a'
+'srBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'3'#5'Width'#3#185#0#18'Bor'
+'derSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#24'Dele'
+'teCHeaderFilesButton'#7'OnClick'#7#29'DeleteCHeaderFilesButtonClick'#8'TabO'
+'rder'#2#2#0#0#7'TButton'#27'SelectAllCHeaderFilesButton'#22'AnchorSideLeft.'
+'Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'
+#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'a'#5'Width'#3#185#0#18'BorderSpacing'
+'.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#27'SelectAllCHead'
+'erFilesButton'#7'OnClick'#7' SelectAllCHeaderFilesButtonClick'#8'TabOrder'#2
+#3#0#0#7'TButton'#29'UnselectAllCHeaderFilesButton'#22'AnchorSideLeft.Contro'
+'l'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Lef'
+'t'#3#10#1#6'Height'#2#25#3'Top'#3#137#0#5'Width'#3#185#0#18'BorderSpacing.L'
+'eft'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#29'UnselectAllCHead'
+'erFilesButton'#7'OnClick'#7'"UnselectAllCHeaderFilesButtonClick'#8'TabOrder'
+#2#4#0#0#9'TSplitter'#21'CHeaderFilesSplitter1'#4'Left'#3#255#0#6'Height'#3
+#179#1#5'Width'#2#5#7'Beveled'#9#0#0#9'TGroupBox'#16'FileInfoGroupBox'#22'An'
+'chorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7
+#9'asrBottom'#23'AnchorSideRight.Control'#7#13'FilesTabSheet'#20'AnchorSideR'
+'ight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#13'FilesTabSheet'
+#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#4#1#6'Height'#3#247#0#3
+'Top'#3#188#0#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'a'
+'kBottom'#0#7'Caption'#6#16'FileInfoGroupBox'#8'TabOrder'#2#5#0#6'TLabel'#13
+'FileInfoLabel'#4'Left'#2#8#6'Height'#2#13#3'Top'#2#1#5'Width'#2'I'#7'Captio'
+'n'#6#13'FileInfoLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#0#0#9'TTa'
+'bSheet'#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'#0#9'TGroupBo'
+'x'#16'PreH2PasGroupBox'#6'Height'#3#179#1#5'Width'#3#13#3#5'Align'#7#8'alCl'
+'ient'#7'Caption'#6#16'PreH2PasGroupBox'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'
+#20'h2pasOptionsTabSheet'#7'Caption'#6#20'h2pasOptionsTabSheet'#0#6'TLabel'
+#12'LibNameLabel'#21'AnchorSideTop.Control'#7#11'LibnameEdit'#18'AnchorSideT'
+'op.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3'Top'#3#25#1#5'Width'#2
+'Q'#17'BorderSpacing.Top'#2#10#7'Caption'#6#12'LibNameLabel'#5'Color'#7#6'cl'
+'None'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'AnchorSideTop.C'
+'ontrol'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2
+#6#6'Height'#2#13#3'Top'#3'9'#1#5'Width'#2'V'#7'Caption'#6#14'OutputExtLabel'
+#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputDirLabel'#21
+'AnchorSideTop.Control'#7#13'OutputDirEdit'#18'AnchorSideTop.Side'#7#9'asrCe'
+'nter'#4'Left'#2#6#6'Height'#2#13#3'Top'#3'V'#1#5'Width'#2'U'#7'Caption'#6#14
+'OutputDirLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#11'Libn'
+'ameEdit'#22'AnchorSideLeft.Control'#7#12'LibNameLabel'#19'AnchorSideLeft.Si'
+'de'#7#9'asrBottom'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2']'#6'Hei'
+'ght'#2#23#3'Top'#3#20#1#5'Width'#2'q'#18'BorderSpacing.Left'#2#6#17'BorderS'
+'pacing.Top'#2#6#13'OnEditingDone'#7#22'LibnameEditEditingDone'#8'TabOrder'#2
+#0#4'Text'#6#11'LibnameEdit'#0#0#5'TEdit'#13'OutputExtEdit'#22'AnchorSideLef'
+'t.Control'#7#14'OutputExtLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#18'A'
+'nchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'b'#6'Height'#2#23#3'Top'#3'4'#1
+#5'Width'#2'P'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEdi'
,'tingDone'#7#24'OutputExtEditEditingDone'#8'TabOrder'#2#1#4'Text'#6#13'Outpu'
+'tExtEdit'#0#0#5'TEdit'#13'OutputDirEdit'#22'AnchorSideLeft.Control'#7#14'Ou'
+'tputDirLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contr'
+'ol'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'a'#6
+'Height'#2#23#3'Top'#3'Q'#1#5'Width'#3#141#1#18'BorderSpacing.Left'#2#6#17'B'
+'orderSpacing.Top'#2#6#13'OnEditingDone'#7#24'OutputDirEditEditingDone'#8'Ta'
+'bOrder'#2#2#4'Text'#6#13'OutputDirEdit'#0#0#7'TButton'#21'OutputDirBrowseBu'
+'tton'#22'AnchorSideLeft.Control'#7#13'OutputDirEdit'#19'AnchorSideLeft.Side'
+#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputDirEdit'#24'AnchorSideB'
+'ottom.Control'#7#13'OutputDirEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'
+#4'Left'#3#238#1#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#2' '#7'Anchors'#11#5
+'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
+#6#3'...'#7'OnClick'#7#26'OutputDirBrowseButtonClick'#8'TabOrder'#2#3#0#0#11
+'TCheckGroup'#22'h2pasOptionsCheckGroup'#4'Left'#2#6#6'Height'#3#8#1#3'Top'#2
+#4#5'Width'#3#0#3#8'AutoFill'#9#7'Caption'#6#22'h2pasOptionsCheckGroup'#28'C'
+'hildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Ch'
+'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.'
+'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo'
+'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil'
+'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi'
+'ng.ControlsPerLine'#2#2#7'Columns'#2#2#11'OnItemClick'#7#31'h2pasOptionsChe'
+'ckGroupItemClick'#8'TabOrder'#2#4#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7
+'Caption'#6#16'SettingsTabSheet'#0#6'TLabel'#18'H2PasFilenameLabel'#21'Ancho'
+'rSideTop.Control'#7#17'H2PasFilenameEdit'#18'AnchorSideTop.Side'#7#9'asrCen'
+'ter'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#9#5'Width'#2'x'#7'Caption'#6#18'H2'
+'PasFilenameLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#9'TCheckBox'#30
+'OpenLastProjectOnStartCheckBox'#4'Left'#2#6#6'Height'#2#20#3'Top'#2'*'#5'Wi'
+'dth'#3#216#0#7'Caption'#6#30'OpenLastProjectOnStartCheckBox'#8'OnChange'#7
+'$OpenLastProjectOnStartCheckBoxChange'#8'TabOrder'#2#0#0#0#7'TButton'#20'Sa'
+'veSettingsAsButton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'R'#5'Width'#3#137#0
+#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#20'SaveSetting'
+'sAsButton'#7'OnClick'#7#25'SaveSettingsAsButtonClick'#8'TabOrder'#2#1#0#0#5
+'TEdit'#17'H2PasFilenameEdit'#22'AnchorSideLeft.Control'#7#18'H2PasFilenameL'
+'abel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#132#0#6'Height'#2#23
+#3'Top'#2#4#5'Width'#3'`'#1#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
+#2#6#13'OnEditingDone'#7#28'H2PasFilenameEditEditingDone'#8'TabOrder'#2#2#4
+'Text'#6#17'H2PasFilenameEdit'#0#0#7'TButton'#25'h2pasFilenameBrowseButton'
+#22'AnchorSideLeft.Control'#7#17'H2PasFilenameEdit'#19'AnchorSideLeft.Side'#7
+#9'asrBottom'#21'AnchorSideTop.Control'#7#17'H2PasFilenameEdit'#24'AnchorSid'
+'eBottom.Control'#7#17'H2PasFilenameEdit'#21'AnchorSideBottom.Side'#7#9'asrB'
+'ottom'#4'Left'#3#228#1#6'Height'#2#23#3'Top'#2#4#5'Width'#2'#'#7'Anchors'#11
+#5'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
+'n'#6#3'...'#7'OnClick'#7#30'h2pasFilenameBrowseButtonClick'#8'TabOrder'#2#3
+#0#0#7'TButton'#17'NewSettingsButton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'|'
+#5'Width'#2'v'#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
+#17'NewSettingsButton'#7'OnClick'#7#22'NewSettingsButtonClick'#8'TabOrder'#2
+#4#0#0#0#0#7'TButton'#18'OpenSettingsButton'#22'AnchorSideLeft.Control'#7#5
+'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9
+'asrBottom'#4'Left'#2#5#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2'|'#7'Anchor'
+'s'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18'OpenSettingsButton'#7'OnClic'
+'k'#7#23'OpenSettingsButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#18'SaveSett'
+'ingsButton'#22'AnchorSideLeft.Control'#7#18'OpenSettingsButton'#19'AnchorSi'
+'deLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Anch'
+'orSideBottom.Side'#7#9'asrBottom'#4'Left'#3#134#0#6'Height'#2#26#3'Top'#3
+#214#1#5'Width'#2'z'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20
+'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18
+'SaveSettingsButton'#7'OnClick'#7#23'SaveSettingsButtonClick'#8'TabOrder'#2#2
+#0#0#7'TButton'#13'ConvertButton'#22'AnchorSideLeft.Control'#7#18'SaveSettin'
+'gsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
+#18'SaveSettingsButton'#4'Left'#3#15#1#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'Ta'
+'bOrder'#2#0#0#0#7'TButton'#11'CloseButton'#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'Heigh'
+'t'#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'OnClick'#7#16'CloseButtonClick'#8'TabOrder'#2
+#3#0#0#0
+'Page'#3#244#1#7'Caption'#6#11'H2PasDialog'#12'ClientHeight'#3#245#1#11'Clie'
+'ntWidth'#3#17#3#10'KeyPreview'#9#12'OnCloseQuery'#7#14'FormCloseQuery'#8'On'
+'Create'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#11'F'
+'ormKeyDown'#8'Position'#7#15'poDesktopCenter'#0#12'TPageControl'#15'MainPag'
+'eControl'#24'AnchorSideBottom.Control'#7#18'OpenSettingsButton'#6'Height'#3
+#209#1#5'Width'#3#17#3#10'ActivePage'#7#17'PostH2PasTabSheet'#5'Align'#7#5'a'
+'lTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'
+#2#3#8'TabOrder'#2#4#0#9'TTabSheet'#13'FilesTabSheet'#7'Caption'#6#13'FilesT'
+'abSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#13'TCheckListBox'
+#24'CHeaderFilesCheckListBox'#6'Height'#3#179#1#5'Width'#3#255#0#5'Align'#7#6
+'alLeft'#7'OnClick'#7#29'CHeaderFilesCheckListBoxClick'#11'OnItemClick'#7'!C'
+'HeaderFilesCheckListBoxItemClick'#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'T'
+'Button'#21'AddCHeaderFilesButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFi'
+'lesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Heigh'
+'t'#2#25#3'Top'#2#12#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSp'
+'acing.InnerBorder'#2#4#7'Caption'#6#21'AddCHeaderFilesButton'#7'OnClick'#7
+#26'AddCHeaderFilesButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#24'DeleteCHea'
+'derFilesButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'A'
+'nchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'3'
+#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2
+#4#7'Caption'#6#24'DeleteCHeaderFilesButton'#7'OnClick'#7#29'DeleteCHeaderFi'
+'lesButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#27'SelectAllCHeaderFilesButt'
+'on'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLef'
+'t.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'a'#5'Width'#3
+#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
+'n'#6#27'SelectAllCHeaderFilesButton'#7'OnClick'#7' SelectAllCHeaderFilesBut'
+'tonClick'#8'TabOrder'#2#3#0#0#7'TButton'#29'UnselectAllCHeaderFilesButton'
+#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Si'
+'de'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#3#137#0#5'Width'#3
+#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
+'n'#6#29'UnselectAllCHeaderFilesButton'#7'OnClick'#7'"UnselectAllCHeaderFile'
+'sButtonClick'#8'TabOrder'#2#4#0#0#9'TSplitter'#21'CHeaderFilesSplitter1'#4
+'Left'#3#255#0#6'Height'#3#179#1#5'Width'#2#5#7'Beveled'#9#0#0#9'TGroupBox'
+#16'FileInfoGroupBox'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#13'Fil'
+'esTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Con'
+'trol'#7#13'FilesTabSheet'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3
+#4#1#6'Height'#3#247#0#3'Top'#3#188#0#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6
+'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6#16'FileInfoGroupBox'#12'Clien'
+'tHeight'#3#230#0#11'ClientWidth'#3#5#2#8'TabOrder'#2#5#0#6'TLabel'#13'FileI'
+'nfoLabel'#4'Left'#2#8#6'Height'#2#13#3'Top'#2#1#5'Width'#2'I'#7'Caption'#6
+#13'FileInfoLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#0#0#9'TTabShee'
+'t'#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'#12'ClientHeight'#3
+#179#1#11'ClientWidth'#3#13#3#0#9'TGroupBox'#16'PreH2PasGroupBox'#6'Height'#3
+#179#1#5'Width'#3#13#3#5'Align'#7#8'alClient'#7'Caption'#6#16'PreH2PasGroupB'
+'ox'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#8'TabOrder'#2#0#0#0#0#9
+'TTabSheet'#20'h2pasOptionsTabSheet'#7'Caption'#6#20'h2pasOptionsTabSheet'#12
+'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#6'TLabel'#12'LibNameLabel'#21
+'AnchorSideTop.Control'#7#11'LibnameEdit'#18'AnchorSideTop.Side'#7#9'asrCent'
+'er'#4'Left'#2#6#6'Height'#2#13#3'Top'#3#25#1#5'Width'#2'Q'#17'BorderSpacing'
+'.Top'#2#10#7'Caption'#6#12'LibNameLabel'#5'Color'#7#6'clNone'#11'ParentColo'
+'r'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'AnchorSideTop.Control'#7#13'Output'
+'ExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3
+'Top'#3'9'#1#5'Width'#2'V'#7'Caption'#6#14'OutputExtLabel'#5'Color'#7#6'clNo'
+'ne'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputDirLabel'#21'AnchorSideTop.Con'
+'trol'#7#13'OutputDirEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6
+#6'Height'#2#13#3'Top'#3'V'#1#5'Width'#2'U'#7'Caption'#6#14'OutputDirLabel'#5
+'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#11'LibnameEdit'#22'Anchor'
+'SideLeft.Control'#7#12'LibNameLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'
+#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2']'#6'Height'#2#23#3'Top'#3
+#20#1#5'Width'#2'q'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13
+'OnEditingDone'#7#22'LibnameEditEditingDone'#8'TabOrder'#2#0#4'Text'#6#11'Li'
,'bnameEdit'#0#0#5'TEdit'#13'OutputExtEdit'#22'AnchorSideLeft.Control'#7#14'O'
+'utputExtLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#18'AnchorSideTop.Side'
+#7#9'asrBottom'#4'Left'#2'b'#6'Height'#2#23#3'Top'#3'4'#1#5'Width'#2'P'#18'B'
+'orderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#24'Out'
+'putExtEditEditingDone'#8'TabOrder'#2#1#4'Text'#6#13'OutputExtEdit'#0#0#5'TE'
+'dit'#13'OutputDirEdit'#22'AnchorSideLeft.Control'#7#14'OutputDirLabel'#19'A'
+'nchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputExt'
+'Edit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'a'#6'Height'#2#23#3'T'
+'op'#3'Q'#1#5'Width'#3#141#1#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
+#2#6#13'OnEditingDone'#7#24'OutputDirEditEditingDone'#8'TabOrder'#2#2#4'Text'
+#6#13'OutputDirEdit'#0#0#7'TButton'#21'OutputDirBrowseButton'#22'AnchorSideL'
+'eft.Control'#7#13'OutputDirEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21
+'AnchorSideTop.Control'#7#13'OutputDirEdit'#24'AnchorSideBottom.Control'#7#13
+'OutputDirEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#238#1#6'H'
+'eight'#2#23#3'Top'#3'Q'#1#5'Width'#2' '#7'Anchors'#11#5'akTop'#6'akLeft'#8
+'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'
+#7#26'OutputDirBrowseButtonClick'#8'TabOrder'#2#3#0#0#11'TCheckGroup'#22'h2p'
+'asOptionsCheckGroup'#4'Left'#2#6#6'Height'#3#8#1#3'Top'#2#4#5'Width'#3#0#3#8
+'AutoFill'#9#7'Caption'#6#22'h2pasOptionsCheckGroup'#28'ChildSizing.LeftRigh'
+'tSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHo'
+'rizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7
+#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScale'
+'Childs'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.'
+'Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'
+#2#2#7'Columns'#2#2#11'OnItemClick'#7#31'h2pasOptionsCheckGroupItemClick'#8
+'TabOrder'#2#4#0#0#0#9'TTabSheet'#17'PostH2PasTabSheet'#7'Caption'#6#17'Post'
+'H2PasTabSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3#0#9'TGroupBo'
+'x'#17'PostH2PasGroupBox'#6'Height'#3#179#1#5'Width'#3#13#3#5'Align'#7#8'alC'
+'lient'#7'Caption'#6#17'PostH2PasGroupBox'#12'ClientHeight'#3#162#1#11'Clien'
+'tWidth'#3#9#3#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7'Cap'
+'tion'#6#16'SettingsTabSheet'#12'ClientHeight'#3#179#1#11'ClientWidth'#3#13#3
+#0#6'TLabel'#18'H2PasFilenameLabel'#21'AnchorSideTop.Control'#7#17'H2PasFile'
+'nameEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3
+'Top'#2#9#5'Width'#2'x'#7'Caption'#6#18'H2PasFilenameLabel'#5'Color'#7#6'clN'
+'one'#11'ParentColor'#8#0#0#9'TCheckBox'#30'OpenLastProjectOnStartCheckBox'#4
+'Left'#2#6#6'Height'#2#20#3'Top'#2'*'#5'Width'#3#216#0#7'Caption'#6#30'OpenL'
+'astProjectOnStartCheckBox'#8'OnChange'#7'$OpenLastProjectOnStartCheckBoxCha'
+'nge'#8'TabOrder'#2#0#0#0#7'TButton'#20'SaveSettingsAsButton'#4'Left'#2#6#6
+'Height'#2#26#3'Top'#2'R'#5'Width'#3#137#0#8'AutoSize'#9#25'BorderSpacing.In'
+'nerBorder'#2#4#7'Caption'#6#20'SaveSettingsAsButton'#7'OnClick'#7#25'SaveSe'
+'ttingsAsButtonClick'#8'TabOrder'#2#1#0#0#5'TEdit'#17'H2PasFilenameEdit'#22
+'AnchorSideLeft.Control'#7#18'H2PasFilenameLabel'#19'AnchorSideLeft.Side'#7#9
+'asrBottom'#4'Left'#3#132#0#6'Height'#2#23#3'Top'#2#4#5'Width'#3'`'#1#18'Bor'
+'derSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#28'H2Pas'
+'FilenameEditEditingDone'#8'TabOrder'#2#2#4'Text'#6#17'H2PasFilenameEdit'#0#0
+#7'TButton'#25'h2pasFilenameBrowseButton'#22'AnchorSideLeft.Control'#7#17'H2'
+'PasFilenameEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Co'
+'ntrol'#7#17'H2PasFilenameEdit'#24'AnchorSideBottom.Control'#7#17'H2PasFilen'
+'ameEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#228#1#6'Height'
+#2#23#3'Top'#2#4#5'Width'#2'#'#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0
+#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#30'h2pas'
+'FilenameBrowseButtonClick'#8'TabOrder'#2#3#0#0#7'TButton'#17'NewSettingsBut'
+'ton'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'|'#5'Width'#2'v'#8'AutoSize'#9#25
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#17'NewSettingsButton'#7'OnClick'
+#7#22'NewSettingsButtonClick'#8'TabOrder'#2#4#0#0#0#0#7'TButton'#18'OpenSett'
+'ingsButton'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Contr'
+'ol'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#5#6'Heigh'
+'t'#2#26#3'Top'#3#214#1#5'Width'#2'|'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8
+'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#18'OpenSettingsButton'#7'OnClick'#7#23'OpenSettingsButtonClick'#8
+'TabOrder'#2#1#0#0#7'TButton'#18'SaveSettingsButton'#22'AnchorSideLeft.Contr'
+'ol'#7#18'OpenSettingsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'Anch'
+'orSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4
+'Left'#3#134#0#6'Height'#2#26#3'Top'#3#214#1#5'Width'#2'z'#7'Anchors'#11#6'a'
,'kLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSp'
+'acing.InnerBorder'#2#4#7'Caption'#6#18'SaveSettingsButton'#7'OnClick'#7#23
+'SaveSettingsButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#13'ConvertButton'#22
+'AnchorSideLeft.Control'#7#18'SaveSettingsButton'#19'AnchorSideLeft.Side'#7#9
+'asrBottom'#21'AnchorSideTop.Control'#7#18'SaveSettingsButton'#4'Left'#3#15#1
+#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
]);

View File

@ -65,6 +65,11 @@ type
OutputDirLabel: TLabel;
OutputDirBrowseButton: TButton;
// post h2pas
PostH2PasTabSheet: TTabSheet;
PostH2PasGroupBox: TGroupBox;
PostH2PasEdit: TTextConvListEditor;
// settings
SettingsTabSheet: TTabSheet;
h2pasFilenameBrowseButton: TButton;
@ -100,6 +105,7 @@ type
procedure OutputDirBrowseButtonClick(Sender: TObject);
procedure OutputDirEditEditingDone(Sender: TObject);
procedure OutputExtEditEditingDone(Sender: TObject);
procedure PostH2PasEditModified(Sender: TObject);
procedure PreH2PasEditModified(Sender: TObject);
procedure SaveSettingsAsButtonClick(Sender: TObject);
procedure SaveSettingsButtonClick(Sender: TObject);
@ -187,6 +193,10 @@ begin
// register text converter tools
TextConverterToolClasses.RegisterClass(TRemoveCPlusPlusExternCTool);
TextConverterToolClasses.RegisterClass(TRemoveEmptyCMacrosTool);
TextConverterToolClasses.RegisterClass(TReplaceEdgedBracketPairWithStar);
TextConverterToolClasses.RegisterClass(TReplaceMacro0PointerWithNULL);
TextConverterToolClasses.RegisterClass(TReplaceUnitFilenameWithUnitName);
TextConverterToolClasses.RegisterClass(TRemoveSystemTypes);
end;
{ TH2PasDialog }
@ -224,6 +234,8 @@ begin
LibNameLabel.Caption:='-l Library name';
PreH2PasTabSheet.Caption:='Before h2pas';
PreH2PasGroupBox.Caption:='Conversions before running h2pas';
PostH2PasTabSheet.Caption:='After h2pas';
PostH2PasGroupBox.Caption:='Conversions after running h2pas';
SettingsTabSheet.Caption:='Settings';
H2PasFilenameLabel.Caption:='h2pas program path';
OpenLastProjectOnStartCheckBox.Caption:='Open last settings on start';
@ -243,6 +255,15 @@ begin
Visible:=true;// Note: it's a form, and visible default is false
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);
CreateLazarusMenuItems;
@ -256,8 +277,9 @@ begin
OpenProject(Converter.CurrentProjectFilename,[]);
if Project=nil then begin
Converter.Project:=TH2PasProject.Create;
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
PostH2PasEdit.ListOfTools:=Project.PostH2PasTools;
end;
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
UpdateAll;
end;
@ -361,6 +383,7 @@ procedure TH2PasDialog.FormDestroy(Sender: TObject);
begin
FreeAndNil(fSrcEditSection);
PreH2PasEdit.ListOfTools:=nil;
PostH2PasEdit.ListOfTools:=nil;
FreeAndNil(FConverter);
end;
@ -438,6 +461,11 @@ begin
Project.OutputExt:=OutputExtEdit.Text;
end;
procedure TH2PasDialog.PostH2PasEditModified(Sender: TObject);
begin
Project.Modified:=true;
end;
procedure TH2PasDialog.PreH2PasEditModified(Sender: TObject);
begin
Project.Modified:=true;
@ -709,6 +737,7 @@ procedure TH2PasDialog.UpdateConvertPage;
begin
ClearMessages;
PreH2PasEdit.ListOfTools:=Project.PreH2PasTools;
PostH2PasEdit.ListOfTools:=Project.PostH2PasTools;
//DebugLn(['TH2PasDialog.UpdateConvertPage PreH2PasEdit.ListOfTools=',PreH2PasEdit.ListOfTools.COmponentCount]);
end;

View File

@ -522,7 +522,8 @@ begin
// Setup the regular expression search engine
RE:=TRegExpr.Create;
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
Src:=OriginalFile.Source;
if sesoWholeWord in Flags then

View File

@ -5830,6 +5830,8 @@ begin
// close file in project
Project1.CloseEditorIndex(ActiveUnitInfo.EditorIndex);
ActiveUnitInfo.Loaded:=false;
if ActiveUnitInfo<>Project1.MainUnitInfo then
ActiveUnitInfo.Source:=nil;
i:=Project1.IndexOf(ActiveUnitInfo);
if (i<>Project1.MainUnitID) and (ActiveUnitInfo.IsVirtual) then begin
Project1.RemoveUnit(i);
@ -6552,11 +6554,12 @@ function TMainIDE.DoRevertEditorFile(const Filename: string): TModalResult;
var
AnUnitInfo: TUnitInfo;
begin
Result:=mrOk;
Result:=mrCancel;
if (Project1<>nil) then begin
AnUnitInfo:=Project1.UnitInfoWithFilename(Filename,[]);
if AnUnitInfo.EditorIndex>=0 then
Result:=DoOpenEditorFile(Filename,AnUnitInfo.EditorIndex,[ofRevert]);
if (AnUnitInfo<>nil) and (AnUnitInfo.EditorIndex>=0) then
Result:=DoOpenEditorFile(AnUnitInfo.Filename,AnUnitInfo.EditorIndex,
[ofRevert]);
end;
end;

View File

@ -2977,7 +2977,8 @@ begin
AnUnitList:=nil;
AnUnitInfo:=fFirst[uilAutoRevertLocked];
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
AnUnitList:=TFPList.Create;
AnUnitList.Add(AnUnitInfo);

View File

@ -418,12 +418,14 @@ begin
SynREEngine:=TRegExpr.Create;
end;
function SynREMatches(const TheText, RegExpr, ModifierStr: string): boolean;
function SynREMatches(const TheText, RegExpr, ModifierStr: string;
StartPos: integer): boolean;
begin
InitSynREEngine;
SynREEngine.ModifierStr:=ModifierStr;
SynREEngine.Expression:=RegExpr;
Result:=SynREEngine.Exec(TheText);
SynREEngine.InputString:=TheText;
Result:=SynREEngine.ExecPos(StartPos);
end;
function SynREVar(Index: Integer): string;

View File

@ -573,7 +573,7 @@ var
Flags: TSrcEditSearchOptions;
Prompt: Boolean;
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;
if aText=nil then exit;
if SearchFor='' then exit(mrOk);
@ -587,7 +587,7 @@ begin
Result:=IDESearchInText('',Source,SearchFor,ReplaceWith,Flags,Prompt,nil);
if Result=mrOk then
aText.Source:=Source;
DebugLn(['TCustomTextReplaceTool.Execute END Result=',Result=mrOk]);
//DebugLn(['TCustomTextReplaceTool.Execute END Result=',Result=mrOk]);
end;
procedure TCustomTextReplaceTool.Assign(Source: TPersistent);

View File

@ -363,30 +363,19 @@ var
// Source Editor: First dynamic section for often used context sensitive stuff
// The items are cleared automatically after each popup.
SrcEditMenuSectionFirstDynamic: TIDEMenuSection;
// Source Editor: First static section (e.g. Find Declaration)
SrcEditMenuSectionFirstStatic: TIDEMenuSection;
// Source Editor: Find sub menu section (e.g. Procedure Jump)
SrcEditSubMenuFind: TIDEMenuSection;
// Source Editor: Clipboard section (e.g. cut, copy, paste)
SrcEditMenuSectionClipboard: TIDEMenuSection;
// Source Editor: File Specific dynamic section
// The items are cleared automatically after each popup.
SrcEditMenuSectionFileDynamic: TIDEMenuSection;
// Source Editor: Marks section
SrcEditMenuSectionMarks: TIDEMenuSection;
// Source Editor: Goto Bookmarks Submenu
SrcEditSubMenuGotoBookmarks: TIDEMenuSection;
// Source Editor: Set Bookmarks Submenu
SrcEditSubMenuSetBookmarks: TIDEMenuSection;
// Source Editor: Flags and options section
SrcEditMenuSectionFlags: TIDEMenuSection;
// Source Editor: Highlighter section
SrcEditMenuSectionHighlighter: TIDEMenuSection;
// Source Editor: Debug submenu
SrcEditSubMenuDebug: TIDEMenuSection;
// Source Editor: Move Page section
SrcEditMenuSectionMovePage: TIDEMenuSection;
// Source Editor: Refactor submenu
SrcEditSubMenuRefactor: TIDEMenuSection;
// Messages window popupmenu
@ -404,16 +393,11 @@ var
DesignerMenuSectionComponentEditor: TIDEMenuSection;
// Designer: custom dynamic section
DesignerMenuSectionCustomDynamic: TIDEMenuSection;
// Designer: align section
DesignerMenuSectionAlign: TIDEMenuSection;
// Designer: tab and order section
DesignerMenuSectionOrder: TIDEMenuSection;
DesignerMenuSectionZOrder: TIDEMenuSection;
// Designer: clipboard section
DesignerMenuSectionClipboard: TIDEMenuSection;
// Designer: miscellaneous section
DesignerMenuSectionMisc: TIDEMenuSection;
// Designer: options section
DesignerMenuSectionOptions: TIDEMenuSection;
function RegisterIDEMenuRoot(const Name: string; MenuItem: TMenuItem = nil

View File

@ -69,7 +69,7 @@ var
REException: ExceptClass; // initialized by the IDE
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
procedure REVarPos(Index: Integer; out MatchStart, MatchLength: integer);
function REVarCount: Integer;
@ -92,8 +92,8 @@ function GetPathElement(const Path: string; StartPos: integer;
// Internal stuff.
type
TREMatchesFunction = function(const TheText, RegExpr, ModifierStr: string
): boolean;
TREMatchesFunction = function(const TheText, RegExpr, ModifierStr: string;
StartPos: integer): boolean;
TREVarFunction = function(Index: Integer): string;
TREVarPosProcedure = procedure(Index: Integer;
out MatchStart, MatchLength: integer);
@ -114,9 +114,9 @@ var
implementation
function REMatches(const TheText, RegExpr: string;
const ModifierStr: string): boolean;
const ModifierStr: string; StartPos: integer): boolean;
begin
Result:=REMatchesFunction(TheText,RegExpr,ModifierStr);
Result:=REMatchesFunction(TheText,RegExpr,ModifierStr,StartPos);
end;
function REVar(Index: Integer): string;