Code Completion not for alle Variables

General questions regarding the usage of CodeLite
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Code Completion not for alle Variables

Post by FrancescoA »

Hello, in a good deal of variables, code completion is not shown. I have adjusted addidional include directories, retagged, but its not working.
For example in CodeBlocks, the code completions for that variables are shown.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by eranif »

FrancescoA wrote:Hello, in a good deal of variables, code completion is not shown. I have adjusted addidional include directories, retagged, but its not working.
Please provide an example of what is not working for you (some code samples)

Is it variables or functions / classes? (there is a different)


Eran
Make sure you have read the HOW TO POST thread
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by FrancescoA »

First congratulation to your IDE, I like it very much.
I compared several IDES, but want to stay on codelite, if that problem ist solved.

Its not so easy to create a sample. Its a member Variable from a base class, which points to a class.

myfile.cpp (class A: derives from Class A1) A1 has a pointer "ptrb" to Class B
A1 is in /usr/local/include somewhter

if I type (the scope should be known) ptrb-> nothing appears, but for other class members it works
and it works also in codeblocks.

As I said inlcude directories are registered in teh dialog.

If you need furhter information, I will look what I can do.

regards,
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by eranif »

Its hard for me to solve such errors (probably user error ;))
Without seeing some code.

It is working perfectly fine (derived classes, pointers etc)
I need to see a sample code to solve this, its hard to guess

Except for the obvious: you do have workspace opened, right?

Eran
Make sure you have read the HOW TO POST thread
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by FrancescoA »

I will check again. If I am the only one (or only a few other), for whom the code completion is not popping up, I think,
the bug must be in my project or project settings. I will try I hope in the coming days. If not, is there a faq for that? that would be also useful: Why doent't the code completion show up (for every known) variable. Answer: Check Tag Setting include directories, delete the old tag file and create a new one, ... bla bla ;)
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by FrancescoA »

I tried with several include directories and rescan.
Settings -> Tags Settings -> Include directories
also with variations of for example
usr/local/include
usr/local/include/myproject
and retagged my projeckt

But all the members (base classes) declared in usr/local/* are not found.

Could it be, that (here is a comprehensive use of namespaces) this conflicts with
a) tag scanning
b) tag "finding"?

All the members declared in the base classes are not shown.

Addition (Example):

Code: Select all

namespace NS1
{
  public:
    int NS1Func(void);
};
class Screen:public NS2::Screen
...
anywhere in /usr/local/inlcude:

Code: Select all


namespace NS2
{
class Screen
{
  public:
    int NS2Func(void);
};
screen Konstructor before:
screen->
here NS1Func is offered in Code completion, but not NS2 func

As I said, in CodeBlocks that variables are shown.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by eranif »

This bug was fixed in SVN trunk couple of weeks ago (it was reported in another context, but the effect is the same):

Here is the commit log which fixed it:
------------------------------------------------------------------------
r3386 | eranif | 2009-11-20 21:48:00 +0200 (Fri, 20 Nov 2009) | 1 line

- Fixed: Add Function Implementation feature: scope name resolving is now done properly when the class inherits a scoped class (... : public NAMESPACE::CLASS_NAME)
------------------------------------------------------------------------
Eran
Make sure you have read the HOW TO POST thread
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by FrancescoA »

Ahh, cool, thank you for your fast reply

Is there any new binary (ubuntu deb) to download?
I have v2.0.3365
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by eranif »

Just to make sure, that it is the same bug indeed:
Can you try and test this code sample:

Code: Select all

namespace NS
{
    class Base {
    public:
        int m_member;
    };
};

class ChildClass : public NS::Base
{
public:
    ChildClass(){}
    ~ChildClass(){}
};

int main(int argc, char **argv)
{
    ChildClass cs;
    cs
    return 0;
}

Check to see if you get Code completion for cs which includes 'm_member'

And no, there is no build yet, a new release will be coming during this weekend
Eran
Make sure you have read the HOW TO POST thread
FrancescoA
CodeLite Enthusiast
Posts: 12
Joined: Fri Dec 11, 2009 12:23 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion not for alle Variables

Post by FrancescoA »

Yes, it works:

Code: Select all

namespace NS
{
    class Base {
    public:
        int m_member;
    };
};

class ChildClass : public NS::Base
{
public:
    ChildClass(){}
    ~ChildClass(){}
};

int main(int argc, char **argv)
{
    ChildClass cs;
    cs.
    return 0;
}
ChildClass
m_member
~ChildClass
Post Reply