Play framework 2.0, Eclipse Helios, Scala IDE 2.0 plugin - Getting build errors out of the box - eclipse

I'm trying out 'Play Framework 2.0' on Scala IDE plugin 2.0, for Eclipse Helios (fully supported by Scala IDE plugin).
When I create a play application and choose Scala template, it does work. That is,"play run".
When running 'play eclipsify' and then importing the project into Eclipse, I am getting errors. Any ideas?

The screenshot reveals that you're in the Java Perspective. Go to Window - Open Perspective - Other... and pick Scala.
When you create a new Scala project, eclipse asks you to switch perspective. If you import an existing project however, it doesn't. I filed an enhancement request.

On the Scala IDE website there is a tutorial on how to configure the Scala IDE to do development with play2.0:
http://scala-ide.org/docs/tutorials/play20scalaide20/index.html
Follow the steps there and if it doesn't work please report issues to the tutorial's author or in the scala-ide-user ML.
By the way, I don't believe that changing Perspective will make any difference. The Eclipse perspectives are purely UI changes, the underlying behavior should not be affected.

I was waiting, hoping someone more knowledgeable would answer...
I'd look at the .project file for your messed-up project, compare it with a correct one, and hack the messed-up one as appropriate. I wish I could be more specific. I'd guess that the problem is in the <buildSpec> or <natures> section of the file.
You may want to back up the .project file up first. Make sure the project isn't open in Eclipse while you're editing it.

Right click your project, Configure > Add Scala Nature

I installed Eclipse Java-EE edition instead of standard Java Edition, and all works now.
I haven't gone back to repeat with standard Java Edition to confirm, but seems to only work with EE edition.

Related

How to include Swift support in Eclipse

Eclipse is the IDE of my choice so I searched for a solution to write Swift-based apps in Eclipse.
I found the following project: swiftclipse.
It seems very useful but the problem is that I've no idea how to include it in my Eclipse installation.
That project does not contain any useful code. It is just a feature project with two plugins each of which only contains an Activator. It has also not had any activity since last June.

Eclipse Add Perspective to Runtime

I'm creating a content analysis plugin for Eclipse and I'm testing it in Eclipse by running Eclipse Application.
This worked well (since my plugin only had to work with a plain text editor), but now my company has stepped over to using oXygen as XML plugin in Eclipse for our technical writers. To test whether my plugin also works with oXygen in use, I need to have the oXygen XML Author plugin working in the Runtime.
I have oXygen working in my main Eclipse, but that is not what I want: I need it in my Runtime Environment.
So my question is: how can I add this oXygen plugin to the Eclipse Runtime Environment?
Go to your debug/run configuration -> Select the configuration in question.
Go to plug ins tab. Check if the Oxygen plugin is in the list. If not then add it explicitly and launch the runtime again.
Hope it helps.
cheers,
Saurav

How do I run SBT from within Eclipse?

So far I've been running IntelliJ IDEA Community Edition for my Scala projects, but as my projects are expanding in complexity, I stumble upon more and more roadblocks with the IDE.
Like for example the simple fact that IDEA doesn't allow for web-development or Java EE development what so ever, which means using the Play Framework or TomEE in Community Edition leads to nothing but dead ends and frustration.
The only reason I switched to IDEA in the first place, is because of its excellent plugin system, allowing me to run SBT seamlessly as the primary scala compiler and library downloading tool with ease.
Searching around on Google, however I can only seem to find mentions about the eclipse plugin for sbt, that makes an sbt project Eclipse friendly, which is the exact opposite of what I'm really looking for.
I'm not willing to spend €89 per year for a student licence after all the pain it's put me through so far...
So my question is; is there a plugin for Eclipse that allows me to use SBT the same way as in IDEA? Or am I forced to go through the console?
There may be some movement in this direction in the future, but for now there is no such plugin.
Currently there is no Sbt plugin for Eclipse. Depending on your use-case, you could:
use the Eclipse builder
Pros: proper integration (error markers in Problems and editors, cancelation, progress reporting)
Cons: may get out-of-sync with the Sbt build file (when adding a dependency, for example), doesn't handle anything other than Java and Scala (like Play templates or route files)
use Sbt on the command line (make sure to disable auto-building in Eclipse)
Pros: can handle complex builds, classpath is always up to date
Cons: no integration (see above)
use Activator
Same Pros and Cons as Sbt, but with a pretty UI
We are working on an sbt-server plugin for Eclipse, which will delegate the build to an external Sbt process without giving up the convenience of integration. We hope to have something out towards the end of this year.
I think the main problem you are trying to solve for is too have sbt jar dependencies show up and get used natively by your eclipse project. You can do that with the IvyIDE plugin (which is found in the eclipse marketplace).
If you have that installed (and the eclipse plugin for sbt) then this closes the gap between systems.
To enable:
type the {sbt deliver-local} command from your terminal. This adds an ivy xml in your project's target directory
right click on your project. Choose the Ivy -> enable Ivy dependency management option
go into your projects properties. Highlight the Ivy property. Click the new button and navigate to the ivy xml file in your projects target directory.
Now your eclipse compiles off of your sbt managed dependencies and now you are doing everything you want except actually running sbt from within eclipse (which you only have to do now when you are changing dependencies)

Make Custom Project template in Eclipse IDE

I have been using Eclipse IDE for a long time. Its a really great IDE for Java/C/C++ (and other languages with its THOUSANDS of plugins). Every once in a while, I get the need for creating a Javax interface. To do this normally, I would setup the new java project then add what I need. But, wouldn't it be nice if I could just make a template project to automatically include the code for the files. How would I go about doing this? It it even possible? The Eclipse CDT can make a new project type. So can the Google ADT and Google App engine. So I would imagine it is possible. But how?
You must write your Eclipse plug-in that implements org.eclipse.ui.newWizards extension point. You can extend an existing "New Java Project" wizard, and provide your custom project layout implementation (see the API).
Regarding java projects you might be familiar with maven. Maven offers of project template mechanism called archetypes. I never created an own archetype but the explanation to do this (Guide to Creating Archetypes) does not seems to be so complicated.
So although this is not a special eclipse solution it might be helpful for you. Together with the m2eclipse plugin it also works nice together with eclipse.

Drools with Netbeans 6.1

I've downloaded and started to use Drools on a pilot project via it's "default" platform Eclipse. However, I would like to use it in Netbeans just the way plug-in works in Eclipse.
Any ideas/shot-cuts to do that?
There are quite a lot of features in the eclipse plugin, but there is (as yet) no plugin for eclipse.
You can of course use drools with netbeans just fine - just means that the IDE features that are rule specific won't be available, but it will work, its Just Another Library then !
(I use drools with intelliJ IDEA and I just created a little syntax definition to give me basic highlighting etc... but no other features. If I want them, I jump into eclipse).