Need line numbers for methods

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

Need line numbers for methods

Postby amcgilly » Sat Dec 20, 2008 12:09 am

When Servoy reports an error it specifies the line number the error occurred on.

Eclipse's line numbers are for the entire file containing the method, rather than the method itself. This makes it difficult to use the line number reported in the error message.

Any way to see line numbers for individual methods within Eclipse?
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Re: Need line numbers for methods

Postby IT2Be » Sat Dec 20, 2008 1:38 pm

Eclipse's line numbers are for the entire file containing the method, rather than the method itself. This makes it difficult to use the line number reported in the error message.
Huh, maybe I miss something but the line number mentioned is the same as in the file so it is easy to navigate to it (use <ctrl><L> or <apple><l> and type in the line number).
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Need line numbers for methods

Postby ryanparrish » Sat Dec 20, 2008 3:16 pm

I'm pretty sure he is referring to when there is an exception thrown in smart client, only the line number in the function (rather than the whole .js file) is displayed.

I would like to know the answer to this also.
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: Need line numbers for methods

Postby ROCLASI » Sat Dec 20, 2008 3:38 pm

Hi Ryan/Adrian,

I just tested it in Developer 4.1 and the error shows the linenumber in the file, not the linenumber in the function. So it works correctly.
Or are you talking about some error message in Client ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Need line numbers for methods

Postby ryanparrish » Sun Dec 21, 2008 5:56 pm

Should probably be a little more specific.
This behavior is exhibited in smart client in a deployed solution, not smart client from developer, where it does show the correct line number in the .js file.
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: Need line numbers for methods

Postby IT2Be » Mon Dec 22, 2008 11:17 am

This behavior is exhibited in smart client in a deployed solution
In that case I would create a ticket in the support system.
Hopefully they can solve this.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Need line numbers for methods

Postby amcgilly » Tue Dec 23, 2008 1:52 am

I will create a case in the support system. Thanks.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Re: Need line numbers for methods

Postby jcompagner » Tue Jan 06, 2009 12:53 am

this is not that simple, we need a repo upgrade (solution version upgrade) for this to happen
because the solution model doesnt know about the line numbers at all so we dont have that information in deployed mode
So this wont happen before at least 4.2
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Need line numbers for methods

Postby IT2Be » Tue Jan 06, 2009 12:57 am

I have now seen it myself as well.

Not only is it that the line # is reported per method but the line where the function is declared is also seen as line 1 as far as I can see.
That means that line #8, for instance is in fact line #6.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Need line numbers for methods

Postby ryanparrish » Tue Jan 06, 2009 1:24 am

IT2Be wrote:I have now seen it myself as well.

Not only is it that the line # is reported per method but the line where the function is declared is also seen as line 1 as far as I can see.
That means that line #8, for instance is in fact line #6.


For a second there was I starting to think Marcel was some super programer that has never had an exception in deployed code ;)
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: Need line numbers for methods

Postby IT2Be » Tue Jan 06, 2009 1:26 am

For a second there was I starting to think Marcel was some super programer that has never had an exception in deployed code
I am not sure that I should see this as a compliment or not.
Only for a second ;)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Need line numbers for methods

Postby martinh » Thu May 28, 2009 10:45 am

I just migrated my solutions to 4.1.3 and I must fully agree with Adrian. With Eclipse it is not easy to find where the bug is located.

I get message like this:

TypeError: Cannot find function setText. (myMethod#141)

In 3.5 I looked on line 141 within method myMethod and I found the line that caused the problem.
Now using Eclipse I find the errorline on line 10932 and nowhere I see some reference to line 141

So please fix this.

By the way, it looks like the error is caused by incompatibilty between the I2TBE menubar in 3.5 and the Servoy menubar in 4.1.3
I'll have to find out why I get this error
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Need line numbers for methods

Postby martinh » Thu May 28, 2009 10:53 am

martinh wrote:By the way, it looks like the error is caused by incompatibilty between the I2TBE menubar in 3.5 and the Servoy menubar in 4.1.3
I'll have to find out why I get this error


Indeed there was a case.

I2TBE menubar used .setText() method, while Servoy menubar uses .text property.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Need line numbers for methods

Postby jcompagner » Thu May 28, 2009 10:55 am

inside eclipse the line numbers should be correct of the exceptions you get (you should just be able to click on them in the log)

but on the server the line numbers are not correct if you look at the complete file, they are the linenumbers relative to the method itself. (just like 3.5 but there you wouldnt have one big file)
In 4.2 we fixed this, so also on the server you will have the right linenumbers on the server.

about your menu bar plugin. This is a know problem in 3.5 you had to do setText(xxx) but in 4.1.3 you have to do text = xxxx
in 4.1.4 we fixed this so that both variants will work.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 2 guests