Make Project and Package inherit from a new TProjPack base class.

git-svn-id: trunk@45805 -
This commit is contained in:
juha 2014-07-06 22:38:02 +00:00
parent 539b683d28
commit ad6ac0e2a3
7 changed files with 12 additions and 26 deletions

View File

@ -117,7 +117,7 @@ const
type type
{ TLazCompilerOptions } { TLazCompilerOptions }
TLazCompilerOptions = class(TAbstractIDECompilerOptions) TLazCompilerOptions = class(TAbstractIDEOptions)
private private
FOnModified: TNotifyEvent; FOnModified: TNotifyEvent;
fOwner: TObject; fOwner: TObject;

View File

@ -14,13 +14,12 @@
<ShowGenInfo Value="False"/> <ShowGenInfo Value="False"/>
</Verbosity> </Verbosity>
<CustomOptions Value="$(IDEBuildOptions)"/> <CustomOptions Value="$(IDEBuildOptions)"/>
<CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>
<Description Value="IDEIntf - the interface units for the Lazarus IDE"/> <Description Value="IDEIntf - the interface units for the Lazarus IDE"/>
<License Value="Modified LPGL2"/> <License Value="Modified LPGL2"/>
<Version Major="1"/> <Version Major="1"/>
<Files Count="75"> <Files Count="76">
<Item1> <Item1>
<Filename Value="actionseditor.pas"/> <Filename Value="actionseditor.pas"/>
<UnitName Value="ActionsEditor"/> <UnitName Value="ActionsEditor"/>
@ -322,6 +321,10 @@
<Filename Value="unitresources.pas"/> <Filename Value="unitresources.pas"/>
<UnitName Value="UnitResources"/> <UnitName Value="UnitResources"/>
</Item75> </Item75>
<Item76>
<Filename Value="projpackintf.pas"/>
<UnitName Value="projpackintf"/>
</Item76>
</Files> </Files>
<LazDoc Paths="docs"/> <LazDoc Paths="docs"/>
<i18n> <i18n>

View File

@ -19,7 +19,7 @@ uses
NewItemIntf, ObjectInspector, ObjInspStrConsts, OIFavoriteProperties, NewItemIntf, ObjectInspector, ObjInspStrConsts, OIFavoriteProperties,
PackageIntf, ProjectIntf, ProjectResourcesIntf, PropEdits, PropEditUtils, PackageIntf, ProjectIntf, ProjectResourcesIntf, PropEdits, PropEditUtils,
SrcEditorIntf, StatusBarPropEdit, StringsPropEditDlg, TextTools, SrcEditorIntf, StatusBarPropEdit, StringsPropEditDlg, TextTools,
TreeViewPropEdit, UnitResources, LazarusPackageIntf; TreeViewPropEdit, UnitResources, ProjPackIntf, LazarusPackageIntf;
implementation implementation

View File

@ -103,7 +103,6 @@ type
TAbstractIDEEnvironmentOptions = class(TAbstractIDEOptions); TAbstractIDEEnvironmentOptions = class(TAbstractIDEOptions);
TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions); TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions);
TAbstractIDECompilerOptions = class(TAbstractIDEOptions);
TOnLoadIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; TOnLoadIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object;
TOnSaveIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; TOnSaveIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object;

View File

@ -17,7 +17,7 @@ interface
uses uses
Classes, SysUtils, contnrs, LCLProc, Forms, LazConfigStorage, Classes, SysUtils, contnrs, LCLProc, Forms, LazConfigStorage,
NewItemIntf, CompOptsIntf, IDEOptionsIntf; NewItemIntf, ProjPackIntf, CompOptsIntf, IDEOptionsIntf;
const const
PkgDescGroupName = 'Package'; PkgDescGroupName = 'Package';
@ -74,20 +74,6 @@ type
TIDEPackage = class; TIDEPackage = class;
{$M+}
TIDEOwnedFile = class
protected
function GetFilename: string; virtual; abstract;
procedure SetFilename(const AValue: string); virtual; abstract;
public
function GetFullFilename: string; virtual; abstract; // if no path, the file was not saved yet
function GetShortFilename(UseUp: boolean): string; virtual; abstract;
function GetFileOwner: TObject; virtual; abstract;
function GetFileOwnerName: string; virtual; abstract;
property Filename: string read GetFilename write SetFilename;
end;
{$M-}
{ TLazPackageFile } { TLazPackageFile }
TLazPackageFile = class(TIDEOwnedFile) TLazPackageFile = class(TIDEOwnedFile)
@ -112,11 +98,10 @@ type
{ TLazPackageID } { TLazPackageID }
TLazPackageID = class(TPersistent) TLazPackageID = class(TProjPack)
private private
FIDAsWord: string; FIDAsWord: string;
protected protected
FIDEOptions: TAbstractIDEOptions; //actually TPackageIDEOptions;
FName: string; FName: string;
FVersion: TPkgVersion; FVersion: TPkgVersion;
FIDAsString: string; FIDAsString: string;

View File

@ -17,7 +17,7 @@ interface
uses uses
Classes, SysUtils, LCLProc, FileUtil, Controls, Forms, AvgLvlTree, Classes, SysUtils, LCLProc, FileUtil, Controls, Forms, AvgLvlTree,
NewItemIntf, ObjInspStrConsts, IDEOptionsIntf, CompOptsIntf, PackageIntf; NewItemIntf, ObjInspStrConsts, ProjPackIntf, IDEOptionsIntf, CompOptsIntf;
const const
FileDescGroupName = 'File'; FileDescGroupName = 'File';
@ -368,7 +368,7 @@ type
petUnit petUnit
); );
TLazProject = class(TPersistent) TLazProject = class(TProjPack)
private private
FCleanOutputFileMask: string; FCleanOutputFileMask: string;
FCleanSourcesFileMask: string; FCleanSourcesFileMask: string;
@ -388,7 +388,6 @@ type
procedure SetFPDocPaths(const AValue: string); procedure SetFPDocPaths(const AValue: string);
procedure SetUseAppBundle(AValue: Boolean); procedure SetUseAppBundle(AValue: Boolean);
protected protected
FIDEOptions: TAbstractIDEOptions; //actually TProjectIDEOptions;
FLazCompilerOptions: TLazCompilerOptions; FLazCompilerOptions: TLazCompilerOptions;
FFlags: TProjectFlags; FFlags: TProjectFlags;
FResources: TObject; FResources: TObject;

View File

@ -52,7 +52,7 @@ uses
CodeToolsConfig, CodeToolManager, CodeCache, CodeToolsStructs, BasicCodeTools, CodeToolsConfig, CodeToolManager, CodeCache, CodeToolsStructs, BasicCodeTools,
FileProcs, CodeTree, Laz2_XMLCfg, lazutf8classes, LazFileUtils, LazFileCache, FileProcs, CodeTree, Laz2_XMLCfg, lazutf8classes, LazFileUtils, LazFileCache,
// IDE Interface // IDE Interface
SrcEditorIntf, NewItemIntf, ProjectIntf, PackageIntf, CompOptsIntf, SrcEditorIntf, NewItemIntf, ProjPackIntf, ProjectIntf, PackageIntf, CompOptsIntf,
MenuIntf, IDEWindowIntf, MenuIntf, IDEWindowIntf,
{$IFNDEF EnableOldExtTools} {$IFNDEF EnableOldExtTools}
IDEExternToolIntf, IDEExternToolIntf,