mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 12:49:42 +01:00 
			
		
		
		
	IDE: clean up
git-svn-id: trunk@48209 -
This commit is contained in:
		
							parent
							
								
									8d0357a4f8
								
							
						
					
					
						commit
						d6c2f05a31
					
				@ -35,11 +35,11 @@ interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Classes, SysUtils, LCLProc, Forms, Controls, Dialogs, ExtCtrls,
 | 
			
		||||
  StdCtrls, ComCtrls, FileUtil, AvgLvlTree, Laz2_XMLCfg, LazFileCache,
 | 
			
		||||
  StdCtrls, ComCtrls, FileUtil, Laz2_XMLCfg, LazFileCache,
 | 
			
		||||
  // codetools
 | 
			
		||||
  CodeToolsStrConsts, CodeCache, CodeToolManager,
 | 
			
		||||
  // IDEIntf
 | 
			
		||||
  LazIDEIntf, TextTools, IDEMsgIntf, PackageIntf, IDEExternToolIntf,
 | 
			
		||||
  LazIDEIntf, IDEMsgIntf, PackageIntf, IDEExternToolIntf,
 | 
			
		||||
  // IDE
 | 
			
		||||
  DialogProcs, PackageDefs, Project, IDEProcs, LazarusIDEStrConsts,
 | 
			
		||||
  etFPCMsgParser,
 | 
			
		||||
@ -121,7 +121,7 @@ type
 | 
			
		||||
  public
 | 
			
		||||
    function IsApplicable(Msg: TMessageLine; out MissingUnit, UsedByUnit: string): boolean;
 | 
			
		||||
    procedure CreateMenuItems(Fixes: TMsgQuickFixes); override;
 | 
			
		||||
    procedure QuickFix(Fixes: TMsgQuickFixes; Msg: TMessageLine); override;
 | 
			
		||||
    procedure QuickFix({%H-}Fixes: TMsgQuickFixes; Msg: TMessageLine); override;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TQuickFixIncludeNotFound_Search - add menu item to open this search dialog }
 | 
			
		||||
@ -130,7 +130,7 @@ type
 | 
			
		||||
  public
 | 
			
		||||
    function IsApplicable(Msg: TMessageLine; out IncludeFile: string): boolean;
 | 
			
		||||
    procedure CreateMenuItems(Fixes: TMsgQuickFixes); override;
 | 
			
		||||
    procedure QuickFix(Fixes: TMsgQuickFixes; Msg: TMessageLine); override;
 | 
			
		||||
    procedure QuickFix({%H-}Fixes: TMsgQuickFixes; Msg: TMessageLine); override;
 | 
			
		||||
    function IsCodetoolsErrorIncludeFileNotFound(Msg: string;
 | 
			
		||||
                                              out IncludeFile: string): boolean;
 | 
			
		||||
  end;
 | 
			
		||||
@ -390,11 +390,12 @@ end;
 | 
			
		||||
procedure TFindUnitDialog.RemoveFromUsesSection(
 | 
			
		||||
  Item: TMissingUnit_QuickFix_RemoveFromUses);
 | 
			
		||||
begin
 | 
			
		||||
  if Item=nil then ;
 | 
			
		||||
  if not CodeToolBoss.RemoveUnitFromAllUsesSections(Code,MissingUnitName) then
 | 
			
		||||
  begin
 | 
			
		||||
 | 
			
		||||
  end;
 | 
			
		||||
  ModalResult:=mrOk;
 | 
			
		||||
  end else
 | 
			
		||||
    ModalResult:=mrOk;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function TFindUnitDialog.MainOwnerHasRequirement(PackageName: string): boolean;
 | 
			
		||||
@ -608,6 +609,7 @@ end;
 | 
			
		||||
 | 
			
		||||
constructor TMissingUnit_QuickFix_RemoveFromUses.Create(aDlg: TFindUnitDialog);
 | 
			
		||||
begin
 | 
			
		||||
  Dlg:=aDlg;
 | 
			
		||||
  Caption:='Remove unit from uses clause';
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -25,7 +25,7 @@ type
 | 
			
		||||
    FLazPackage: TLazPackage;
 | 
			
		||||
  public
 | 
			
		||||
    function GetTitle: string; override;
 | 
			
		||||
    procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,7 @@ type
 | 
			
		||||
  public
 | 
			
		||||
    function Check: Boolean; override;
 | 
			
		||||
    function GetTitle: string; override;
 | 
			
		||||
    procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
 | 
			
		||||
@ -100,6 +100,7 @@ var
 | 
			
		||||
  CurDir: string;
 | 
			
		||||
  StartPos, OldStartPos: integer;
 | 
			
		||||
  DlgResult: TModalResult;
 | 
			
		||||
  s: String;
 | 
			
		||||
begin
 | 
			
		||||
  // check NewPath
 | 
			
		||||
  StartPos := 1;
 | 
			
		||||
@ -112,8 +113,11 @@ begin
 | 
			
		||||
      FLazPackage.LongenFilename(CurDir);
 | 
			
		||||
      if not DirPathExists(CurDir) then
 | 
			
		||||
      begin
 | 
			
		||||
        s:=Format(lisDirectoryNotFound, [CurDir]);
 | 
			
		||||
        if Context<>'' then
 | 
			
		||||
          s:=Context+LineEnding+s;
 | 
			
		||||
        DlgResult := QuestionDlg(lisEnvOptDlgDirectoryNotFound,
 | 
			
		||||
          Format(lisDirectoryNotFound, [CurDir]),
 | 
			
		||||
          s,
 | 
			
		||||
          mtError, [mrIgnore, mrYes, lisRemoveFromSearchPath, mrCancel], 0);
 | 
			
		||||
        case DlgResult of
 | 
			
		||||
          mrIgnore: ;
 | 
			
		||||
 | 
			
		||||
@ -17,7 +17,7 @@ type
 | 
			
		||||
    ProvidesMemo: TMemo;
 | 
			
		||||
  public
 | 
			
		||||
    function GetTitle: string; override;
 | 
			
		||||
    procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
 | 
			
		||||
    procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
 | 
			
		||||
    class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user