Tag Archives: helios

Helios: How to Prepare Your Eclipse for RCP/Plugin Development

Some RCP-newbies are having difficulties to correctly setup their environment for RCP/Plugin development. Most of them are familiar with Eclipse but not using the Eclipse for RCP/RAP developers package. The problem is sneaky because everything is working except that you don’t get proposals when adding child to the extension. See the following video.

How to fix that? You have to install Eclipse RCP Plug-in Developer Resources from Helios repository and this video shows you how.

Now you can develop the RCP application as you like.

Eclipse Helios: 5 JDT Improvements

Helios has been released. This simultaneous release includes more projects but many people still regard Eclipse as Java IDE. So in this post, I want to share the most important JDT improvements that I think will be loved by most Java developers.

Java Formatter Improvements

I’ve discussed this improvements on my other post.

Package Abbreviation

This is a very nice touch improvement especially if you’re working with a big projects. The abbreviation can be set on Preference → Java → Appearance. Check the Abbreviate package names box and set the rules.

Better Generic Support

The support for Java generic is improved. In the formatter, in the javadoc, in the javadoc hover… Overall. Is better. This is including the fix for my little generic quiz and bugs mentioned in the bug list.

New Icon for Build Problems

It’s always weird seeing a project with error but no resource is marked as error. With this new icon, I hope I will be less confused next time I encounter a build problems.

Debugger detailed view

This is the one I love most. I discussed this feature before on my other post. The problem is, changing the properties via dialog isn’t really comfortable. With this improvement, you can edit all breakpoint properties without opening any dialog.

Eclipse Helios’ Java Formatter Improvement

A new milestone of Eclipse 3.6 just released with a long new and noteworthy list.

Instead of discussing what’s new from this release, I want to discuss a set of improvement from its Java Formatter. I still love Eclipse’s Java Formatter and with these new improvements, I even love it more. This improvements unfortunately didn’t make their way to list of new and noteworthy, hence the reason why I wrote this blog post.

First, we can now turn off the formatter for some part of your code that you don’t want to format automatically. This is achieved by defining special tags.

This is very useful to format a part of your code that will if formatted will be uglier. For example:

		// [format off]
		foo(           "|------------|\n"            +
		    "-----------|------------|-----------\n" +
	         "----------|   FORMAT   |----------\n"  +
	          "--------- |          | ---------\n"  +
	            "-------  |        |  -------\n"  +
	                      "--------");

No tools can keep this formatting no matter what are you trying, right? 😉

The next improvement is very beautiful. This is result of bug entry 59891 which is posted five years ago (! just to make sure that you understand its complexity).

Basically the problem is if you have nested method calls, Eclipse can’t group the arguments based on their call level. So if you have something like:

public class Main {
    public static void main(
            String[] args) {
        foo(bar(1, 2, 3), baz(4, 5, 6, 7));
    }
}

In case the editor set to wrap on 40th characters, you will get:

public class Main {
    public static void main(
            String[] args) {
        foo(bar(1, 2, 3), baz(4, 5, 6,
                7));
    }
}

With the improvement, you will get:

public class Main {
    public static void main(
            String[] args) {
        foo(bar(1, 2, 3),
                baz(4, 5, 6, 7));
    }
}

Very nice!

A longer example (based on post on StackOverflow.com).

With old formatter, the best you can get is:

		Options options = new Options().addOption(OPTION_HELP_SHORT,
				OPTION_HELP, false, "print usage information").addOption(
				OPTION_VERSION_SHORT, OPTION_VERSION, false,
				"print version and exit").addOption(
				OptionBuilder.withLongOpt(OPTION_PROPERTIES)
						.hasArg()
						.withArgName("FILE")
						.withType(File.class)
						.withDescription("specify a user properties file")
						.create());

Or anything explained on the original post. With the new improvement, you can set the formatter to get something like this:

		Options options = new Options()
				.addOption(OPTION_HELP_SHORT, OPTION_HELP, false,
					"print usage information")
				.addOption(OPTION_VERSION_SHORT, OPTION_VERSION, false,
					"print version")
				.addOption(	OptionBuilder
									.withLongOpt(OPTION_PROPERTIES)
									.hasArg()
									.withArgName("FILE")
									.withType(File.class)
									.withDescription("specify a user properties file")
									.create());

Beautiful, isn’t it? Just one bug maybe since there is a white space before OptionBuilder.

Beside those two, Helios also bring further supports for formatting annotations and various bug fixes. You can check the whole list by clicking this link.