diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index 8e3cd587e5..1d604e97a3 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -1560,7 +1560,7 @@ var CleanCursorPos, Indent, insertPos: integer; // -> find it and jump to // reparse code - BuildTreeAndGetCleanPos(trAll,CursorPos,CleanCursorPos); + BuildTreeAndGetCleanPos(trAll,CursorPos,CleanCursorPos,[]); // find CodeTreeNode at cursor CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true); @@ -1938,12 +1938,15 @@ var CleanCursorPos, Indent, insertPos: integer; CompleteCode:=true; end; +// function CompleteCode(CursorPos: TCodeXYPosition; +// var NewPos: TCodeXYPosition; var NewTopLine: integer; +// SourceChangeCache: TSourceChangeCache): boolean; begin Result:=false; if (SourceChangeCache=nil) then RaiseException('need a SourceChangeCache'); // in a class or in a forward proc? - BuildTreeAndGetCleanPos(trAll,CursorPos, CleanCursorPos); + BuildTreeAndGetCleanPos(trAll,CursorPos, CleanCursorPos,[]); // find CodeTreeNode at cursor CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true); CodeCompleteSrcChgCache:=SourceChangeCache; diff --git a/components/codetools/codetoolsstrconsts.pas b/components/codetools/codetoolsstrconsts.pas index ba586a7cac..242858fba1 100644 --- a/components/codetools/codetoolsstrconsts.pas +++ b/components/codetools/codetoolsstrconsts.pas @@ -56,7 +56,7 @@ ResourceString ctsBracketOpenExpectedButAtomFound = 'bracket open expected, but %s found'; ctsBracketCloseExpectedButAtomFound = 'bracket close expected, but %s found'; ctsBracketNotFound = 'bracket %s not found'; - ctsNoNodeFoundAtCursor = 'no node found at cursor'; + ctsNoNodeFoundAtCursor = 'no pascal node found at cursor (i.e. in unparsed code)'; ctsUnknownMainFilename = '(unknown mainfilename)'; // pascal parser