[2.0] views and Eclipse

154 views
Skip to first unread message

Andy Czerwonka

unread,
Apr 14, 2012, 1:38:03 PM4/14/12
to play-fr...@googlegroups.com
When I make changes to my views, Eclipse doesn't refresh until I restart it. For example, if I make a change my either introducing a new View or even make a significant change to an existing View, like change the parameters, Eclipse can't cope. It I restart Eclipse, it works again. Not the end of the world as those change less often, but it's a bit of a pain. Does anyone have any tricks that'll make that go away?

Raphael André Bauer

unread,
Apr 14, 2012, 4:00:26 PM4/14/12
to play-fr...@googlegroups.com

That works in our setup. Did you try the following?:
http://ars-codia.raphaelbauer.com/2012/03/play-2-enabling-eclipse-tooling.html


Any comments heavily welcome...

Best,


Raphael

Andy Czerwonka

unread,
Apr 14, 2012, 6:57:19 PM4/14/12
to play-fr...@googlegroups.com
Cool, I'll give that a try.

Andy Czerwonka

unread,
Apr 16, 2012, 1:00:31 AM4/16/12
to play-fr...@googlegroups.com
Nope, doesn't work. Adding new views requires a restart.

Aleksandr Fedorov

unread,
Apr 16, 2012, 4:39:48 AM4/16/12
to play-fr...@googlegroups.com


On Monday, April 16, 2012 9:00:31 AM UTC+4, Andy Czerwonka wrote:
Nope, doesn't work. Adding new views requires a restart.

It works perfectly for me. 
1.  Windows - Preferences - General / Worspace: disable "Build automatically", enable "Refresh using native hooks or polling", "Refresh on access"
2. Run play by "~run" command

Andy Czerwonka

unread,
Apr 16, 2012, 8:49:08 AM4/16/12
to play-fr...@googlegroups.com
That's weird. Doesn't work for me. I'm on Ubuntu and Indigo, so maybe something to do with that.

Yann Simon

unread,
Apr 16, 2012, 8:52:28 AM4/16/12
to play-fr...@googlegroups.com
- adding a valid route work. I can use the new one with autocompletion
in a redirect for example.
- add a parameter in a template does not work.
For example:
initial:
@(message)
ok(mytemplate.render("message"));

changed to:
@(message: String, name: String)
mytemplate.render() still accept only one string parameter
Opening mytemplate.class in eclispe always show the initial class.
It is maybe cached my eclipse.
Enable "Refresh using native hooks or polling" and "Refresh on access"
does not fix the issue.

- adding a view does not work

Yann

2012/4/16 Aleksandr Fedorov <fao...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/rByxlVTZA3gJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.

sas

unread,
Apr 16, 2012, 5:19:45 PM4/16/12
to play-framework
I have the same trouble

see this questions

http://groups.google.com/group/play-framework/browse_thread/thread/b9d5e7e31a1a4ad6

I'm also using ubuntu 12.04 and indigo, also tried with helios, same
problem...

If I issue a play clean eclipsify + F5 on eclipse it works fine

it's a bit annoying, and it breaks and otherwhise enjoyable experience

I'm using latest jdk 1.6 downloaded straight from oracle

I'll see if I can make a detailed step by step to reproduce the issue

saludos

sas

Yann Simon

unread,
May 9, 2012, 8:45:30 AM5/9/12
to play-fr...@googlegroups.com
2012/4/16 Yann Simon <yann.s...@gmail.com>:
> - adding a valid route work. I can use the new one with autocompletion
> in a redirect for example.
> - add a parameter in a template does not work.
> For example:
> initial:
> @(message)
> ok(mytemplate.render("message"));
>
> changed to:
> @(message: String, name: String)
> mytemplate.render() still accept only one string parameter
> Opening mytemplate.class in eclispe always show the initial class.
> It is maybe cached my eclipse.
> Enable "Refresh using native hooks or polling" and "Refresh on access"
> does not fix the issue.

The problem is not coming from eclipse, but from how the views are compiled.
I was expecting that the views are first compiled, and then the rest
of the application.

But it is not the case.
If I change the signature of a template, and if this change leads to
compilation error, the template is not compiled.
I could check this with javap.

It would by more developer friendly, if the views are compiled first,
so that the compilation errors are shown where the templates are
called.

>
> - adding a view does not work
It is working when there are no compilation error.
Reply all
Reply to author
Forward
0 new messages