mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 08:00:34 +02:00
IDE: show skipped designtime only packages
git-svn-id: trunk@32137 -
This commit is contained in:
parent
d5ad4ab713
commit
c72bad92c1
@ -36,10 +36,10 @@ unit compiler_inherited_options;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ComCtrls, ExtCtrls,
|
StdCtrls, ComCtrls, ExtCtrls,
|
||||||
CodeToolsCfgScript, IDEOptionsIntf, IDEImagesIntf, ProjectIntf, CompOptsIntf,
|
CodeToolsCfgScript, IDEOptionsIntf, IDEImagesIntf, ProjectIntf, CompOptsIntf,
|
||||||
Project, CompilerOptions, LazarusIDEStrConsts, IDEProcs;
|
Project, PackageDefs, CompilerOptions, LazarusIDEStrConsts, IDEProcs;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -150,9 +150,28 @@ var
|
|||||||
ChildNode.SelectedIndex := ChildNode.ImageIndex;
|
ChildNode.SelectedIndex := ChildNode.ImageIndex;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
SkippedPkgList: TFPList;
|
||||||
|
AProject: TProject;
|
||||||
|
Pkg: TLazPackage;
|
||||||
begin
|
begin
|
||||||
OptionsList := nil;
|
OptionsList := nil;
|
||||||
|
//debugln(['TCompilerInheritedOptionsFrame.UpdateInheritedTree START CompilerOpts=',DbgSName(CompilerOpts)]);
|
||||||
CompilerOpts.GetInheritedCompilerOptions(OptionsList);
|
CompilerOpts.GetInheritedCompilerOptions(OptionsList);
|
||||||
|
SkippedPkgList:=nil;
|
||||||
|
try
|
||||||
|
if CompilerOpts is TProjectCompilerOptions then begin
|
||||||
|
AProject:=TProjectCompilerOptions(CompilerOpts).LazProject;
|
||||||
|
AProject.GetAllRequiredPackages(SkippedPkgList);
|
||||||
|
if (SkippedPkgList<>nil)
|
||||||
|
and (not (pfUseDesignTimePackages in AProject.Flags)) then begin
|
||||||
|
// keep design time only packages
|
||||||
|
for i:=SkippedPkgList.Count-1 downto 0 do
|
||||||
|
if TLazPackage(SkippedPkgList[i]).PackageType<>lptDesignTime then
|
||||||
|
SkippedPkgList.Delete(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//debugln(['TCompilerInheritedOptionsFrame.UpdateInheritedTree END']);
|
||||||
InhTreeView.BeginUpdate;
|
InhTreeView.BeginUpdate;
|
||||||
ClearInheritedTree;
|
ClearInheritedTree;
|
||||||
if OptionsList <> nil then
|
if OptionsList <> nil then
|
||||||
@ -225,7 +244,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
InhTreeView.Items.Add(nil, lisNoCompilerOptionsInherited);
|
InhTreeView.Items.Add(nil, lisNoCompilerOptionsInherited);
|
||||||
end;
|
end;
|
||||||
|
if SkippedPkgList<>nil then begin
|
||||||
|
for i:=0 to SkippedPkgList.Count-1 do begin
|
||||||
|
Pkg:=TLazPackage(SkippedPkgList[i]);
|
||||||
|
AncestorNode := InhTreeView.Items.Add(nil, '');
|
||||||
|
AncestorNode.Text := Format(lisExcludedAtRunTime, [Pkg.Name]);
|
||||||
|
AncestorNode.ImageIndex := ImageIndexPackage;
|
||||||
|
AncestorNode.SelectedIndex := AncestorNode.ImageIndex;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
InhTreeView.EndUpdate;
|
InhTreeView.EndUpdate;
|
||||||
|
finally
|
||||||
|
SkippedPkgList.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCompilerInheritedOptionsFrame.Destroy;
|
destructor TCompilerInheritedOptionsFrame.Destroy;
|
||||||
|
@ -1773,6 +1773,7 @@ resourcestring
|
|||||||
dlgCOOpts = 'Options: ';
|
dlgCOOpts = 'Options: ';
|
||||||
dlgCOAsmStyle = 'Assembler style:';
|
dlgCOAsmStyle = 'Assembler style:';
|
||||||
lisNoCompilerOptionsInherited = 'No compiler options inherited.';
|
lisNoCompilerOptionsInherited = 'No compiler options inherited.';
|
||||||
|
lisExcludedAtRunTime = '%s excluded at run time';
|
||||||
lisAllInheritedOptions = 'All inherited options';
|
lisAllInheritedOptions = 'All inherited options';
|
||||||
lisunitPath = 'unit path';
|
lisunitPath = 'unit path';
|
||||||
lisincludePath = 'include path';
|
lisincludePath = 'include path';
|
||||||
|
Loading…
Reference in New Issue
Block a user