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;
TUnitResourcefileFormatArr = array of TUnitResourcefileFormatClass;
var
LFMUnitResourceFileFormat: TUnitResourcefileFormatClass = nil;// set by IDE
procedure RegisterUnitResourcefileFormat(AResourceFileFormat: TUnitResourcefileFormatClass);
function GetUnitResourcefileFormats: TUnitResourcefileFormatArr;

View File

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

View File

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

View File

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