Incorrectly displayed code calltips

CodeLite installation/troubleshooting forum
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Incorrectly displayed code calltips

Post by marfi »

Hi,
I noticed, that function calltips are displayed incorrectly in CL SVN 2823 on Ubuntu 9.04. For example, my code looks like this:

Code: Select all

	void GetCompleteBoundingBox(wxRect& rct, int mask = bbALL);

	virtual void Scale(double x, double y, bool children = sfWITHCHILDREN);

	void Scale(const wxRealPoint& scale, bool children = sfWITHCHILDREN);
,but calltips for these functions are on mouse hover displayed in a following way:

Code: Select all

	void  wxSFShapeBase::GetCompleteBoundingBox(wxRect& rct ; , int mask = bbALL)

	void  wxSFShapeBase::Scale(const wxRealPoint& scale ; , bool children = sfWITHCHILDREN)

	void Scale
Notice that some strange semicolon is displayed in the first and the second calltip, and calltip for the third declaration is totally wrong. Moreover, calltips for Scale functions are exchanged. I tried to set various parameters in tags parser settings, but nothing helped me. Any idea what could be wrong?

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

Re: Incorrectly displayed code calltips

Post by eranif »

marfi wrote:Notice that some strange semicolon is displayed in the first and the second calltip,
Since i was able to reproduce it pretty easy (thanks for the example) I was also able to fix it quickly.
If you are interested: The problem was in the yacc grammar failing to initialize properly the '$$' variable, initializing it resolved it.

It is now committed in the SVN trunk.
marfi wrote:and calltip for the third declaration is totally wrong
Can u also provide an example for this ? I cant get a third tooltip here (my guess is that you have more Scale() methods not mentioned in this post)
marfi wrote:Moreover, calltips for Scale functions are exchanged
You will need to elaborate on this one, since I dont understand the problem

Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Incorrectly displayed code calltips

Post by marfi »

Thank you for the quick response! The problem with Scale() functions is following:

There are two different declarations of Scale() function in my code:

Code: Select all

   virtual void Scale(double x, double y, bool children = sfWITHCHILDREN); // FIRST declaration

   void Scale(const wxRealPoint& scale, bool children = sfWITHCHILDREN); // SECOND declaration
The second one internally calls the first one. If I move mouse cursor over the FIRST declaration, then following calltip is displayed

Code: Select all

    void  wxSFShapeBase::Scale(const wxRealPoint& scale ; , bool children = sfWITHCHILDREN)
but this is declaration of the SECOND version of the function (see the parameters). If I move cursor over the SECOND declaration, then CL shows this calltip:

Code: Select all

void Scale
and nothing more...

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

Re: Incorrectly displayed code calltips

Post by eranif »

Hi,

Here is another update with regard to this issue:

I manage to reproduce all what you reported using this code sample:

Code: Select all

class wxSFShapeBase
{
	void GetCompleteBoundingBox(wxRect& rct, int mask = bbALL);
	void Scale(double x, double y, bool children = sfWITHCHILDREN);
	void Scale(const wxRealPoint& scale, bool children = sfWITHCHILDREN); // #1 hovering here, displays 'void Scale'
};

void wxSFShapeBase::Scale(const wxRealPoint& scale, bool children)
{
	int v_stam;
	wxSFShapeBase::Scale(x, y, children); // #2 Hovering here, displays correct tooltip
	Scale(x, y, children);// #3 this one displays error in tooltip
	v_stam;
}
Most of the issues are now fixed in the SVN trunk except the last issue: Tooltip sometimes shows only 'void Scale', however, this is now reduced to cases where the hovering is done on the function declaration itself (comment #1 in the sample code)

in comment #3 and #2 in the sample code, the tooltip now shows
void wxSFShapeBase::Scale(double x, double y, bool children = sfWITHCHILDREN);
void wxSFShapeBase::Scale(const wxRealPoint& scale, bool children = sfWITHCHILDREN);
in addition, the tooltip will also choose signatures with default values over signatures without them.

Thanks for reporting this,
Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Incorrectly displayed code calltips

Post by marfi »

Wow, you are awesome! ;) Thank you for the quick fix!!!
Best regards
Michal
Post Reply