CodeTools/SourceEditor: code completion, indicate if the returned value is void

git-svn-id: trunk@21026 -
This commit is contained in:
martin 2009-07-31 15:27:47 +00:00
parent dbfbbff04f
commit 974cdf9067
2 changed files with 8 additions and 3 deletions

View File

@ -4014,7 +4014,7 @@ Begin
// insert value plus special chars like brackets, semicolons, ...
SrcEdit:=GetActiveSE;
Editor:=SrcEdit.EditorComponent;
if NewValue <> '' then
if ValueType <> icvNone then
Editor.TextBetweenPoints[SourceStart, SourceEnd] := NewValue;
if CursorToLeft>0 then
begin

View File

@ -76,7 +76,8 @@ type
icvProcWithParams,
icvIndexedProp,
icvCompleteProcDeclaration,
icvUnitName
icvUnitName,
icvNone
);
// completion form and functions
@ -477,9 +478,13 @@ begin
CanAddComma:=(AddChar<>',');
IdentItem:=IdentList.FilteredItems[Index];
if IdentItem=nil then exit;
if IdentItem=nil then begin
ValueType := icvNone;
exit;
end;
if not CodeToolBoss.IdentItemCheckHasChilds(IdentItem) then begin
ValueType := icvNone;
MainIDEInterface.DoJumpToCodeToolBossError;
exit;
end;