mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 08:51:17 +02:00
IDE: apply wordexceptions to unit names in identifier completion
git-svn-id: trunk@38030 -
This commit is contained in:
parent
b7d2540ebf
commit
4e187f7a92
@ -552,6 +552,7 @@ var
|
|||||||
Indent: LongInt;
|
Indent: LongInt;
|
||||||
StartContextPos: TCodeXYPosition;
|
StartContextPos: TCodeXYPosition;
|
||||||
s: String;
|
s: String;
|
||||||
|
IsWordPolicyExcept: Boolean;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
CursorToLeft:=0;
|
CursorToLeft:=0;
|
||||||
@ -574,7 +575,7 @@ begin
|
|||||||
|
|
||||||
Result:=IdentItem.Identifier;
|
Result:=IdentItem.Identifier;
|
||||||
with CodeToolBoss.SourceChangeCache.BeautifyCodeOptions do
|
with CodeToolBoss.SourceChangeCache.BeautifyCodeOptions do
|
||||||
WordExceptions.CheckExceptions(Result);
|
IsWordPolicyExcept:=WordExceptions.CheckExceptions(Result);
|
||||||
|
|
||||||
case IdentItem.GetDesc of
|
case IdentItem.GetDesc of
|
||||||
|
|
||||||
@ -670,9 +671,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
icvUnitName:
|
icvUnitName:
|
||||||
begin
|
if not IsWordPolicyExcept then
|
||||||
Result:=FindUnitName(IdentList,IdentItem);
|
Result:=FindUnitName(IdentList,IdentItem);
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if CursorAtEnd then ;
|
if CursorAtEnd then ;
|
||||||
|
@ -364,6 +364,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
IdentItem := TIdentifierListItem(Items.Objects[ItemIndex]);
|
IdentItem := TIdentifierListItem(Items.Objects[ItemIndex]);
|
||||||
Result := IdentItem.Identifier;
|
Result := IdentItem.Identifier;
|
||||||
|
with CodeToolBoss.SourceChangeCache.BeautifyCodeOptions do
|
||||||
|
if WordExceptions.CheckExceptions(Result) then Exit;
|
||||||
CodeBuf := CodeToolBoss.FindUnitSource(SourceEditorManager.ActiveEditor.CodeBuffer, Result, '');
|
CodeBuf := CodeToolBoss.FindUnitSource(SourceEditorManager.ActiveEditor.CodeBuffer, Result, '');
|
||||||
if Assigned(CodeBuf) then
|
if Assigned(CodeBuf) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user