mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 02:41:51 +02:00
codetools: add class visibility to smart hints
git-svn-id: trunk@21283 -
This commit is contained in:
parent
a768033f10
commit
5fe98142c0
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user