Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-01

Code Tools Feature request

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

When I want to get information on an identifier, sometimes the 'jump to declaration' or the tooltip with declaration info do not appear, because the source code contains errors.

Example source code:

-----------------------------------------------------------------------------
Function TMyClass.SomeMethod(AnArgument: String) ;
begin
end;
procedure TMyClass.DoSomethingElse(AnArgument : String; Options : TMyoptions);

-----------------------------------------------------------------------------

if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it, it doesn't appear as a hyperlink (as it would if all was OK).

The reason is of course that the function declaration right before it is wrong. (it misses the return type). That's OK.

But what I would like to see is WHY I'm not getting any info... Presumably this is the error the code tools produce when looking for the info ?

Is it doable for the messages window to show this reason ?

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it, it doesn't appear as a hyperlink (as it would if all was OK).

I've also noticed this recently. Is this new behaviour in Lazarus? I'm pretty sure it wasn't always like this. Is CodeTools more sensitive to source code errors in recent Lazarus versions?

Regards,
- Graeme -

My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 6 lines
On 2016-01-15 09:59, Michael Van Canneyt wrote: > if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it, > it doesn't appear as a hyperlink (as it would if all was OK). I've also noticed this recently. Is this new behaviour in Lazarus? I'm pretty sure it wasn't always like this.

A missing function type raises an error since many years.

Is CodeTools more sensitive to source code errors in recent Lazarus versions?

In order to parse some new syntax features some errors are no longer ignored. So yes, you could say it got more sensitive to errors.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
In order to parse some new syntax features some errors are no longer ignored. So yes, you could say it got more sensitive to errors.

OK thanks. That's probably what I noticed then.

Regards,
- Graeme -

Reply by email

Ondrej Pokorny
to Michael Van Canneyt: When I want to get information on an identifier, sometimes the 'jump to declaration' or…
Michael Van Canneyt wrote 19 lines
Example source code: ----------------------------------------------------------------------------- Function TMyClass.SomeMethod(AnArgument: String) ; begin end; procedure TMyClass.DoSomethingElse(AnArgument : String; Options : TMyoptions); ----------------------------------------------------------------------------- if I hover over TMyOptions, then I get nothing. If I want to ctrl-click it, it doesn't appear as a hyperlink (as it would if all was OK).

Strange, your example works for me - I do have the hyperlink, I do get a hint when I hover over the type and I can Ctrl+Click it. So for me CodeTools ignore this particular error.

Ondrej

Reply by email

Mattias Gaertner
to Ondrej Pokorny
Show quoted text 13 lines
[...] > Function TMyClass.SomeMethod(AnArgument: String) ; > > begin > > end; > > procedure TMyClass.DoSomethingElse(AnArgument : String; Options : > TMyoptions); >[...] Strange, your example works for me - I do have the hyperlink, I do get a hint when I hover over the type and I can Ctrl+Click it. So for me CodeTools ignore this particular error.

It is ignored in mode Delphi, not in ObjFPC.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
On Fri, 15 Jan 2016 12:53:10 +0100 Ondrej Pokorny wrote: > [...] >> Function TMyClass.SomeMethod(AnArgument: String) ; >> >> begin >> >> end; >> >> procedure TMyClass.DoSomethingElse(AnArgument : String; Options : >> TMyoptions); >> [...] > Strange, your example works for me - I do have the hyperlink, I do get > a hint when I hover over the type and I can Ctrl+Click it. So for me > CodeTools ignore this particular error. It is ignored in mode Delphi, not in ObjFPC.

But would it be possible to show the error ? Try as I might, there is no error in the messages window. For other cases there is, but not for this.

Well. The least I can say is that it is not clear to me when the IDE shows a codetools related error in messages and when not :-)

Michael.

Reply by email

Ondrej Pokorny
to Michael Van Canneyt
Mattias Gaertner wrote
It is ignored in mode Delphi, not in ObjFPC.

Correct!

Show quoted text 5 lines
But would it be possible to show the error ? Try as I might, there is no error in the messages window. For other cases there is, but not for this. Well. The least I can say is that it is not clear to me when the IDE shows a codetools related error in messages and when not :-)

Yes, the error is shown when explicitely executing CodeTools functions, e.g. identifier completion (Ctrl+Space), or "Find declaration of ..." from the popup menu but not when just hovering with the mouse. Maybe this is intended in order not to having false errors reported all the time when writing the code?

Ondrej

Reply by email