From 49c7f66c0f251c0f6d143ee9a6cffadbe70b572a Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 3 Feb 2011 10:28:09 +0000 Subject: [PATCH] codetools: fixed parsing forward class git-svn-id: trunk@29347 - --- components/codetools/pascalparsertool.pas | 3 +++ ide/searchfrm.pas | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 9eb4e27d46..e80132ef1a 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -3739,6 +3739,7 @@ var ContextDesc: Word; IsForward: Boolean; ClassDesc: TCodeTreeNodeDesc; + ClassNode: TCodeTreeNode; begin ContextDesc:=CurNode.Desc; if not (ContextDesc in [ctnTypeDefinition,ctnGenericType, @@ -3766,6 +3767,7 @@ begin else RaiseStringExpectedButAtomFound('class'); CreateChildNode; + ClassNode:=CurNode; CurNode.Desc:=ClassDesc; CurNode.StartPos:=ClassAtomPos.StartPos; IsForward:=true; @@ -3829,6 +3831,7 @@ begin begin if IsForward then begin // forward class definition found + ClassNode.SubDesc:=ClassNode.SubDesc or ctnsForwardDeclaration; end else begin // very short class found e.g. = class(TAncestor); end; diff --git a/ide/searchfrm.pas b/ide/searchfrm.pas index 6c6bc02a14..b829752959 100644 --- a/ide/searchfrm.pas +++ b/ide/searchfrm.pas @@ -79,7 +79,7 @@ type fSearchProject: boolean; fTheDirectory: string; fAborting: boolean; - procedure DoFindInFiles(TheFileName: string); + procedure DoFindInFiles(ADirectory: string); procedure DoFindInSearchList; procedure SetResultsList(const AValue: TStrings); procedure UpdateMatches; @@ -797,16 +797,16 @@ end; { TSearchProgressForm } -procedure TSearchProgressForm.DoFindInFiles(TheFileName: string); +procedure TSearchProgressForm.DoFindInFiles(ADirectory: string); var Searcher: TLazFileSearcher; begin //if we have a list and a valid directory - if (DirPathExists(TheFileName)) then + if (DirPathExists(ADirectory)) then begin Searcher := TLazFileSearcher.Create(Self); try - Searcher.Search(TheFileName, FMask, FRecursive,';'); + Searcher.Search(ADirectory, FMask, FRecursive,';'); finally Searcher.Free; end;