RSS Feed Subscribe to RSS Feed


Live Templates in IntelliJ

As described here, IntelliJ’s live templates let you easily insert predefined code fragments into your source code.
I have posted some of my most used templates below, a link to my complete list of template files on GitHub (as a reference for myself when I setup new IntelliJ environments) and the steps I took to add the IntelliJ settings file to GitHub.

Tags: , , , , , ,

Eclipse 3.5 (Galileo) released

Eclipse 3.5 (Galileo) was released last week. I’ve been using the Release Candidates for a while, but the official release seems like a good time to post about some of the new features available that have been of most use to me…

  • An Open Implementation hyperlink has been added for overridable methods (you hold down the Ctrl key click on the overridable method to the list of implementing classes). I had been using the Implementors plugin to provide similar functionality, but it’s nice to finally have it as part of the standard release.
  • The Java compare editor now supports new text editing features like move/copy/delete line and formatting, and updates its structure while you are typing inside the editor
  • Introduction of a toString() generator
  • Although the ability to generate hashCode and equals methods was already present, the compiler can now detect whether a class overrides one but not the other (hence breaking this golden rule from Effective Java)
  • The compiler offers several new diagnostics, including finding dead code and warning when comparing identical values (e.g. would flag if var==var), along with suggested fixes.
  • The Memory Analyzer tool now comes built in
  • The JUnit4 version shipped with Eclipse has been updated to 4.5.

As well as some little but handy enhancements like:

  • Double clicking on the beginning or end marker of a comment now selects the whole comment.

  • In the headers of Javadoc hovers and the Javadoc view, references to other types and members are now links.

See also:

Eclipse 3.5 – New and noteworthy

Tags: ,

Eclipse not hitting breakpoints

While trying to debug some code recently in Eclipse, I have been running into an issue where the code has not always been stopping at breakpoints. It has been happening inconsistently, with the breakpoints sometimes getting hit, sometimes not, and it has been driving me crazy!

I finally tracked down the problem after spotting this blog post, which points to a known problem with the version of the JVM (1.6.0_14) I have been using. Downgrading to this previous version has solved it. Thankfully.

Tags: ,

Eclipse/Clearcase plugin error

I’m working with Eclipse and ClearCase at the moment, using the plugin from here:

Unfortunately, Eclipse keeps throwing up an error saying:
java.lang.IllegalArgumentException: Argument not valid: Could not get status information from view

I think I have finally found the cause. It seems ClearCase doesn’t always start up properly on my local PC. When that happens, I have found that manually starting it seems to stop the Eclipse errors. To manually start, go to
C:\Program Files\Rational\ClearCase\Service.EXE (or your lcoal install location)
And select the “Start ClearCase Service” option.

Tags: , , ,

JavaFX Plugin for Eclipse – too buggy?

After attending a meetup on JavaFX last month, I have been trying to get more familiar with the technology. I know that NetBeans is the ‘recommended‘ IDE for JavaFX, but I am an Eclipse devotee and thought that surely anything NetBeans can do Eclipse can do. Not in this case it seems.

Some simple JavaFX script just don’t seem to work with the Eclipse plugin. For example, the following snippet:

Stage {
    title: "Nodes"
    scene: Scene {
        fill: Color.LIGHTBLUE
        width: 220
        height: 170

Causes the following error:

incompatible types found: integer required: com.sun.javafx.runtime.location.FloatVariable

The same snippet compiled and ran straight off when I tried it before in NetBeans.

The only posting on it I could find is here. I took the advice and downgraded to JavaFX 1.0, which seems to have done the trick for now. If anyone out there has any suggestions on better solutions/fixes, I would love to hear them.

This isn’t the first time I’ve spotted some better GUI related functionality in NetBeans than in Eclipse (e.g. I briefly mentioned the NetBeans GUI Builder tool a while ago). There is no chance of me stopping using Eclipse completely, but maybe I will start using both…

Tags: , , , ,

NetBeans IDE

I have been playing around with the latest NetBeans IDE (v6.1) recently, mostly as part of some JEE and  Glassfish research I’ve been doing. I am a long time Eclipse user (even back to its predecessor, VisualAge for Java), but I have been pleasantly surprised by NetBeans. It’s UI is definitely a litlle clunkier than Eclipse, but it is fairly intuitive and easy to use and it also seems to useful GUI builder tool that I would like to experiment with more.

See some reviews here and here.

Overall, interesting and I’d like to use it some more, but I still have no plans to stop using Eclipse as my main IDE.

Tags: , , ,