mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 06:20:42 +02:00
IDE: clean up
git-svn-id: trunk@30998 -
This commit is contained in:
parent
1071432458
commit
3b9b3f2172
@ -802,7 +802,7 @@ begin
|
|||||||
// AddPackageDependency('LCL');
|
// AddPackageDependency('LCL');
|
||||||
// ToDo: make an option to add NoGUI to Project.CompilerOptions.LCLWidgetType.
|
// ToDo: make an option to add NoGUI to Project.CompilerOptions.LCLWidgetType.
|
||||||
if fProjPack is TProject then
|
if fProjPack is TProject then
|
||||||
PkgBoss.AddDefaultDependencies(fProjPack as TProject);
|
PkgBoss.OpenProjectDependencies(fProjPack as TProject,true);
|
||||||
CustomDefinesChanged;
|
CustomDefinesChanged;
|
||||||
|
|
||||||
SetCompilerModeForDefineTempl(CustomDefines);
|
SetCompilerModeForDefineTempl(CustomDefines);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
object BuildProjectDialog: TBuildProjectDialog
|
object CleanBuildProjectDialog: TCleanBuildProjectDialog
|
||||||
Left = 275
|
Left = 275
|
||||||
Height = 492
|
Height = 492
|
||||||
Top = 250
|
Top = 250
|
||||||
Width = 537
|
Width = 537
|
||||||
Caption = 'BuildProjectDialog'
|
Caption = 'CleanBuildProjectDialog'
|
||||||
ClientHeight = 492
|
ClientHeight = 492
|
||||||
ClientWidth = 537
|
ClientWidth = 537
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
@ -171,7 +171,6 @@ object BuildProjectDialog: TBuildProjectDialog
|
|||||||
ClientWidth = 517
|
ClientWidth = 517
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
object FilesTreeView: TTreeView
|
object FilesTreeView: TTreeView
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 238
|
Height = 238
|
||||||
Top = 0
|
Top = 0
|
||||||
|
@ -45,9 +45,9 @@ type
|
|||||||
Filename: string;
|
Filename: string;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TBuildProjectDialog }
|
{ TCleanBuildProjectDialog }
|
||||||
|
|
||||||
TBuildProjectDialog = class(TForm)
|
TCleanBuildProjectDialog = class(TForm)
|
||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
DeleteButton: TButton;
|
DeleteButton: TButton;
|
||||||
PkgOutCheckBox: TCheckBox;
|
PkgOutCheckBox: TCheckBox;
|
||||||
@ -103,22 +103,22 @@ implementation
|
|||||||
|
|
||||||
function ShowBuildProjectDialog(AProject: TProject): TModalResult;
|
function ShowBuildProjectDialog(AProject: TProject): TModalResult;
|
||||||
var
|
var
|
||||||
BuildProjectDialog: TBuildProjectDialog;
|
CleanBuildProjectDialog: TCleanBuildProjectDialog;
|
||||||
begin
|
begin
|
||||||
BuildProjectDialog:=TBuildProjectDialog.Create(nil);
|
CleanBuildProjectDialog:=TCleanBuildProjectDialog.Create(nil);
|
||||||
try
|
try
|
||||||
BuildProjectDialog.Init(AProject);
|
CleanBuildProjectDialog.Init(AProject);
|
||||||
Result:=BuildProjectDialog.ShowModal;
|
Result:=CleanBuildProjectDialog.ShowModal;
|
||||||
finally
|
finally
|
||||||
BuildProjectDialog.Free;
|
CleanBuildProjectDialog.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
{ TBuildProjectDialog }
|
{ TCleanBuildProjectDialog }
|
||||||
|
|
||||||
procedure TBuildProjectDialog.FormCreate(Sender: TObject);
|
procedure TCleanBuildProjectDialog.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Caption:=lisCleanUpAndBuildProject;
|
Caption:=lisCleanUpAndBuildProject;
|
||||||
|
|
||||||
@ -139,14 +139,14 @@ begin
|
|||||||
ButtonPanel1.OKButton.ModalResult:=mrNone;
|
ButtonPanel1.OKButton.ModalResult:=mrNone;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.FormDestroy(Sender: TObject);
|
procedure TCleanBuildProjectDialog.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ClearFilesTreeView;
|
ClearFilesTreeView;
|
||||||
FProject:=nil;
|
FProject:=nil;
|
||||||
IdleConnected:=false;
|
IdleConnected:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.FormClose(Sender: TObject;
|
procedure TCleanBuildProjectDialog.FormClose(Sender: TObject;
|
||||||
var CloseAction: TCloseAction);
|
var CloseAction: TCloseAction);
|
||||||
|
|
||||||
procedure StoreCombo(AComboBox: TComboBox);
|
procedure StoreCombo(AComboBox: TComboBox);
|
||||||
@ -169,18 +169,18 @@ begin
|
|||||||
InputHistories.HistoryLists.GetList(hlCleanBuildFileMask,true).Assign(ProjOutMaskComboBox.Items);
|
InputHistories.HistoryLists.GetList(hlCleanBuildFileMask,true).Assign(ProjOutMaskComboBox.Items);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.ButtonPanel1OKButtonClick(Sender: TObject);
|
procedure TCleanBuildProjectDialog.ButtonPanel1OKButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if DeleteFiles<>mrOk then exit;
|
if DeleteFiles<>mrOk then exit;
|
||||||
ModalResult:=mrOk;
|
ModalResult:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.DeleteButtonClick(Sender: TObject);
|
procedure TCleanBuildProjectDialog.DeleteButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
DeleteFiles;
|
DeleteFiles;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.FilesTreeViewMouseDown(Sender: TObject;
|
procedure TCleanBuildProjectDialog.FilesTreeViewMouseDown(Sender: TObject;
|
||||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
var
|
var
|
||||||
Node: TTreeNode;
|
Node: TTreeNode;
|
||||||
@ -201,7 +201,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.FormResize(Sender: TObject);
|
procedure TCleanBuildProjectDialog.FormResize(Sender: TObject);
|
||||||
var
|
var
|
||||||
r: Integer;
|
r: Integer;
|
||||||
begin
|
begin
|
||||||
@ -211,36 +211,36 @@ begin
|
|||||||
ProjOutMaskComboBox.Left:=r+10;
|
ProjOutMaskComboBox.Left:=r+10;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.PkgOutCheckBoxChange(Sender: TObject);
|
procedure TCleanBuildProjectDialog.PkgOutCheckBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
PkgOutMaskComboBox.Enabled:=PkgOutCheckBox.Checked;
|
PkgOutMaskComboBox.Enabled:=PkgOutCheckBox.Checked;
|
||||||
UpdateFilesTreeView;
|
UpdateFilesTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.PkgSrcCheckBoxChange(Sender: TObject);
|
procedure TCleanBuildProjectDialog.PkgSrcCheckBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
PkgSrcMaskComboBox.Enabled:=PkgSrcCheckBox.Checked;
|
PkgSrcMaskComboBox.Enabled:=PkgSrcCheckBox.Checked;
|
||||||
UpdateFilesTreeView;
|
UpdateFilesTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.ProjOutCheckBoxChange(Sender: TObject);
|
procedure TCleanBuildProjectDialog.ProjOutCheckBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ProjOutMaskComboBox.Enabled:=ProjOutCheckBox.Checked;
|
ProjOutMaskComboBox.Enabled:=ProjOutCheckBox.Checked;
|
||||||
UpdateFilesTreeView;
|
UpdateFilesTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.ProjOutMaskComboBoxChange(Sender: TObject);
|
procedure TCleanBuildProjectDialog.ProjOutMaskComboBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
UpdateFilesTreeView;
|
UpdateFilesTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.ProjSrcCheckBoxChange(Sender: TObject);
|
procedure TCleanBuildProjectDialog.ProjSrcCheckBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ProjSrcMaskComboBox.Enabled:=ProjSrcCheckBox.Checked;
|
ProjSrcMaskComboBox.Enabled:=ProjSrcCheckBox.Checked;
|
||||||
UpdateFilesTreeView;
|
UpdateFilesTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.SetIdleConnected(const AValue: boolean);
|
procedure TCleanBuildProjectDialog.SetIdleConnected(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
if FIdleConnected=AValue then exit;
|
if FIdleConnected=AValue then exit;
|
||||||
FIdleConnected:=AValue;
|
FIdleConnected:=AValue;
|
||||||
@ -250,7 +250,7 @@ begin
|
|||||||
Application.RemoveOnIdleHandler(@OnIdle);
|
Application.RemoveOnIdleHandler(@OnIdle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.OnIdle(Sender: TObject; var Done: Boolean);
|
procedure TCleanBuildProjectDialog.OnIdle(Sender: TObject; var Done: Boolean);
|
||||||
begin
|
begin
|
||||||
if FProject=nil then exit;
|
if FProject=nil then exit;
|
||||||
if not FUpdateNeeded then exit;
|
if not FUpdateNeeded then exit;
|
||||||
@ -258,7 +258,7 @@ begin
|
|||||||
UpdateFilesTreeView(true);
|
UpdateFilesTreeView(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.ClearFilesTreeView;
|
procedure TCleanBuildProjectDialog.ClearFilesTreeView;
|
||||||
var
|
var
|
||||||
Node: TTreeNode;
|
Node: TTreeNode;
|
||||||
begin
|
begin
|
||||||
@ -271,7 +271,7 @@ begin
|
|||||||
FilesTreeView.Items.Clear;
|
FilesTreeView.Items.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.UpdateFilesTreeView(Immediately: boolean);
|
procedure TCleanBuildProjectDialog.UpdateFilesTreeView(Immediately: boolean);
|
||||||
|
|
||||||
function CreateTVChildCounts(TVNode: TTreeNode): integer;
|
function CreateTVChildCounts(TVNode: TTreeNode): integer;
|
||||||
var
|
var
|
||||||
@ -318,21 +318,21 @@ begin
|
|||||||
FilesTreeView.EndUpdate;
|
FilesTreeView.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddProjOutDirectory;
|
procedure TCleanBuildProjectDialog.AddProjOutDirectory;
|
||||||
begin
|
begin
|
||||||
AddDirectory('Project output directory',
|
AddDirectory('Project output directory',
|
||||||
FProject.CompilerOptions.GetUnitOutputDirectory(false),
|
FProject.CompilerOptions.GetUnitOutputDirectory(false),
|
||||||
ProjOutMaskComboBox.Text);
|
ProjOutMaskComboBox.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddProjSrcDirectories;
|
procedure TCleanBuildProjectDialog.AddProjSrcDirectories;
|
||||||
begin
|
begin
|
||||||
AddDirectories('Project output directory',
|
AddDirectories('Project output directory',
|
||||||
FProject.SourceDirectories.CreateSearchPathFromAllFiles,
|
FProject.SourceDirectories.CreateSearchPathFromAllFiles,
|
||||||
ProjSrcMaskComboBox.Text);
|
ProjSrcMaskComboBox.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddPkgOutDirectories;
|
procedure TCleanBuildProjectDialog.AddPkgOutDirectories;
|
||||||
var
|
var
|
||||||
List: TFPList;
|
List: TFPList;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -352,7 +352,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddPkgSrcDirectory;
|
procedure TCleanBuildProjectDialog.AddPkgSrcDirectory;
|
||||||
var
|
var
|
||||||
List: TFPList;
|
List: TFPList;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -372,7 +372,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddDirectory(aTVPath, aDirectory,
|
procedure TCleanBuildProjectDialog.AddDirectory(aTVPath, aDirectory,
|
||||||
aFileMask: string);
|
aFileMask: string);
|
||||||
var
|
var
|
||||||
Cache: TCTDirectoryCache;
|
Cache: TCTDirectoryCache;
|
||||||
@ -464,7 +464,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.AddDirectories(aTVPath, aSearchPath,
|
procedure TCleanBuildProjectDialog.AddDirectories(aTVPath, aSearchPath,
|
||||||
aFileMask: string);
|
aFileMask: string);
|
||||||
var
|
var
|
||||||
Directory: String;
|
Directory: String;
|
||||||
@ -478,7 +478,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBuildProjectDialog.GetAllFilesFromTree: TFilenameToStringTree;
|
function TCleanBuildProjectDialog.GetAllFilesFromTree: TFilenameToStringTree;
|
||||||
var
|
var
|
||||||
Node: TTreeNode;
|
Node: TTreeNode;
|
||||||
Item: TBuildProjectDialogItem;
|
Item: TBuildProjectDialogItem;
|
||||||
@ -496,7 +496,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBuildProjectDialog.DeleteFiles: TModalResult;
|
function TCleanBuildProjectDialog.DeleteFiles: TModalResult;
|
||||||
var
|
var
|
||||||
Files: TFilenameToStringTree;
|
Files: TFilenameToStringTree;
|
||||||
Node: TAVLTreeNode;
|
Node: TAVLTreeNode;
|
||||||
@ -561,7 +561,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildProjectDialog.Init(AProject: TProject);
|
procedure TCleanBuildProjectDialog.Init(AProject: TProject);
|
||||||
var
|
var
|
||||||
List: THistoryList;
|
List: THistoryList;
|
||||||
begin
|
begin
|
||||||
|
@ -10450,7 +10450,7 @@ begin
|
|||||||
if ProjInspector<>nil then ProjInspector.LazProject:=Project1;
|
if ProjInspector<>nil then ProjInspector.LazProject:=Project1;
|
||||||
|
|
||||||
// add and load default required packages
|
// add and load default required packages
|
||||||
PkgBoss.AddDefaultDependencies(Project1);
|
PkgBoss.OpenProjectDependencies(Project1,true);
|
||||||
|
|
||||||
// rebuild codetools defines
|
// rebuild codetools defines
|
||||||
MainBuildBoss.SetBuildTargetProject1(false);
|
MainBuildBoss.SetBuildTargetProject1(false);
|
||||||
@ -10986,7 +10986,7 @@ begin
|
|||||||
IncreaseCompilerParseStamp;
|
IncreaseCompilerParseStamp;
|
||||||
|
|
||||||
// add and load default required packages
|
// add and load default required packages
|
||||||
PkgBoss.AddDefaultDependencies(Project1);
|
PkgBoss.OpenProjectDependencies(Project1,true);
|
||||||
|
|
||||||
Result:=DoCompleteLoadingProjectInfo;
|
Result:=DoCompleteLoadingProjectInfo;
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
@ -89,7 +89,6 @@ type
|
|||||||
// project
|
// project
|
||||||
function OpenProjectDependencies(AProject: TProject;
|
function OpenProjectDependencies(AProject: TProject;
|
||||||
ReportMissing: boolean): TModalResult; virtual; abstract;
|
ReportMissing: boolean): TModalResult; virtual; abstract;
|
||||||
procedure AddDefaultDependencies(AProject: TProject); virtual; abstract;
|
|
||||||
function AddProjectDependency(AProject: TProject; APackage: TLazPackage;
|
function AddProjectDependency(AProject: TProject; APackage: TLazPackage;
|
||||||
OnlyTestIfPossible: boolean = false): TModalResult; virtual; abstract;
|
OnlyTestIfPossible: boolean = false): TModalResult; virtual; abstract;
|
||||||
function AddProjectDependency(AProject: TProject;
|
function AddProjectDependency(AProject: TProject;
|
||||||
|
@ -248,7 +248,6 @@ type
|
|||||||
Interactive: boolean): TModalResult; override;
|
Interactive: boolean): TModalResult; override;
|
||||||
function CanOpenDesignerForm(AnUnitInfo: TUnitInfo;
|
function CanOpenDesignerForm(AnUnitInfo: TUnitInfo;
|
||||||
Interactive: boolean): TModalResult; override;
|
Interactive: boolean): TModalResult; override;
|
||||||
procedure AddDefaultDependencies(AProject: TProject); override;
|
|
||||||
function AddProjectDependency(AProject: TProject; APackage: TLazPackage;
|
function AddProjectDependency(AProject: TProject; APackage: TLazPackage;
|
||||||
OnlyTestIfPossible: boolean = false): TModalResult; override;
|
OnlyTestIfPossible: boolean = false): TModalResult; override;
|
||||||
function AddProjectDependency(AProject: TProject;
|
function AddProjectDependency(AProject: TProject;
|
||||||
@ -1862,11 +1861,6 @@ begin
|
|||||||
PkgLinks.SaveUserLinks;
|
PkgLinks.SaveUserLinks;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPkgManager.AddDefaultDependencies(AProject: TProject);
|
|
||||||
begin
|
|
||||||
OpenProjectDependencies(AProject,true);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPkgManager.AddProjectDependency(AProject: TProject;
|
function TPkgManager.AddProjectDependency(AProject: TProject;
|
||||||
APackage: TLazPackage; OnlyTestIfPossible: boolean): TModalResult;
|
APackage: TLazPackage; OnlyTestIfPossible: boolean): TModalResult;
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user