STS - Build On Save - eclipse

I have inherited a Grails project and am pretty new to Grails as well as Eclipse. I have the project in STS 2.6.1. Every time I save a file the project does a complete compilation from scratch. I have unchecked Project -> Build Automatically. Any ideas?

That doesn't sound right. There should be an incremental compilation occurring on save. It could be that there is something wrong with the configuration of the project that is causing a "Refresh Dependencies" over and over again.
What is the feedback that you are getting that tells you there is a full build occurring?
Take a look at what is going on in the console view when this is happening, also look at the Progress view. Both will tell you if there are any grails-specific processes happening.
Lastly, have a peak at the error log and see if there are any relevant entries. With a little more information, we can probably figure out what is going on.

Related

Eclipse Project > Configure

I just happened to disable Maven Nature. Now to re-enable it again I was trying to do Right Click Project: Configure > Convert To Maven Project.
However I do not see Configure option anymore. How do I convert it back to maven project again? I deleted the project and re-checked it back from the truck but to no avail!
Never mind, I fixed the problem just by restarting eclipse. Looks like lot of inconsistencies arise if you operate Eclipse for too long. I guess its good practice to save work and restart eclipse every now and then.

Where do an Eclipse's plugins log files go to?

I have an eclipse plugin which is failing. I developed/enhanced it based off of another plugin. When I deploy this plugin as an update site and install it into another instance of eclipse, it works initially (the view shows up). But as I try to interact and use the view, it's functionality is broke (it doesn't do anything when I click a given button). I don't see any error on the screen and nothing in the Eclipse Error Log view shows up.
I want to know where/if it has any error log files by default? If it had any custom loggers where would these sent to? I'm using Eclipse 3.7 (Indigo).
If I want to find out the cause of this exception must I implement my own custom log files?
Well, The error log file will be in your "eclipse workspace"\.metadata\.log
But that's just the file that shows up in the Eclipse Error Log view.
If the plugin you are using had some sort of extra logging (I doubt it) the logical place for it would be "eclipse workspace"\.metadata\.plugins\{plugin.name}" although that depends on the application..
If your application works when you debug it, but doesn't work when you deploy it, it's probably some sort of deployment issue.. Eclipse can be very very picky about picking up new versions of jars. Make sure you update your manifest version or delete your work space before doing an install. Another thing that can happen is you are missing plugins or plugin fragements that are needed or the minimum version specified isn't correct.
You don't have to implement logging. You can use eclipse to attach a debugger to your deployed application and then debug the application as you would normally. Although, if you plan on selling your application, logging is always a good idea :)
Go to eclipse installed directory and inside .metadata folder there will be a log file without name. That will be the plugin log

Play Framework + Eclipse: undefined method for ReverseApplication

I'm having a little trouble (more like an annoyance, really) when using the Play Framework with Eclipse.
I'm following this tutorial to get started with Play. In a certain moment in the tutorial, it asks us to type in this code:
public static Result index() {
return redirect(routes.Application.tasks());
}
This works as expected when running the application. The problem is that Eclipse doesn't like it. It says:
The method tasks() is undefined for the type ReverseApplication
While underlining tasks with the dashed red line. Is there a reason for this to happen? I've tried cleaning and compiling the project (through the Play terminal) and refreshing the project in Eclipse, but to no avail.
Is there something I can do about it?
I'm using Eclipse Juno, build 20120606-2254
Thank you so much!
Since the views are Scala code, they are compiled by the Scala compiler (ie your Play console through sbt). So Eclipse cannot compile and find these.
So, your best option is to configure Eclipse so that it automatically refresh the workspace and make sure that the folder "target/scala-2.9.1/classes_managed" is in your build path (it should be done by the "eclipsify" command).
If it does not work after all these steps, try "clean", "compile" and "eclipsify" (for Play 2.0.x) or "eclipse" (for Play 2.1.x) and refresh your projet.
Close and open your project in Eclipse. This worked for me (Eclipse Juno).
None of the previous suggestions worked for me, but when I did a refresh on the target folder, the red underlining on my view references went away.
The Play command used to be called "eclipsify". It is now called "eclipse".
Generally, I do the following and it works pretty well with Eclipse
-at the start of the day, start the play console in your project dir and do 'clean' and 'run'
-open a web browser point to the app (localhost:9000)
-launch eclipse
-make code changes...
-Play will rebuild the app whenever code changes occur. So refreshing the app in
the browser.
-back in eclipse, Refresh the project to reload the files that play rebuild just made.
I know it has been a year since #nico_ekito's answer but just wanted to add this.
Adding /target/scala-2.10/classes_managed and ensuring that Eclipse automatically refreshes the workspace fixed it for me. Thanks #nico_ekito
Using Eclipse Kepler, play framework 2.2.2

Project.property file missing

Can someone help fix this: I'm opening my project in eclipse, i'm getting the following error
Project has no project.properties file! Edit the project properties to set one.
I've already tried using Android Tools>Fix Project Properties option. Didn't work!
I went through some of the solutions around and none really answered my query. Most of them suggest that it's some kinda error importing the project but i never removed it from my workspace.
I'm not sure if this has anything to do with the error i'm getting, but just this morning my comp wouldn't start up and windows restored itself to a really, really old state (i'm guessing to a time before I had the sdk's and stuff). I had to reinstall the sdk's and i did, but the error still didn't go away.
try clean your project. if does not work, then you create another project but you select the option create project from existing source.

Compiling in Eclipse/STS produces no output

I'm a Visual Studio .NET developer who's trying to switch to Eclipse/SpringSource Tool Suite, so I get stuck on probably simple problems. Please bear with me.
I'm working on a Spring MVC project associated with an Apache Tomcat server. If I right-click the server and choose Start (alternatively Package Explorer->right-click project->Run As->Run on Server), my project is compiled and started. Compiler output is shown in Console window. Fine.
But if I simply want to compile the project without running it, I try selecting Project->Build All, Project->Build Project, or Project->Build Working Set. Nothing happens, no screen output, nothing -- despite having non-compiling code.
I expected to see the compiler errors on screen, preferably with the errors highlighted in the code. For what it's worth, I have deselected Project->Build Automatically. Anybody knows what I should do?
Eclipse and STS use incremental compilation. So, every time a file is saved, it is automatically compiled (as well as all files dependent on it). When you deselect Build Automatically, then yes, you will need to explicitly build, but this will still be an incremental build (ie- only the changed files and dependencies).
See here for a bit of a discussion on how incremental building works in Eclipse: http://www.eclipse.org/articles/Article-Builders/builders.html