mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 00:50:32 +01:00
IDE: remove unused methods from Main.
git-svn-id: trunk@45456 -
This commit is contained in:
parent
dd98353d82
commit
417f31d34a
47
ide/main.pp
47
ide/main.pp
@ -889,9 +889,6 @@ type
|
|||||||
Flags: TFindUnitFileFlags = []): string; override;
|
Flags: TFindUnitFileFlags = []): string; override;
|
||||||
function FindSourceFile(const AFilename, BaseDirectory: string;
|
function FindSourceFile(const AFilename, BaseDirectory: string;
|
||||||
Flags: TFindSourceFlags): string; override;
|
Flags: TFindSourceFlags): string; override;
|
||||||
function DoLoadMemoryStreamFromFile(MemStream: TMemoryStream;
|
|
||||||
const AFilename:string): TModalResult;
|
|
||||||
//function DoRenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser: boolean): TModalresult;
|
|
||||||
function DoCheckFilesOnDisk(Instantaneous: boolean = false): TModalResult; override;
|
function DoCheckFilesOnDisk(Instantaneous: boolean = false): TModalResult; override;
|
||||||
function DoPublishModule(Options: TPublishModuleOptions;
|
function DoPublishModule(Options: TPublishModuleOptions;
|
||||||
const SrcDirectory, DestDirectory: string): TModalResult; override;
|
const SrcDirectory, DestDirectory: string): TModalResult; override;
|
||||||
@ -947,7 +944,6 @@ type
|
|||||||
procedure DoGoToPascalBlockStart;
|
procedure DoGoToPascalBlockStart;
|
||||||
procedure DoJumpToGuessedUnclosedBlock(FindNextUTF8: boolean);
|
procedure DoJumpToGuessedUnclosedBlock(FindNextUTF8: boolean);
|
||||||
procedure DoJumpToGuessedMisplacedIFDEF(FindNextUTF8: boolean);
|
procedure DoJumpToGuessedMisplacedIFDEF(FindNextUTF8: boolean);
|
||||||
|
|
||||||
procedure DoGotoIncludeDirective;
|
procedure DoGotoIncludeDirective;
|
||||||
|
|
||||||
// tools
|
// tools
|
||||||
@ -5258,8 +5254,7 @@ var
|
|||||||
// search in the used units of RootUnitInfo
|
// search in the used units of RootUnitInfo
|
||||||
CurUnitFilenames:=nil;
|
CurUnitFilenames:=nil;
|
||||||
try
|
try
|
||||||
CTResult:=CodeToolBoss.FindUsedUnitFiles(RootUnitInfo.Source,
|
CTResult:=CodeToolBoss.FindUsedUnitFiles(RootUnitInfo.Source,CurUnitFilenames);
|
||||||
CurUnitFilenames);
|
|
||||||
if not CTResult then begin
|
if not CTResult then begin
|
||||||
DebugLn(['TMainIDE.DoFixupComponentReferences.FindUsedUnits failed parsing ',RootUnitInfo.Filename]);
|
DebugLn(['TMainIDE.DoFixupComponentReferences.FindUsedUnits failed parsing ',RootUnitInfo.Filename]);
|
||||||
// ignore the error. This was just a fallback search.
|
// ignore the error. This was just a fallback search.
|
||||||
@ -5403,7 +5398,7 @@ var
|
|||||||
|
|
||||||
// load resource hidden
|
// load resource hidden
|
||||||
Result:=SourceFileMgr.LoadLFM(RefUnitInfo,LFMCode,
|
Result:=SourceFileMgr.LoadLFM(RefUnitInfo,LFMCode,
|
||||||
OpenFlags+[ofLoadHiddenResource],[]);
|
OpenFlags+[ofLoadHiddenResource],[]);
|
||||||
//DebugLn(['LoadDependencyHidden ',dbgsname(RefUnitInfo.Component)]);
|
//DebugLn(['LoadDependencyHidden ',dbgsname(RefUnitInfo.Component)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6181,9 +6176,7 @@ begin
|
|||||||
Result:=SourceFileMgr.OpenEditorFile(AnUnitInfo.Filename,
|
Result:=SourceFileMgr.OpenEditorFile(AnUnitInfo.Filename,
|
||||||
AnUnitInfo.OpenEditorInfo[0].PageIndex,
|
AnUnitInfo.OpenEditorInfo[0].PageIndex,
|
||||||
AnUnitInfo.OpenEditorInfo[0].WindowID,
|
AnUnitInfo.OpenEditorInfo[0].WindowID,
|
||||||
nil,
|
nil,[ofRevert],True); // Reverting one will revert all
|
||||||
[ofRevert],
|
|
||||||
True); // Reverting one will revert all
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.CreateProjectObject(ProjectDesc,
|
function TMainIDE.CreateProjectObject(ProjectDesc,
|
||||||
@ -8066,37 +8059,6 @@ begin
|
|||||||
ActiveUnitInfo:=nil;
|
ActiveUnitInfo:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoLoadMemoryStreamFromFile(MemStream: TMemoryStream;
|
|
||||||
const AFilename:string): TModalResult;
|
|
||||||
var
|
|
||||||
FileStream: TFileStreamUTF8;
|
|
||||||
ACaption,AText:string;
|
|
||||||
begin
|
|
||||||
repeat
|
|
||||||
try
|
|
||||||
FileStream:=TFileStreamUTF8.Create(AFilename,fmOpenRead);
|
|
||||||
try
|
|
||||||
FileStream.Position:=0;
|
|
||||||
MemStream.CopyFrom(FileStream,FileStream.Size);
|
|
||||||
MemStream.Position:=0;
|
|
||||||
finally
|
|
||||||
FileStream.Free;
|
|
||||||
end;
|
|
||||||
Result:=mrOk;
|
|
||||||
except
|
|
||||||
ACaption:=lisReadError;
|
|
||||||
AText:=Format(lisUnableToReadFile2, ['"', AFilename, '"']);
|
|
||||||
result := Application.MessageBox(PChar(aText),pChar(aCaption),mb_IconError+mb_AbortRetryIgnore);
|
|
||||||
if Result=mrAbort then exit;
|
|
||||||
end;
|
|
||||||
until Result<>mrRetry;
|
|
||||||
end;
|
|
||||||
{
|
|
||||||
function TMainIDE.DoRenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser: boolean): TModalresult;
|
|
||||||
begin
|
|
||||||
Result:=SourceFileMgr.RenameUnitLowerCase(AnUnitInfo, AskUser);
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
function TMainIDE.DoCheckFilesOnDisk(Instantaneous: boolean): TModalResult;
|
function TMainIDE.DoCheckFilesOnDisk(Instantaneous: boolean): TModalResult;
|
||||||
begin
|
begin
|
||||||
Result:=SourceFileMgr.CheckFilesOnDisk(Instantaneous);
|
Result:=SourceFileMgr.CheckFilesOnDisk(Instantaneous);
|
||||||
@ -8108,8 +8070,7 @@ begin
|
|||||||
Result:=SourceFileMgr.PublishModule(Options, SrcDirectory, DestDirectory);
|
Result:=SourceFileMgr.PublishModule(Options, SrcDirectory, DestDirectory);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.PrepareBuildTarget(Quiet: boolean;
|
procedure TMainIDE.PrepareBuildTarget(Quiet: boolean; ScanFPCSrc: TScanModeFPCSources);
|
||||||
ScanFPCSrc: TScanModeFPCSources);
|
|
||||||
begin
|
begin
|
||||||
MainBuildBoss.SetBuildTargetProject1(Quiet,ScanFPCSrc);
|
MainBuildBoss.SetBuildTargetProject1(Quiet,ScanFPCSrc);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user