codetools: FindSmartHint: show hint for declaration

git-svn-id: trunk@26882 -
This commit is contained in:
mattias 2010-07-28 22:48:35 +00:00
parent 137bc3280e
commit 42321c5664

View File

@ -548,7 +548,7 @@ type
);
const
DefaultFindSmartFlags = [fsfIncludeDirective];
DefaultFindSmartFlags = [fsfIncludeDirective,fsfFindMainDeclaration];
type
//----------------------------------------------------------------------------
@ -2126,9 +2126,13 @@ var
NodeStr: String;
begin
Result:='';
if FindDeclaration(CursorPos,DefaultFindSmartFlags,
if not FindDeclaration(CursorPos,DefaultFindSmartFlags,
NewTool,NewNode,NewPos,NewTopLine) then
begin
// identifier not found or already at declaration
exit;
end;
{ Examples:
var i: integer
/home/.../codetools/finddeclarationtools.pas(1224,7)
@ -2283,7 +2287,6 @@ begin
Result:=Result+')';
end;
end;
end;
function TFindDeclarationTool.BaseTypeOfNodeHasSubIdents(ANode: TCodeTreeNode
): boolean;