mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 11:59:45 +02:00
IDE: clean up
git-svn-id: trunk@48200 -
This commit is contained in:
parent
7dde88bfad
commit
3ec3dc8842
@ -45,7 +45,7 @@ uses
|
|||||||
DiskDiffsDialog, InputHistory, CheckLFMDlg, LCLMemManager, CodeToolManager,
|
DiskDiffsDialog, InputHistory, CheckLFMDlg, LCLMemManager, CodeToolManager,
|
||||||
CodeToolsStructs, ConvCodeTool, CodeCache, CodeTree, FindDeclarationTool,
|
CodeToolsStructs, ConvCodeTool, CodeCache, CodeTree, FindDeclarationTool,
|
||||||
BasicCodeTools, SynEdit, UnitResources, IDEExternToolIntf, ObjectInspector,
|
BasicCodeTools, SynEdit, UnitResources, IDEExternToolIntf, ObjectInspector,
|
||||||
ExtToolDialog, PublishModule, etMessagesWnd;
|
PublishModule, etMessagesWnd;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ type
|
|||||||
// methods for 'open unit' and 'open main unit'
|
// methods for 'open unit' and 'open main unit'
|
||||||
private
|
private
|
||||||
function LoadResourceFile(AnUnitInfo: TUnitInfo; var LFMCode, LRSCode: TCodeBuffer;
|
function LoadResourceFile(AnUnitInfo: TUnitInfo; var LFMCode, LRSCode: TCodeBuffer;
|
||||||
IgnoreSourceErrors, AutoCreateResourceCode, ShowAbort: boolean): TModalResult;
|
AutoCreateResourceCode, ShowAbort: boolean): TModalResult;
|
||||||
function FindBaseComponentClass(AnUnitInfo: TUnitInfo; const AComponentClassName,
|
function FindBaseComponentClass(AnUnitInfo: TUnitInfo; const AComponentClassName,
|
||||||
DescendantClassName: string; out AComponentClass: TComponentClass): boolean;
|
DescendantClassName: string; out AComponentClass: TComponentClass): boolean;
|
||||||
function LoadAncestorDependencyHidden(AnUnitInfo: TUnitInfo;
|
function LoadAncestorDependencyHidden(AnUnitInfo: TUnitInfo;
|
||||||
@ -237,8 +237,8 @@ type
|
|||||||
private
|
private
|
||||||
function ShowSaveProjectAsDialog(UseMainSourceFile: boolean): TModalResult;
|
function ShowSaveProjectAsDialog(UseMainSourceFile: boolean): TModalResult;
|
||||||
function SaveProjectInfo(var Flags: TSaveFlags): TModalResult;
|
function SaveProjectInfo(var Flags: TSaveFlags): TModalResult;
|
||||||
procedure GetMainUnit(var MainUnitInfo: TUnitInfo;
|
procedure GetMainUnit(out MainUnitInfo: TUnitInfo;
|
||||||
var MainUnitSrcEdit: TSourceEditor; UpdateModified: boolean);
|
out MainUnitSrcEdit: TSourceEditor; UpdateModified: boolean);
|
||||||
procedure SaveSrcEditorProjectSpecificSettings(AnEditorInfo: TUnitEditorInfo);
|
procedure SaveSrcEditorProjectSpecificSettings(AnEditorInfo: TUnitEditorInfo);
|
||||||
procedure SaveSourceEditorProjectSpecificSettings;
|
procedure SaveSourceEditorProjectSpecificSettings;
|
||||||
procedure UpdateProjectResourceInfo;
|
procedure UpdateProjectResourceInfo;
|
||||||
@ -2065,8 +2065,7 @@ begin
|
|||||||
LRSCode:=nil;
|
LRSCode:=nil;
|
||||||
if WasPascalSource then
|
if WasPascalSource then
|
||||||
begin
|
begin
|
||||||
Result:=LoadResourceFile(AnUnitInfo,LFMCode,LRSCode,
|
Result:=LoadResourceFile(AnUnitInfo,LFMCode,LRSCode,true,CanAbort);
|
||||||
not (sfSaveAs in Flags),true,CanAbort);
|
|
||||||
if not (Result in [mrIgnore,mrOk]) then
|
if not (Result in [mrIgnore,mrOk]) then
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -5435,7 +5434,7 @@ end;
|
|||||||
|
|
||||||
function TLazSourceFileManager.LoadResourceFile(AnUnitInfo: TUnitInfo;
|
function TLazSourceFileManager.LoadResourceFile(AnUnitInfo: TUnitInfo;
|
||||||
var LFMCode, LRSCode: TCodeBuffer;
|
var LFMCode, LRSCode: TCodeBuffer;
|
||||||
IgnoreSourceErrors, AutoCreateResourceCode, ShowAbort: boolean): TModalResult;
|
AutoCreateResourceCode, ShowAbort: boolean): TModalResult;
|
||||||
var
|
var
|
||||||
LFMFilename: string;
|
LFMFilename: string;
|
||||||
LRSFilename: String;
|
LRSFilename: String;
|
||||||
@ -5474,8 +5473,6 @@ begin
|
|||||||
LRSFilename:='';
|
LRSFilename:='';
|
||||||
LRSCode:=nil;
|
LRSCode:=nil;
|
||||||
end;
|
end;
|
||||||
// if no resource file found (i.e. normally the .lrs file)
|
|
||||||
// don't bother the user, because it is created automatically anyway
|
|
||||||
end;
|
end;
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
@ -6734,6 +6731,7 @@ var
|
|||||||
DependingUnitInfo: TUnitInfo;
|
DependingUnitInfo: TUnitInfo;
|
||||||
DependenciesFlags: TCloseFlags;
|
DependenciesFlags: TCloseFlags;
|
||||||
begin
|
begin
|
||||||
|
ModResult:=mrOk;
|
||||||
repeat
|
repeat
|
||||||
DependingUnitInfo:=Project1.UnitUsingComponentUnit(AnUnitInfo,Types);
|
DependingUnitInfo:=Project1.UnitUsingComponentUnit(AnUnitInfo,Types);
|
||||||
if DependingUnitInfo=nil then break;
|
if DependingUnitInfo=nil then break;
|
||||||
@ -6753,10 +6751,12 @@ var
|
|||||||
ModResult:=CloseUnitComponent(DependingUnitInfo,DependenciesFlags);
|
ModResult:=CloseUnitComponent(DependingUnitInfo,DependenciesFlags);
|
||||||
if ModResult<>mrOk then exit(false);
|
if ModResult<>mrOk then exit(false);
|
||||||
until false;
|
until false;
|
||||||
|
ModResult:=mrOk;
|
||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Result:=mrOk;
|
||||||
UserAsked:=false;
|
UserAsked:=false;
|
||||||
Project1.LockUnitComponentDependencies;
|
Project1.LockUnitComponentDependencies;
|
||||||
try
|
try
|
||||||
@ -6775,7 +6775,7 @@ begin
|
|||||||
if not CloseNext(Result,[ucdtInlineClass]) then exit;
|
if not CloseNext(Result,[ucdtInlineClass]) then exit;
|
||||||
|
|
||||||
// then close all referring components
|
// then close all referring components
|
||||||
// These can build circles and can be freed in any order.
|
// These can build cycles and can be freed in any order.
|
||||||
if not CloseNext(Result,[ucdtProperty]) then exit;
|
if not CloseNext(Result,[ucdtProperty]) then exit;
|
||||||
finally
|
finally
|
||||||
Project1.UnlockUnitComponentDependencies;
|
Project1.UnlockUnitComponentDependencies;
|
||||||
@ -7061,8 +7061,8 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazSourceFileManager.GetMainUnit(var MainUnitInfo: TUnitInfo;
|
procedure TLazSourceFileManager.GetMainUnit(out MainUnitInfo: TUnitInfo; out
|
||||||
var MainUnitSrcEdit: TSourceEditor; UpdateModified: boolean);
|
MainUnitSrcEdit: TSourceEditor; UpdateModified: boolean);
|
||||||
begin
|
begin
|
||||||
MainUnitSrcEdit:=nil;
|
MainUnitSrcEdit:=nil;
|
||||||
if Project1.MainUnitID>=0 then begin
|
if Project1.MainUnitID>=0 then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user