Are there any tools which can automate rebuilding of the project when ever there is a change in some part of code? - eclipse

I use Eclipse IDE for my java projects and there are times in which I need to change some constants and test the effect of it.
But on change of the code I have to rebuild it which generally takes me 40 min and 5 more mins to start the server in debug mode.
So I am looking for some tools which make my task easy like cutting the rebuild time at least by 50 %.

You can put your constants out of the code. Put them in a properties file for instance. Then change your code to read the constants right from the properties file.
You will be able to build your code once and change the constants whenever you want.

If you're not already using it, you probably should look into setting up a continuous integration solution like Jenkins. You could automate builds to poll your code repository and monitor for changes, then run a suite of builds and tests with different flavors of constants to see the effect on your system.

Related

Eclipse keybindings. Setting up a shortcut for executing a specific run configuration

I'm trying to setup a key binding in Eclipse to directly execute a background Java file. My file is called CodeChecker.java and it's sufficient for my purposes to run the main method without any arguments. I need to run it repeatedly and so I'm trying to setup a shortcut key to run it directly without having to bring up the Run... menu or having to bring up the file itself.
As far as I'm aware Eclipse is not able to offer this functionality directly. I've tried using a plugin called Practically Macro according to this answer Assigning a keyboard shortcut for a specific Eclipse build configuration. But this answer is horribly out of date and doesn't work any longer.
So I'm wondering if Practically Macro can still be used to achieve this? Any other solution, plugin, script or otherwise would be equally welcome.

Eclipse autobuilder on certain file extensions

I'm setting up an Eclipse autobuilder to run the closure template compiler. I've already got an ant task setup and running automatically whenever any file changes. How can I set it up so that it only runs when I change a *.soy file?
I see that I can use a directory as a set of "relevant files," but my *.soy files may be scattered throughout the whole project.
You cannot do this with the Ant based builder. Instead you would need to implement your own incremental builder, extending the extension point org.eclipse.core.resources.builders. But as that would be a huge effort, the more efficient workaround might be to just filter in the Ant script itself.

how to suppress the enoying dialog boxes when developing xPages?

Anyone know how to remove or supress the enoying dialog boxes when developing xPages
If you are just making small xpages application you might not see these very often, but the more complex your xPages get you see these all the time. specially when you navigate your xpage using the outline view or during build
I click the x several times every day to get rid of it, Not sure if the operation quits when I click the x or if it continues in the background.
I would like a setting to get rid of it once and for all
Well, in your designer, you should disable Build automatically in the Project menu. This will remove the constant build, but also means that you have to build manually, when needed.
You could also take a look at Nathan T. Freeman's post on the matter # Making Domino Designer work like you want
Are you using any java libraries added to the webinf/lib dir in your nsf? I noticed that when adding any jar files to the lib dir rebuilding your application can take ages..
I had 2 external jar files used in my project (contained within the database). It used to take around 5-10 minutes to compile the project. Any changes to the XPages/Custom Control/Java files needs a recompile. And you can imagine the frustration I had with the compilation time. Later I detached the jar files and put under the jvm\lib\ext folder. The compilation time drastically reduced to 1 minute. Still not happy.
As a next step, took a local replica of the database and started making the changes and recompilation on the local replica. Once done, replicated the databases and always previewed the changes on the server version. The compilation time is hardly 10 seconds. So 10 minutes to 10 seconds :)
Switch off build automatically, it will solve most of these.
There is also a known issue SPR SODY8Q9KNA where Java Design elements (new feature in 8.5.3) keep getting rebuilt on designer start up. That brings up the same pop-up.
There should be a fix for that in 8.5.3FP1 but I am not in an official position to say it will be in FP1 until it actually ships. You can check in the release notes as they are updated.
http://www-10.lotus.com/ldd/r5fixlist.nsf/(Progress)/853%20FP1

Eclipse building the worskpace blocks the other eclipse operations

While using eclipse a couple of days back i observed that while building the workspace eclipse blocks other operations such as run , maven build etc and puts them on hold for quite some time. Is there a work around for this delay ??
In general, no. As builds, etc. modify the Eclipse file system (resources), it is dangerous to run other tasks that could read the file system (it could be inconsistent, etc.).
The only thing to do is to make sure that the build happens fast (enough). For that, incremental build needs to be enabled (that is fast even for a large number of projects in my machine), and/or the number of open projects has to be limited.

Eclipse: On Save execute a program

I have recently come across the LESS Leaner CSS a template engine for CSS based on ruby. The idea sounded neat, but in practice we need to compile the program to get CSS. This is cumbersome as we make too many changes while working on CSS and for every edit we don't want to compile.
In Eclipse, there are "Save-Actions" but it handles only formatting changes.
Is there a way on saving the file in Eclipse, to call or trigger the compilation?
Its easy to do this in Vi or Emacs.
I think all you need is to define a custom Builder for your project. That way, you can run a program or an ant script whenever certain files change.
Right click on the project -> Properties -> Builders -> New
While the Builders are a good solution, keep in mind they only work when a build is issued - either using auto-build or using a manual build which is invoked, well, manually. If you are looking for something that will operate after a save, regardless of the auto-build state you will need to write a plugin which listens to resource changes in Eclipse.
You do that by creating a workspace change listener and installing it like that:
ResourcesPlugin.getWorkspace().addResourceChangeListener(
..., IResourceChangeEvent.POST_CHANGE);
I'm sure you can take it from here :-)