[KDev3.4] Code completion doesn't work from time to time

dukju ahn dukjuahn at gmail.com
Sat Apr 28 15:05:38 UTC 2007


2007/4/28, Andreas Pakulat <apaku at gmx.de>:
> On 28.04.07 11:13:40, David Nolden wrote:
> > On Saturday 28 April 2007 07:07:16 dukju ahn wrote:
> > > In short, completion doesn't work at program startup,
> > > but after some time composing and editing, code-completion works,
> > > and after some time of code-completion using, it doesn't work again.
> > >
> > > What is the problem?
> >
> > That's strange. Did you ever try closing and reopening the document?
>
> I'd like to add here that in the last 2-3 weeks there were several
> people on IRC that had the same problem, Ctrl+Space always worked but
> KDevelop didn't auto-complete after the "." or the "->".

plus this, completing function argument list doesn't appear
when . or -> fails.

And yes, it is _autocompletion_ not the hole code completion

I attached debug outputs. There are two cases. I commented with
//// (four-slash) which action I did to reproduce this bug.
-------------- next part --------------
===================================================================================================================
======================  Case 1    ================================================
//// type d-> ,but autocompletion doesn't appear. Ctrl-space works in this case

evelop (cpp support): CppCodeCompletion::evaluateExpressionAt( 111, 6 )
kdevelop (cpp support): 0types in type-store before destruction
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.h
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.cpp
kdevelop (cpp support): CppCodeCompletion::computeRecoveryPoints
kdevelop (cpp support): found 30 recovery points
kdevelop (cpp support): files in code-model after parseEmit: 922 before: 922
kdevelop (cpp support): CppCodeCompletion::evaluateExpressionAt( 111, 7 )
kdevelop (cpp support): 0types in type-store before destruction
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.h
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.cpp
kdevelop (cpp support): CppCodeCompletion::computeRecoveryPoints
kdevelop (cpp support): found 30 recovery points
kdevelop (cpp support): files in code-model after parseEmit: 922 before: 922
                                                                               

===================================================================================================================
======================  Case 2    ================================================
//// Now d-> works.
//// User want to type CustomMakeFolderItem. It is on codemodel and Quickopen plugins can show this.
//// But if I type CustomMake , autocompletion only recognize CustomMakeManager, ignoring CustomMakeFolderItem

//// typing CustomMake, shows CustomMakeManager

kdevelop (cpp support): CppCodeCompletion::evaluateExpressionAt( 110, 14 )
kdevelop (cpp support): 14types in type-store before destruction
kdevelop (cpp support): CppCodeCompletion::completeText()
kdevelop (cpp support): no global namespace was set, clearing cache
kdevelop (cpp support): completion-cache emptied
kdevelop (cpp support): 0types in type-store before destruction
kdevelop (cpp support): using code-model for completion
kdevelop (cpp support): startLine =
kdevelop (cpp support): -------------> reparse text
kdevelop (cpp support):
CustomMakeManager::~CustomMakeManager()
{
    CustomMake
kdevelop (cpp support): --------------------------------------------
kdevelop (cpp support): is function definition= true
kdevelop (cpp support): endLine = 3, endColumn 14
kdevelop (cpp support): [int CppCodeCompletion::expressionAt(const QString&, int)]
kdevelop (cpp support): CppCodeCompletion::computeContext() -- main
kdevelop (cpp support): ===========================> type is: (resolved)
kdevelop (cpp support): ===========================> word is: CustomMake
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()lib/sublime/document.h
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.h
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.cpp
kdevelop (cpp support): CppCodeCompletion::computeRecoveryPoints
kdevelop (cpp support): found 30 recovery points
kdevelop (cpp support): files in code-model after parseEmit: 922 before: 922

//// Ctrl-space works. It shows both CustomMakeManager and CustomMakeFolderItem

kdevelop (cpp support): CppCodeCompletion::completeText()
kdevelop (cpp support): using code-model for completion
kdevelop (cpp support): startLine =
kdevelop (cpp support): -------------> reparse text
kdevelop (cpp support):
CustomMakeManager::~CustomMakeManager()
{
    CustomMake
kdevelop (cpp support): --------------------------------------------
kdevelop (cpp support): is function definition= true
kdevelop (cpp support): endLine = 3, endColumn 14
kdevelop (cpp support): [int CppCodeCompletion::expressionAt(const QString&, int)]
kdevelop (cpp support): CppCodeCompletion::computeContext() -- main
kdevelop (cpp support): ===========================> type is: (resolved)
kdevelop (cpp support): ===========================> word is: CustomMake

//// Typing CustomMakeF . Autocompletion fails.

kdevelop (cpp support): CppCodeCompletion::evaluateExpressionAt( 110, 15 )
kdevelop (cpp support): 14types in type-store before destruction
kdevelop (cpp support): CppCodeCompletion::completeText()
kdevelop (cpp support): no global namespace was set, clearing cache
kdevelop (cpp support): completion-cache emptied
kdevelop (cpp support): 0types in type-store before destruction
kdevelop (cpp support): using code-model for completion
kdevelop (cpp support): startLine =
kdevelop (cpp support): -------------> reparse text
kdevelop (cpp support):
CustomMakeManager::~CustomMakeManager()
{
    CustomMakeF
kdevelop (cpp support): --------------------------------------------
kdevelop (cpp support): is function definition= true
kdevelop (cpp support): endLine = 3, endColumn 15
kdevelop (cpp support): [int CppCodeCompletion::expressionAt(const QString&, int)]
kdevelop (cpp support): CppCodeCompletion::computeContext() -- main
kdevelop (cpp support): ===========================> type is: (resolved)
kdevelop (cpp support): ===========================> word is: CustomMakeF
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.cpp
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()buildtools/managers/custommake/custommakemanager.h
kdevelop (cpp support): CppSupportPart::customEvent(2000)
kdevelop (cpp support): ProblemReporter::removeAllProblems()lib/sublime/document.h
kdevelop (cpp support): CppCodeCompletion::computeRecoveryPoints
kdevelop (cpp support): found 30 recovery points
kdevelop (cpp support): files in code-model after parseEmit: 922 before: 922




More information about the KDevelop-devel mailing list