How to count total lines of code of a GWT project?

109 views
Skip to first unread message

Tom

unread,
May 13, 2014, 3:37:33 AM5/13/14
to google-we...@googlegroups.com
Does GWT 2.5 provide a tool to count total lines of code of a GWT project?

I installed GWT2.5 in eClipse Juno, in Client package I have about 191 java files, in Server package I have about 41 java files.

Some java files have 12000 lines of code some only have 1 or 2000 lines. But there are comments as well.

So I think, on an average, each java file has 3000 lines of code, but I am not so sure. 

So how to count the total lines of code (not counting the comment lines) of a GWT Project  in eClipse?

Drew Spencer

unread,
May 13, 2014, 5:27:38 AM5/13/14
to google-we...@googlegroups.com
Get the metrics 2 plugin: http://metrics.sourceforge.net/

I think this will do exactly what you want.

Tom

unread,
May 13, 2014, 6:42:44 AM5/13/14
to google-we...@googlegroups.com
Can we have other solution?

Last time I did update something for eClipse & after that couldn't run my app properly. So my eClipse is stable now & I am very scary of updating it.

Tom

unread,
May 13, 2014, 6:54:08 AM5/13/14
to google-we...@googlegroups.com
My Godness, I put http://metrics.sourceforge.net/update & now G symbol disapppeared?? 
Why, it's terrible now Why all the Gui structure gone???

On Tuesday, May 13, 2014 7:27:38 PM UTC+10, Drew Spencer wrote:

Tom

unread,
May 13, 2014, 6:55:11 AM5/13/14
to google-we...@googlegroups.com
My Godness, I put http://metrics.sourceforge.net/update & now G symbol disapppeared?? 
Why, it's terrible now Why all the Gui structure gone???

Why "Could not create the view: com.android.ide.eclipse.ddms.views.LogCatView"?

Drew Spencer

unread,
May 13, 2014, 7:08:48 AM5/13/14
to google-we...@googlegroups.com
That doesn't sound like expected behaviour. I would guess there is something else wrong with your installation of eclipse if the GUI is getting all messed up like that after a very simple plugin is installed.

I've never had any such problems. Maybe if you post more information about what is going on someone can help you.

Drew

Tom

unread,
May 13, 2014, 7:25:41 AM5/13/14
to google-we...@googlegroups.com
Ok, I installed again Google Plugin but this time after relaunched Eclipse I saw a red "!" in my project name. 

Also I saw message "JRE version is 1.6.0; version 1.7.0 or later is needed to run Google Plugin for Eclipse."

However, I went to Window--> Preferences --> Java --> Installed JREs & I saw

jre6 -  C:\Java\jre6  - Standard VM

So Eclipse already got jre6 why it got that error?

Do you know how to fix?

Thomas Broyer

unread,
May 13, 2014, 7:33:20 AM5/13/14
to google-we...@googlegroups.com
Yes, 1.6, that's what it tells you. And you need 1.7.
Also, this is the version of Java used to run Eclipse, not necessarily the one selected for your Eclipse project.

Tom

unread,
May 13, 2014, 7:55:31 AM5/13/14
to google-we...@googlegroups.com
tNo, the message saying that JRE 6 or 7 & I got JRE 6 so it will be fine.

I just fixed & not sure it's ok. I right-click myProject--> Google-->Web ToolKit Setting-->Java Build Path --> "GWT SDK " --> click Edit--> select GWT 2.6.0

ANd now the error gone.

Only saw these warning:

[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/C:/Users/henry/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html

This is a serious warning?

You said that we DO NOT need to deploy gwt-dev.jar so we don't need to include gwt-dev.jar into lib. Is that correct?

2nd before I used GWT2.5, but after reinstall GWT Now I saw GWT2.6 & Now I am using GWT 2.6 . GWT2.6 need Java 7 or Java 6 is OK?

I am using JRE 6 at this moment.

Drew Spencer

unread,
May 13, 2014, 8:09:58 AM5/13/14
to google-we...@googlegroups.com
No dude, it doesn't say 6 or 7, it says "version 1.7.0 or later is needed to run Google Plugin for Eclipse."

I think you need the v7 JDK on your system path.


--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/zB4-XoFAD54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Drew Spencer

Tom

unread,
May 13, 2014, 8:12:46 AM5/13/14
to google-we...@googlegroups.com
That' right, I installed JRE 7 & now no error. 
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Drew Spencer

Thomas Broyer

unread,
May 13, 2014, 8:42:56 AM5/13/14
to google-we...@googlegroups.com


On Tuesday, May 13, 2014 1:55:31 PM UTC+2, Tom wrote:
tNo, the message saying that JRE 6 or 7 & I got JRE 6 so it will be fine.

I just fixed & not sure it's ok. I right-click myProject--> Google-->Web ToolKit Setting-->Java Build Path --> "GWT SDK " --> click Edit--> select GWT 2.6.0

ANd now the error gone.

Only saw these warning:

[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/C:/Users/henry/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html

This is a serious warning?

You said that we DO NOT need to deploy gwt-dev.jar so we don't need to include gwt-dev.jar into lib. Is that correct?

Yes; and you should update to 2.6.1 as it contains fixes around this warning.
(and no, it's apparently not yet available as an Eclipse plugin, and I have no idea when it'll be)
 

2nd before I used GWT2.5, but after reinstall GWT Now I saw GWT2.6 & Now I am using GWT 2.6 . GWT2.6 need Java 7 or Java 6 is OK?

IIRC, GWT 2.6 was planned to support Java 6 but actually needs Java 7. That's only about the GWT compiler though, you can use Java 6 on your server.
I haven't checked how GWT 2.6.1 was built and what it actually requires.

I am using JRE 6 at this moment.

Any reason for using an outdated and unsupported version? Why aren't you using the latest Java 7 or Java 8?

Tom

unread,
May 13, 2014, 9:23:10 AM5/13/14
to google-we...@googlegroups.com
Thank you Thomas, I am using Java 7 now, I just afraid the incompatible problem, ie I afraid my GWT app  (previously built using JDK6 ) could have problem when running in JDK7.

Tom

unread,
May 13, 2014, 9:33:56 AM5/13/14
to google-we...@googlegroups.com
i got gwt-dev.jar (the 2.5 version) in lib folder, now I just copy gwt-dev.jar of  2.6 version & I got no error. Thank you very much for your info.
Reply all
Reply to author
Forward
0 new messages