Code completion future

Discussion about CodeLite development process and patches
PAVLVS
CodeLite Curious
Posts: 5
Joined: Sat Nov 22, 2008 6:11 pm
Contact:

Code completion future

Post by PAVLVS »

Hello Irfan,
Firstly, I want to report a mismatch with Code Completion when you use modificators in function arguments, e.g.:

Code: Select all

void func(unsigned int a, unsigned int b) { /* body */ }
void func(unsigned int a, unsigned int b, int c) { /* body * / }
Both unsigned arguments are ignored and functions seems like void func() and void func(int c) to parser.

The next thing is whether you are planning to add full preprocessor/macros evaluation? E.g. for evaluating this code

Code: Select all

#define PROPERTY(T, V) \
protected: \
  T V; \
public: \
  void set##V(T _##V) { V = _##V; } \
  T get##V() { return V; }

class Object
{
  PROPERTY(wxString, Name)
  PROPERTY(float, Mass)
};
to the following:

Code: Select all

class Object
{
protected:
  wxString Name;
public:
  void setName(wxString _Name) { Name = _Name; }
  wxString getName() { return Name; }
protected:
  float Mass;
public:
  void setMass(float _Mass) { Mass = _Mass; }
  float getMass() { return Mass; }
};
IDE with such functionality support is (besides Visual Studio) Qt Creator, but I'd prefer Code Lite (Qt Creator is strongly oriented on Qt developping, especially from vesion 2.0 with QML).
So, what do you think about this feature? Is there a chance to have it in Code Lite?
Thanks for your work.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion future

Post by eranif »

PAVLVS wrote:Both unsigned arguments are ignored and functions seems like void func() and void func(int c) to parser.
This seems like a bug to me. I will look at it (thanks for reporting this & providing a use-case)
PAVLVS wrote:So, what do you think about this feature? Is there a chance to have it in Code Lite?
Probably yes, but not in the coming future

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion future

Post by eranif »

Hi again,

I played with the sample that you gave in the first post and it seems that it works perfectly fine here.

Attached is a screenshot that shows the result I am getting here:
completion.png
Can you please explain what else I need to do in order to reproduce the problem?

Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
PAVLVS
CodeLite Curious
Posts: 5
Joined: Sat Nov 22, 2008 6:11 pm
Contact:

Re: Code completion future

Post by PAVLVS »

Hello Eran,
Sorry for a bad use case. I didn't check that code completion works in this case.
Here you find my original code where it doesn't:

Code: Select all

class Tetrahedron
{
public:
  Tetrahedron()
  { //n.n.
  }
  void set(short int i_1, short int i_2, short int i_3, short int i_4)
  { //n.n.
  }
  void set(short int i_1, short int i_2, short int i_3, short int i_4, bool out)
  { //n.n.
  }
};
int main(int argc, char** argv)
{
  Tetrahedron t;
  t.set(0, 1, 2, 3, false);
  return 0;
}
And below screen shots if you don't believe me ;)
Image
Image
(Here are links to images if are not displayed correctly:
http://w153.wrzuta.pl/obraz/8eGHlAldI96/prtsc1
http://w153.wrzuta.pl/obraz/aD4j5pZRcNS/prtsc2)
Cheers,
Paweł
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion future

Post by eranif »

PAVLVS wrote:Sorry for a bad use case
sure thing, the new example provides the same error here. The first use case was missleading.

I will have a look at it

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion future

Post by eranif »

Update:
Fixed in trunk

Eran
Make sure you have read the HOW TO POST thread
Post Reply