mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:00:27 +02:00
IDE: BeginCodeTool: changed to out parameters
git-svn-id: trunk@20601 -
This commit is contained in:
parent
cd49fe92bc
commit
73525af26b
18
ide/main.pp
18
ide/main.pp
@ -847,12 +847,12 @@ type
|
|||||||
procedure UpdateEnglishErrorMsgFilename;
|
procedure UpdateEnglishErrorMsgFilename;
|
||||||
procedure ActivateCodeToolAbortableMode;
|
procedure ActivateCodeToolAbortableMode;
|
||||||
function BeginCodeTools: boolean; override;
|
function BeginCodeTools: boolean; override;
|
||||||
function BeginCodeTool(var ActiveSrcEdit: TSourceEditor;
|
function BeginCodeTool(out ActiveSrcEdit: TSourceEditor;
|
||||||
var ActiveUnitInfo: TUnitInfo;
|
out ActiveUnitInfo: TUnitInfo;
|
||||||
Flags: TCodeToolsFlags): boolean;
|
Flags: TCodeToolsFlags): boolean;
|
||||||
function BeginCodeTool(ADesigner: TDesigner;
|
function BeginCodeTool(ADesigner: TDesigner;
|
||||||
var ActiveSrcEdit: TSourceEditor;
|
out ActiveSrcEdit: TSourceEditor;
|
||||||
var ActiveUnitInfo: TUnitInfo;
|
out ActiveUnitInfo: TUnitInfo;
|
||||||
Flags: TCodeToolsFlags): boolean;
|
Flags: TCodeToolsFlags): boolean;
|
||||||
function DoJumpToSourcePosition(const Filename: string;
|
function DoJumpToSourcePosition(const Filename: string;
|
||||||
NewX, NewY, NewTopLine: integer;
|
NewX, NewY, NewTopLine: integer;
|
||||||
@ -12363,19 +12363,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.BeginCodeTool(var ActiveSrcEdit: TSourceEditor;
|
function TMainIDE.BeginCodeTool(out ActiveSrcEdit: TSourceEditor;
|
||||||
var ActiveUnitInfo: TUnitInfo; Flags: TCodeToolsFlags): boolean;
|
out ActiveUnitInfo: TUnitInfo; Flags: TCodeToolsFlags): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=BeginCodeTool(nil,ActiveSrcEdit,ActiveUnitInfo,Flags);
|
Result:=BeginCodeTool(nil,ActiveSrcEdit,ActiveUnitInfo,Flags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.BeginCodeTool(ADesigner: TDesigner;
|
function TMainIDE.BeginCodeTool(ADesigner: TDesigner;
|
||||||
var ActiveSrcEdit: TSourceEditor; var ActiveUnitInfo: TUnitInfo;
|
out ActiveSrcEdit: TSourceEditor; out ActiveUnitInfo: TUnitInfo;
|
||||||
Flags: TCodeToolsFlags): boolean;
|
Flags: TCodeToolsFlags): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
ActiveSrcEdit:=nil;
|
|
||||||
ActiveUnitInfo:=nil;
|
|
||||||
|
|
||||||
// check global stati
|
// check global stati
|
||||||
if (ToolStatus in [itCodeTools,itCodeToolAborting]) then begin
|
if (ToolStatus in [itCodeTools,itCodeToolAborting]) then begin
|
||||||
@ -12393,8 +12391,6 @@ begin
|
|||||||
DoSwitchToFormSrc(ADesigner,ActiveSrcEdit,ActiveUnitInfo)
|
DoSwitchToFormSrc(ADesigner,ActiveSrcEdit,ActiveUnitInfo)
|
||||||
else if ADesigner<>nil then
|
else if ADesigner<>nil then
|
||||||
GetDesignerUnit(ADesigner,ActiveSrcEdit,ActiveUnitInfo)
|
GetDesignerUnit(ADesigner,ActiveSrcEdit,ActiveUnitInfo)
|
||||||
else if (ActiveSrcEdit<>nil) and (ActiveUnitInfo=nil) then
|
|
||||||
ActiveUnitInfo:=Project1.UnitWithEditorIndex(ActiveSrcEdit.PageIndex)
|
|
||||||
else
|
else
|
||||||
GetCurrentUnit(ActiveSrcEdit,ActiveUnitInfo);
|
GetCurrentUnit(ActiveSrcEdit,ActiveUnitInfo);
|
||||||
if (not (ctfSourceEditorNotNeeded in Flags))
|
if (not (ctfSourceEditorNotNeeded in Flags))
|
||||||
|
Loading…
Reference in New Issue
Block a user