IDE: clean up

git-svn-id: trunk@48205 -
This commit is contained in:
mattias 2015-03-10 12:53:11 +00:00
parent 26635ba63b
commit 2df6986f6a
4 changed files with 15 additions and 15 deletions

View File

@ -103,8 +103,9 @@ var
begin begin
ModalResult:=mrNone; ModalResult:=mrNone;
SaveSettings; SaveSettings;
if not SearchFilesToDelete(List) then exit; List:=nil;
try try
if not SearchFilesToDelete(List) then exit;
if not DeleteFiles(List) then exit; if not DeleteFiles(List) then exit;
finally finally
List.Free; List.Free;

View File

@ -34,7 +34,7 @@ interface
uses uses
Classes, SysUtils, TypInfo, LCLProc, Forms, Controls, Graphics, Classes, SysUtils, TypInfo, LCLProc, Forms, Controls, Graphics,
Dialogs, ExtCtrls, StdCtrls, ButtonPanel, SynEdit, SynHighlighterPas, Dialogs, ExtCtrls, StdCtrls, ButtonPanel, SynEdit, SynHighlighterPas,
CodeToolsStructs, CodeAtom, CodeCache, CodeToolManager, PascalParserTool, CodeToolsStructs, CodeCache, CodeToolManager, PascalParserTool,
CodeTree, CodeTree,
SrcEditorIntf, LazIDEIntf, PropEdits, IDEDialogs, CustomFormEditor, JitForms, SrcEditorIntf, LazIDEIntf, PropEdits, IDEDialogs, CustomFormEditor, JitForms,
Project, LazarusIDEStrConsts, EditorOptions; Project, LazarusIDEStrConsts, EditorOptions;
@ -181,7 +181,7 @@ var
AncestorRoot, AncestorComponent: TComponent; AncestorRoot, AncestorComponent: TComponent;
AncestorMethod: TMethod; AncestorMethod: TMethod;
begin begin
FillByte(Result, SizeOf(Result), 0); FillByte(Result{%H-}, SizeOf(Result), 0);
if csAncestor in AComponent.ComponentState then if csAncestor in AComponent.ComponentState then
begin begin
// search for ancestor component // search for ancestor component
@ -208,7 +208,7 @@ var
end; end;
end; end;
procedure CheckEvents(LookupRoot, AComponent: TComponent); procedure CheckEvents(AComponent: TComponent);
var var
TypeInfo: PTypeInfo; TypeInfo: PTypeInfo;
TypeData: PTypeData; TypeData: PTypeData;
@ -292,9 +292,9 @@ begin
and (SysUtils.CompareText(LookupRoot.ClassName,CurClassName)=0) then and (SysUtils.CompareText(LookupRoot.ClassName,CurClassName)=0) then
begin begin
PropChanged:=false; PropChanged:=false;
CheckEvents(LookupRoot,LookupRoot); CheckEvents(LookupRoot);
for i:=0 to LookupRoot.ComponentCount-1 do for i:=0 to LookupRoot.ComponentCount-1 do
CheckEvents(LookupRoot,LookupRoot.Components[i]); CheckEvents(LookupRoot.Components[i]);
// update objectinspector // update objectinspector
if PropChanged and (GlobalDesignHook.LookupRoot=LookupRoot) then if PropChanged and (GlobalDesignHook.LookupRoot=LookupRoot) then
GlobalDesignHook.RefreshPropertyValues; GlobalDesignHook.RefreshPropertyValues;

View File

@ -40,8 +40,8 @@ uses
Classes, SysUtils, LCLProc,FileUtil, Forms, Controls, Graphics, Classes, SysUtils, LCLProc,FileUtil, Forms, Controls, Graphics,
Dialogs, ExtCtrls, StdCtrls, Buttons, ButtonPanel, ComCtrls, AvgLvlTree, Dialogs, ExtCtrls, StdCtrls, Buttons, ButtonPanel, ComCtrls, AvgLvlTree,
// codetools // codetools
FindDeclarationTool, PascalParserTool, CodeTree, CodeCache, CodeAtom, FindDeclarationTool, PascalParserTool, CodeTree, CodeCache,
CodeToolManager, CodeGraph, FindOverloads, CodeToolManager, FindOverloads,
// IDE // IDE
LazIDEIntf, ProjectIntf, SrcEditorIntf, IDEProcs; LazIDEIntf, ProjectIntf, SrcEditorIntf, IDEProcs;

View File

@ -31,7 +31,7 @@ interface
uses uses
Classes, SysUtils, LCLProc, Forms, Controls, Dialogs, Classes, SysUtils, LCLProc, Forms, Controls, Dialogs,
StdCtrls, ExtCtrls, AvgLvlTree, ComCtrls, StdCtrls, ExtCtrls, ComCtrls,
laz2_DOM, laz2_DOM,
// codetools // codetools
FileProcs, AVL_Tree, CTUnitGraph, CodeTree, CodeCache, FileProcs, AVL_Tree, CTUnitGraph, CodeTree, CodeCache,
@ -59,7 +59,7 @@ type
ScopeRadioGroup: TRadioGroup; ScopeRadioGroup: TRadioGroup;
procedure FindOrRenameButtonClick(Sender: TObject); procedure FindOrRenameButtonClick(Sender: TObject);
procedure FindRenameIdentifierDialogClose(Sender: TObject; procedure FindRenameIdentifierDialogClose(Sender: TObject;
var CloseAction: TCloseAction); var {%H-}CloseAction: TCloseAction);
procedure FindRenameIdentifierDialogCreate(Sender: TObject); procedure FindRenameIdentifierDialogCreate(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure RenameCheckBoxChange(Sender: TObject); procedure RenameCheckBoxChange(Sender: TObject);
@ -102,7 +102,7 @@ function ShowIdentifierReferences(
DeclarationCode: TCodeBuffer; const DeclarationCaretXY: TPoint; DeclarationCode: TCodeBuffer; const DeclarationCaretXY: TPoint;
TreeOfPCodeXYPosition: TAVLTree): TModalResult; TreeOfPCodeXYPosition: TAVLTree): TModalResult;
procedure AddReferencesToResultView(DeclarationCode: TCodeBuffer; procedure AddReferencesToResultView(DeclarationCode: TCodeBuffer;
const DeclarationCaretXY: TPoint; TargetCode: TCodeBuffer; const DeclarationCaretXY: TPoint;
TreeOfPCodeXYPosition: TAVLTree; ClearItems: boolean; SearchPageIndex: integer); TreeOfPCodeXYPosition: TAVLTree; ClearItems: boolean; SearchPageIndex: integer);
function GatherFPDocReferencesForPascalFiles(PascalFiles: TStringList; function GatherFPDocReferencesForPascalFiles(PascalFiles: TStringList;
@ -312,7 +312,7 @@ begin
// list results // list results
SearchResultsView.BeginUpdate(SearchPageIndex.PageIndex); SearchResultsView.BeginUpdate(SearchPageIndex.PageIndex);
AddReferencesToResultView(DeclarationCode,DeclarationCaretXY, AddReferencesToResultView(DeclarationCode,DeclarationCaretXY,
DeclarationCode,TreeOfPCodeXYPosition,true,SearchPageIndex.PageIndex); TreeOfPCodeXYPosition,true,SearchPageIndex.PageIndex);
OldSearchPageIndex:=SearchPageIndex; OldSearchPageIndex:=SearchPageIndex;
SearchPageIndex:=nil; SearchPageIndex:=nil;
SearchResultsView.EndUpdate(OldSearchPageIndex.PageIndex); SearchResultsView.EndUpdate(OldSearchPageIndex.PageIndex);
@ -324,9 +324,8 @@ begin
end; end;
procedure AddReferencesToResultView(DeclarationCode: TCodeBuffer; procedure AddReferencesToResultView(DeclarationCode: TCodeBuffer;
const DeclarationCaretXY: TPoint; TargetCode: TCodeBuffer; const DeclarationCaretXY: TPoint; TreeOfPCodeXYPosition: TAVLTree;
TreeOfPCodeXYPosition: TAVLTree; ClearItems: boolean; ClearItems: boolean; SearchPageIndex: integer);
SearchPageIndex: integer);
var var
Identifier: string; Identifier: string;
CodePos: PCodeXYPosition; CodePos: PCodeXYPosition;