Lift Eclipse Project

114 views
Skip to first unread message

Andy Czerwonka

unread,
Nov 9, 2010, 2:51:38 PM11/9/10
to Lift
Hello Lift-ers,

Can anyone point me to a resource that'll help me setup my Eclipse
Scala-IDE environment for a Lift Project? I taken the latest
lift_21_sbt project from GitHub as a starting point.

Vlad Seryakov

unread,
Nov 9, 2010, 3:08:49 PM11/9/10
to Lift
Check https://www.assembla.com/wiki/show/liftweb/ for articles about
Eclipse, also
check http://www.scala-ide.org/

Andy Czerwonka

unread,
Nov 9, 2010, 3:37:34 PM11/9/10
to Lift
Thanks. I found https://www.assembla.com/wiki/show/liftweb/Using_Lift_in_Eclipse_and_terminal_without_MVN_SBT
but I guess my version of the Scala-IDE doesn't work at all. I
installed it on the latest Helios (clean) and File->New->Acala
Application doesn't even work. I can't open any Scala files - I get
a:

Could not initialize class
scala.tools.eclipse.ScalaSourceViewerConfigurationUtils$

Oh well - I should probably just use a text editor as I've always had
trouble with the Eclipse Scala IDE - it's never really worked for me.

On Nov 9, 1:08 pm, Vlad Seryakov <vserya...@gmail.com> wrote:
> Checkhttps://www.assembla.com/wiki/show/liftweb/for articles about
> Eclipse, also
> checkhttp://www.scala-ide.org/

David Pollak

unread,
Nov 9, 2010, 3:40:33 PM11/9/10
to lif...@googlegroups.com
On Tue, Nov 9, 2010 at 12:37 PM, Andy Czerwonka <andy.cz...@gmail.com> wrote:
Thanks.  I found https://www.assembla.com/wiki/show/liftweb/Using_Lift_in_Eclipse_and_terminal_without_MVN_SBT
but I guess my version of the Scala-IDE doesn't work at all.  I
installed it on the latest Helios (clean) and File->New->Acala
Application doesn't even work.  I can't open any Scala files - I get
a:

Could not initialize class
scala.tools.eclipse.ScalaSourceViewerConfigurationUtils$

Oh well - I should probably just use a text editor as I've always had
trouble with the Eclipse Scala IDE - it's never really worked for me.

In the 4 years I've been doing Scala work, the Eclipse Scala plugin has never worked reliably. :-(
 

On Nov 9, 1:08 pm, Vlad Seryakov <vserya...@gmail.com> wrote:
> Checkhttps://www.assembla.com/wiki/show/liftweb/for articles about
> Eclipse, also
> checkhttp://www.scala-ide.org/
>
> On Nov 9, 2:51 pm, Andy Czerwonka <andy.czerwo...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello Lift-ers,
>
> > Can anyone point me to a resource that'll help me setup my Eclipse
> > Scala-IDE environment for a Lift Project?  I taken the latest
> > lift_21_sbt project  from GitHub as a starting point.

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

David Bernard

unread,
Nov 9, 2010, 3:53:09 PM11/9/10
to lif...@googlegroups.com
I use it daily (with trouble sometimes (wrong error)) : Eclipse
3.5/3.6 + scala-ide (for the right version of eclipse see
http://download.scala-ide.org) + M2eclipse + m2eclipse-scala + JRebel
you need to :
* increase memory settings (in eclipse.ini)
* enable JDT weaving (in preferences) after scala-ide installation
* create or import your project under eclipse (you should be able to
create from maven archetype if you use m2eclipse familly plugins)
* create a launcher to run src/test/scala/RunWebApp

Could you send the error (from error view) ?

The sample project you use is SBT based, so I can't help more (I don't use SBT).

/davidB

Andy Czerwonka

unread,
Nov 9, 2010, 4:18:10 PM11/9/10
to Lift
The last error I have (compiler error) is in LiftConsole. It can't
find _root_.scala.tools.nsc.MainGenericRunner. I'm guessing that's
some kind of compiler hook?


On Nov 9, 1:53 pm, David Bernard <david.bernard...@gmail.com> wrote:
> I use it daily (with trouble sometimes  (wrong error)) : Eclipse
> 3.5/3.6 + scala-ide (for the right version of eclipse seehttp://download.scala-ide.org) + M2eclipse + m2eclipse-scala  + JRebel
> you need to :
> * increase memory settings (in eclipse.ini)
> * enable JDT weaving (in preferences) after scala-ide installation
> * create or import your project under eclipse (you should be able to
> create from maven archetype if you use m2eclipse familly plugins)
> * create a launcher to run src/test/scala/RunWebApp
>
> Could you send the error (from error view) ?
>
> The sample project you use is SBT based, so I can't help more (I don't use SBT).
>
> /davidB
>
> On Tue, Nov 9, 2010 at 21:40, David Pollak
>
>
>
>
>
>
>
> <feeder.of.the.be...@gmail.com> wrote:
>
> > On Tue, Nov 9, 2010 at 12:37 PM, Andy Czerwonka <andy.czerwo...@gmail.com>
> > wrote:
>
> >> Thanks.  I found
> >>https://www.assembla.com/wiki/show/liftweb/Using_Lift_in_Eclipse_and_...
> >> but I guess my version of the Scala-IDE doesn't work at all.  I
> >> installed it on the latest Helios (clean) and File->New->Acala
> >> Application doesn't even work.  I can't open any Scala files - I get
> >> a:
>
> >> Could not initialize class
> >> scala.tools.eclipse.ScalaSourceViewerConfigurationUtils$
>
> >> Oh well - I should probably just use a text editor as I've always had
> >> trouble with the Eclipse Scala IDE - it's never really worked for me.
>
> > In the 4 years I've been doing Scala work, the Eclipse Scala plugin has
> > never worked reliably. :-(
>
> >> On Nov 9, 1:08 pm, Vlad Seryakov <vserya...@gmail.com> wrote:
> >> > Checkhttps://www.assembla.com/wiki/show/liftweb/forarticles about
> >> > Eclipse, also
> >> > checkhttp://www.scala-ide.org/
>
> >> > On Nov 9, 2:51 pm, Andy Czerwonka <andy.czerwo...@gmail.com> wrote:
>
> >> > > Hello Lift-ers,
>
> >> > > Can anyone point me to a resource that'll help me setup my Eclipse
> >> > > Scala-IDE environment for a Lift Project?  I taken the latest
> >> > > lift_21_sbt project  from GitHub as a starting point.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Lift" group.
> >> To post to this group, send email to lif...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> liftweb+u...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/liftweb?hl=en.
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890

David Bernard

unread,
Nov 9, 2010, 4:22:45 PM11/9/10
to lif...@googlegroups.com
Do you have scala-compiler in as dependencies.
FYI LiftConsole is not made to be run from eclipse but from a shell
(jline, arrows key don't work into a eclipse's console)

/DavidB

Andy Czerwonka

unread,
Nov 9, 2010, 4:25:40 PM11/9/10
to Lift
What is everyone using out there? Do I have to go back to Emacs? I
could use TextMate at home, but I was hoping to share the
configuration with my Windowz machine at the office. :-( And with
Apple deprecating Java.... :-(

On Nov 9, 1:40 pm, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> On Tue, Nov 9, 2010 at 12:37 PM, Andy Czerwonka <andy.czerwo...@gmail.com>wrote:
>
> > Thanks.  I found
> >https://www.assembla.com/wiki/show/liftweb/Using_Lift_in_Eclipse_and_...
> > but I guess my version of the Scala-IDE doesn't work at all.  I
> > installed it on the latest Helios (clean) and File->New->Acala
> > Application doesn't even work.  I can't open any Scala files - I get
> > a:
>
> > Could not initialize class
> > scala.tools.eclipse.ScalaSourceViewerConfigurationUtils$
>
> > Oh well - I should probably just use a text editor as I've always had
> > trouble with the Eclipse Scala IDE - it's never really worked for me.
>
> In the 4 years I've been doing Scala work, the Eclipse Scala plugin has
> never worked reliably. :-(
>
>
>
>
>
>
>
>
>
>
>
> > On Nov 9, 1:08 pm, Vlad Seryakov <vserya...@gmail.com> wrote:
> > > Checkhttps://www.assembla.com/wiki/show/liftweb/forarticles about
> > > Eclipse, also
> > > checkhttp://www.scala-ide.org/
>
> > > On Nov 9, 2:51 pm, Andy Czerwonka <andy.czerwo...@gmail.com> wrote:
>
> > > > Hello Lift-ers,
>
> > > > Can anyone point me to a resource that'll help me setup my Eclipse
> > > > Scala-IDE environment for a Lift Project?  I taken the latest
> > > > lift_21_sbt project  from GitHub as a starting point.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890

Florian Heinisch

unread,
Nov 9, 2010, 5:00:56 PM11/9/10
to lif...@googlegroups.com
I currently use IntelliJ with the Scala plugin. I first gave Eclipse and Netbeans a try - did not work out for me. It seems IntelliJ is most suitable for Scala programming if you prefer to work with a full blown IDE.

> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.

Andy Czerwonka

unread,
Nov 9, 2010, 5:13:01 PM11/9/10
to Lift
Are you working with Lift?

Florian Heinisch

unread,
Nov 9, 2010, 5:46:06 PM11/9/10
to lif...@googlegroups.com
Yes, I use IntelliJ for a Lift project.

It's pretty straight forward: Just use one of the Maven archetypes to create a Lift project and import this project into IntelliJ.
Just in case you are not familiar with IntelliJ, this article describes how to in detail:
http://blog.morroni.com/2010/07/14/setup-intellij-9-for-lift-framework-development/comment-page-1/

If you prefer SBT have a look at Heiko's article about Scala with SBT and IntelliJ:
http://heikoseeberger.blogspot.com/2010/08/how-to-setup-scala-project-with-sbt-and.html

Andy Czerwonka

unread,
Nov 11, 2010, 2:49:19 PM11/11/10
to Lift
On Nov 9, 3:46 pm, Florian Heinisch <flor...@heinisch.cc> wrote:
> Yes, I use IntelliJ for a Lift project.
>
> It's pretty straight forward: Just use one of the Maven archetypes to create a Lift project and import this project into IntelliJ.
> Just in case you are not familiar with IntelliJ, this article describes how to in detail:http://blog.morroni.com/2010/07/14/setup-intellij-9-for-lift-framewor...
>
When I run your example, it works great. If I try and change the
archetype to something more recent, say lift-archetype-basic_2.8.0 and
2.2-M1 as the version, there is no run menu available when I import
the project.

Note: I posted this message on the blog

Andy Czerwonka

unread,
Nov 11, 2010, 3:30:23 PM11/11/10
to Lift
This is what I created:

mvn archetype:generate -U \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.8.0 \
-DarchetypeVersion=2.2-M1 \
-DremoteRepositories=http://scala-tools.org/repo-releases
\
-Dversion=0.1 \
-DgroupId=com.andyczerwonka.test -DartifactId=test

No run menu option in IntelliJ plus no incremental compilation.

Florian Heinisch

unread,
Nov 13, 2010, 1:00:37 PM11/13/10
to lif...@googlegroups.com
For the case, your run button is greyed out, there are two ways in IntelliJ to run "mvn jetty:run":
1. On the very right side of the IDE there is a small bar with vertical buttons - hit the "Maven Projects" button. You should see your maven project there, just expand the root tree node, then "Plugins", then "jetty" and double click "jetty:run"
2. In the menu bar -> Run -> Edit Configurations -> click the + button left on top -> Maven. In the textfield "Working directory" paste the absolute path to your project (the directory that contains the pom.xml), in the textfield "Goals" paste jetty:run.

By incremental compilation you mean that IntelliJ does not display errors in your Scala source code upon typing (which I cannot reproduce) or that IntelliJ does not compile the class when you save the file?
For the latter case: IntelliJ does not autocompile files such as Eclipse does (however it saves the file you edit automatically). If you want to have autocompilation as in Eclipse have a look here:
http://www.jetbrains.com/idea/documentation/migration_from_netbeans_faq.html#Can_I_enable_compile_on_save_in_IntelliJ_IDEA
Or you simply remap the default shortcut for compilation Shift+F9 (Shift+Command+F9 on the Mac) to CRTL+S (or Command+S) in File -> Settings -> Keymap

Hope this helps!

Andy Czerwonka

unread,
Nov 13, 2010, 1:50:33 PM11/13/10
to Lift

> By incremental compilation you mean that IntelliJ does not display errors in your Scala source code upon typing (which I cannot reproduce) or that IntelliJ does not compile the class when you save the file?

IntelliJ does not display errors as I type and it does not compile the
class as I save it either. I'll try the "Eclipse-mode" plug-in, but I
was assuming IntelliJ would highlight errors.

Andy Czerwonka

unread,
Nov 13, 2010, 2:32:05 PM11/13/10
to Lift
Looks like 'Eclipse Mode' is broken....

null
java.lang.AssertionError
at
com.intellij.openapi.project.DumbServiceImpl.waitForSmartMode(DumbServiceImpl.java:
230)
at
com.intellij.compiler.impl.CompileDriver.processFiles(CompileDriver.java:
1709)
at
com.intellij.compiler.impl.CompileDriver.invokeFileProcessingCompilers(CompileDriver.java:
1095)
at
com.intellij.compiler.impl.CompileDriver.doCompile(CompileDriver.java:
730)
at com.intellij.compiler.impl.CompileDriver.access
$300(CompileDriver.java:98)
at com.intellij.compiler.impl.CompileDriver$5.run(CompileDriver.java:
220)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:
141)
at com.intellij.openapi.progress.impl.ProgressManagerImpl
$TaskRunnable.run(ProgressManagerImpl.java:428)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:
388)
at com.intellij.openapi.progress.Task.queue(Task.java:65)
at
com.intellij.compiler.progress.CompilerTask.start(CompilerTask.java:
312)
at
com.intellij.compiler.impl.CompileDriver.isUpToDate(CompileDriver.java:
214)
at
com.intellij.compiler.CompilerManagerImpl.isUpToDate(CompilerManagerImpl.java:
250)
at
org.intellij.trinkets.eclipseMode.incrementalCompiler.SaveListener.executeMake(SaveListener.java:
58)
at
org.intellij.trinkets.eclipseMode.incrementalCompiler.SaveListener.contentsChanged(SaveListener.java:
24)

Florian Heinisch

unread,
Nov 15, 2010, 4:47:54 PM11/15/10
to lif...@googlegroups.com

IntelliJ definitely should highlight errors, works perfectly for me.
Did you install IntelliJ's Scala plugin? Which version of IntelliJ do you use?

Florian Heinisch

unread,
Nov 15, 2010, 4:55:53 PM11/15/10
to lif...@googlegroups.com
Sorry - I do not use this plugin, so I did not know it is apparently not working for recent versions (just saw comments on the plugin site that state it does not work for IntelliJ version 9.03 and 9.04).

Andy Czerwonka

unread,
Nov 15, 2010, 5:55:41 PM11/15/10
to Lift
I'm going with TextMate and SBT for now. I spent the whole weekend
trying to get things to work and have not succeeded. I do want
refactoring, so I'll try IntelliJ again if things start working with
IntelliJ 9.0.4.
Reply all
Reply to author
Forward
0 new messages