Archive for the ‘Eclipse RCP’ Category

When you stuck upon Eclipse

Based on my experience, there is only two things you can do when you stuck upon Eclipse :

  1. Keep searching
  2. Wait for the next update to be released.

Eclipse is still growing after all …

powered by performancing firefox

Action or Handler

When I code using swing, I used to wrote the controller part of the MVC in Action classes. So, when I code in eclipse RCP, I wrote it also in Action classes.

I was wrong.

The code was fine until the program need to get the result of the business process operations. The Action class in eclipse RCP doesn’t return anything. After I searched the answer for two whole days, I found that there is a plugin called org.eclipse.core.command. The Action classes I was using is commonly used for handling events in a view’s menus. The Eclipse use command design pattern.

In command design pattern, there is a command, the invoker, and the handler of commands. The invoker is the view, which then issues commands, and the commands appoint which handler is supposed to handle the command.

In short, this is what happened after I changed my program :

View -> command registry -> command, and states -> handler -> business process -> handler -> View

And thats it. The handlers is able to return values using state.

How about the Action classes I mentioned earlier ?

The Action class is able to use the Command class to do the task. Then you can put the Action class in menus.

powered by performancing firefox

Introducing Eclipse RCP

One day near the deadline, a project teammate asked me about Eclipse RCP; something I used from the beginning of the project. I don’t have the 100% correct answer, but in my opinion, a Rich Client Platform is a platform we can use to simplify desktop client application development. All tedious things we frequently wrote, such as dialogs, wizards, preferences, help systems, up to update management is provided there in a good structure.

Eclipse RCP is one of them.

powered by performancing firefox