IDE: lfmunitresource: break cycle

git-svn-id: trunk@42890 -
This commit is contained in:
mattias 2013-09-19 20:01:11 +00:00
parent ef779a623b
commit 0b54eaf3c2
4 changed files with 16 additions and 16 deletions

View File

@ -46,6 +46,9 @@ type
TUnitResourcefileFormatClass = class of TUnitResourcefileFormat; TUnitResourcefileFormatClass = class of TUnitResourcefileFormat;
TUnitResourcefileFormatArr = array of TUnitResourcefileFormatClass; TUnitResourcefileFormatArr = array of TUnitResourcefileFormatClass;
var
LFMUnitResourceFileFormat: TUnitResourcefileFormatClass = nil;// set by IDE
procedure RegisterUnitResourcefileFormat(AResourceFileFormat: TUnitResourcefileFormatClass); procedure RegisterUnitResourcefileFormat(AResourceFileFormat: TUnitResourcefileFormatClass);
function GetUnitResourcefileFormats: TUnitResourcefileFormatArr; function GetUnitResourcefileFormats: TUnitResourcefileFormatArr;

View File

@ -42,9 +42,10 @@ uses
{$IFDEF IDE_MEM_CHECK} {$IFDEF IDE_MEM_CHECK}
MemCheck, MemCheck,
{$ENDIF} {$ENDIF}
Classes, SysUtils, AvgLvlTree, BasicCodeTools, TypInfo, LCLProc, LResources, Classes, SysUtils, TypInfo, AvgLvlTree, BasicCodeTools, LCLProc, LResources,
Forms, Controls, LCLMemManager, LCLIntf, Dialogs, PropEditUtils, PropEdits, Forms, Controls, LCLMemManager, LCLIntf, Dialogs,
IDEProcs, PackageDefs, BasePkgManager, UnitResources, lfmUnitResource; PropEditUtils, PropEdits,
IDEProcs, PackageDefs, BasePkgManager, UnitResources;
type type
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -1148,7 +1149,7 @@ begin
SubReader:=nil; SubReader:=nil;
DestroyDriver:=false; DestroyDriver:=false;
try try
CreateReader(BinStream,TLFMUnitResourcefileFormat,SubReader,DestroyDriver); CreateReader(BinStream,LFMUnitResourcefileFormat,SubReader,DestroyDriver);
// The stream contains only the diff to the Ancestor instance, // The stream contains only the diff to the Ancestor instance,
// => give it the Ancestor instance // => give it the Ancestor instance
SubReader.Ancestor:=Ancestor; SubReader.Ancestor:=Ancestor;
@ -1310,7 +1311,7 @@ begin
try try
DestroyDriver:=false; DestroyDriver:=false;
InitReading; InitReading;
CreateReader(BinStream,TLFMUnitResourcefileFormat, Reader,DestroyDriver); CreateReader(BinStream,LFMUnitResourcefileFormat, Reader,DestroyDriver);
{$IFDEF VerboseJITForms} {$IFDEF VerboseJITForms}
debugln('[TJITComponentList.AddJITChildComponentFromStream] B'); debugln('[TJITComponentList.AddJITChildComponentFromStream] B');
{$ENDIF} {$ENDIF}

View File

@ -31,9 +31,10 @@ interface
uses uses
Classes, SysUtils, Classes, SysUtils,
LCLMemManager, LCLMemManager, Forms, LResources,
Forms, CodeCache, CodeToolManager, LazFileCache,
UnitResources, LazFileCache; UnitResources,
CheckLFMDlg;
type type
@ -56,12 +57,6 @@ type
implementation implementation
uses
LResources,
CodeCache,
CodeToolManager,
CheckLFMDlg;
{ TLFMUnitResourcefileFormat } { TLFMUnitResourcefileFormat }
class function TLFMUnitResourcefileFormat.FindResourceDirective(Source: TObject): boolean; class function TLFMUnitResourcefileFormat.FindResourceDirective(Source: TObject): boolean;
@ -240,5 +235,6 @@ end;
initialization initialization
RegisterUnitResourcefileFormat(TLFMUnitResourcefileFormat); RegisterUnitResourcefileFormat(TLFMUnitResourcefileFormat);
LFMUnitResourceFileFormat:=TLFMUnitResourcefileFormat;
end. end.

View File

@ -60,7 +60,7 @@ uses
SynEdit, SynEdit,
// IDE // IDE
CompOptsModes, ProjectResources, LazConf, W32Manifest, ProjectIcon, CompOptsModes, ProjectResources, LazConf, W32Manifest, ProjectIcon,
LazarusIDEStrConsts, CompilerOptions, lfmUnitResource, LazarusIDEStrConsts, CompilerOptions,
TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs, TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs,
FileReferenceList, EditDefineTree, ModeMatrixOpts, PackageDefs, PackageSystem, FileReferenceList, EditDefineTree, ModeMatrixOpts, PackageDefs, PackageSystem,
IDEDialogs; IDEDialogs;
@ -2380,7 +2380,7 @@ begin
end; end;
end; end;
end; end;
FUnitResourceFileformat := TLFMUnitResourcefileFormat; FUnitResourceFileformat := LFMUnitResourcefileFormat;
end; end;
Result := FUnitResourceFileformat; Result := FUnitResourceFileformat;
end; end;