codetools: add class visibility to smart hints

git-svn-id: trunk@21283 -
This commit is contained in:
mattias 2009-08-18 15:42:50 +00:00
parent a768033f10
commit 5fe98142c0
2 changed files with 17 additions and 2 deletions

View File

@ -2034,6 +2034,19 @@ begin
IdentAdded:=false;
// identifier category and identifier
if NewNode<>nil then begin
// class visibility
if NewNode.Parent<>nil then begin
case NewNode.Parent.Desc of
ctnClassPrivate,ctnClassTypePrivate,ctnClassVarPrivate:
Result:=Result+'private ';
ctnClassProtected,ctnClassTypeProtected,ctnClassVarProtected:
Result:=Result+'protected ';
ctnClassPublic,ctnClassTypePublic,ctnClassVarPublic:
Result:=Result+'public ';
ctnClassPublished,ctnClassTypePublished,ctnClassVarPublished:
Result:=Result+'published ';
end;
end;
case NewNode.Desc of
ctnVarDefinition, ctnTypeDefinition, ctnConstDefinition,
ctnEnumIdentifier, ctnGenericType:

View File

@ -256,7 +256,8 @@ each control that's dropped onto the form
var Ancestor, RootAncestor: TComponent);
procedure SetComponentNameAndClass(CI: TIComponentInterface;
const NewName, NewClassName: shortstring);
function HasCircularDependencies(AClass: TComponentClass; AComponent: TComponent): Boolean;
function HasCircularDependencies(AClass: TComponentClass;
AComponent: TComponent): Boolean;
// ancestors
function GetAncestorLookupRoot(AComponent: TComponent): TComponent; override;
@ -1842,7 +1843,8 @@ begin
AComponent.Name:=NewName;
end;
function TCustomFormEditor.HasCircularDependencies(AClass: TComponentClass; AComponent: TComponent): Boolean;
function TCustomFormEditor.HasCircularDependencies(AClass: TComponentClass;
AComponent: TComponent): Boolean;
function HasChild(WhatToTraverse: TComponent; WhatToSearch: TClass): Boolean;
var