Archive for the ‘Programming’ Category.

Eclipse kepler

I downloaded eclipse kepler today and tested it on my laptop.

Improved things:

  1. Memory usage is much less, and the IDE is more responsive. Juno was already good, but kepler uses even less memory.
  2. Highlighting the token under the cursor used to hang in Juno. Now it works without hanging in kepler.
  3. Javascript editor is improved. Some auto completion is implemented when ctrl+space is clicked.

Things that did not get fixed:

  1. Auto format on save for javascript still does not work
  2. The javascript formatter is still way behind the java one.

I didn’t test any JEE like JSF or JSP features. I also was not interested that much in HTML5 editing, even though I think I will try soon.

Final java dev environment

Screen shot of eclipse with a dark color theme while editing jBug

Screen shot of eclipse with a dark color theme while editing jBug

I’ve been going back and forth between IntelliJ’s idea, netbeans and eclipse for java development. I was able lately to setup eclipse with all the features I need, and performs all the compilation function required including pulling maven dependencies and hot deploying jetty’s code on save and the best thing was the ability to edit it’s colors using the CSS provided.

How to do that:

1. Using git clong jBug from
2. Inside there, there’s a directory called “settings” in which there are two files: preferences.epf (which includes the editor settings and color theme) and e4_default_gtk.css and that will set the color and font sizes of the tabs.
3. Copy the css file over your eclipse/plugins/org.eclipse.platform_4.2.1.v201209141800/css/e4_default_gtk.css

For plugins, using the market place add the following:

1. egit (to integrate with git)
2. Run-jetty-run, will use in-place deployment with jetty and will close and open the handlers and contexts if you change any of your classes or their dependencies (excellent work)
3. m2e for maven
4. Eclipse color theme. In case you wanted to change the theme edit the wombatcss.xml then import it.

Since eclipse is not a limited edition as idea, you will be able to edit jsp and other files that you won’t be able to edit in idea. It is also much more efficient in terms of memory usage than netbeans and does not block or stop erratically like netbeans as well.

Back to netbeans again after intelliJ misrepresenting compilation

So IntelliJ says it compiled successfully a project. However, when I execute maven jetty plugin to run a small web project, I end up with jars not being found. So what does it exactly mean when IntelliJ says compile successfully ? It seems that it just compiles them, and it really does not make any difference whether you compile or Make the project both cases will result in missing jars if you run the project using maven jetty plugin.

There’s lots of crap in netbeans however it seems to be the only edit that does what it says it’s going to do in terms of maven compilation. It sill suffers from some issue like for example you won’t be able to disable tests if you compile with dependencies.

For the time being I have to accept the flaring white colors of netbeans until one day I can figure out a more consistent way of configuring it.

Threw in the towel for using netbeans

I admitted defeat in using netbeans for doing anything useful. I tend to waste my time trying to fix the colors so that I can read the code, and that if I didn’t get totally frustrated from simple actions not happening as expected. Simple things like dependencies between maven modules should be happening automatically. If you used intelliJ’s idea and set auto-compilation to true, and change a class in one module, it will automatically build the dependent modules and fire errors if necessary.

There are several issues some of which are poorly written code. For example this bug report ( ) during typing javascript the editor will block to update the document structure. Since the primary function of an editor is to edit, then that should not be blocked by any other secondary function enhancing the editing. Things like auto-complete would block editing and for every few character I type I will have to click Esc just to continue editing. Formatting of HTML, JSP and JavaScript during editing is totally screwed up. Even though the setting will specify a certain location for braces and indents, things will end up in totally different locations and they won’t be fixed until you mark the whole code and reformat it.

For their credit they have a very good core integration with maven. However, features are not finished nicely all the way to the end. I really don’t know if the project is losing volunteers and that’s why it is adequately tested or it is being steered to the death path to be replaced by an even slower and worse project aka JDeveloper.

Using astyle from inside intelliJ idea

A simple way to maintain your code style, even possible across your team without a lot of configuration sharing. Add astyle as an external tool with the following command line:

astyle -A1 -Lpjt $FilePath$

That’s a reminder to myself as well when I forget. Then add a shortcut from the settings to the Tools -> astyle. A good short-cut that does not conflict with intelliJ shortcuts is Alt+F .

Netbeans dark look and feel on ubuntu

IntelliJ provides the dracula look and feel out of the box. The colors and contrast are excellent when it comes to writing code. Unfortunately, the JEE part is only in the paid version. I’ve been trying to get netbeans as close as possible in terms of look and feel to a dark high contrast look and feel. Continue reading ‘Netbeans dark look and feel on ubuntu’ »

More on web development using intelliJ and netbeans

I’ve been testing intelliJ for webdevelopment and I was mainly focused on servlets. When the time came to write some jsp/jsf pages I kept going around however, I found out at the end that it is not supported in the community version.

So, even though I liked intelliJ more than netbeans yet it seems that I have no choice except to edit my websites using netbeans. Continue reading ‘More on web development using intelliJ and netbeans’ »

Tetsing IntelliJ in writing java websites

Java is a very powerful language esp when used in web programming. It is very fast with a huge resource of code and libraries. The usual pain in the neck in writing a web application is deploying and packaging the application. The process takes time and until the programmer runs the application to figure his mistake he or she will have to wait half a minute or so.

I found that a faster alternative is to use in-place deployment, where the compiled code exists beside the source and most web servers can use that easily. Moreover, some web-servers like resin and I believe recent versions of tomcat can compile the code themselves, which is a great idea and sometimes saves a lot of effort. However, I like to compile my code from the editor so I can see my errors and fix them. Continue reading ‘Tetsing IntelliJ in writing java websites’ »