Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Nov 5, 2007

JFace Wizard Guidelines

During Eclipse Plugin Developement training, I always end JFace Wizards session with these guidelines:

  1. Wizards should be aimed for minimal user interaction
  2. Wizard pages can be filled with meaningful defaults
  3. When a Wizard is shown it should not contain any errors. They should appear only after a user interaction
  4. Present Errors/Warnings in the tab order of the fields
  5. When a task is split into steps, a wizard page can model a step and shouldn't be doing more things
  6. Don't create pages that needs scrolling. In general if a wizard's height is greater than its width, probably it needs a review
  7. Total number of Wizard pages should be ~ 5
Once when I finished explaining them, one smart guy said: "Have you ever looked at the New Java Project Wizard?". True. The first page of that wizard doesn't comply with the Guideline #6. These points are not official standards, mere guidelines by me, but still I think they are good. So what is the problem with the New Java Project Wizard and how can it be better?

The options in the first page falls into three categories:
  1. Resource: Project name, location & working sets
  2. Compiler: Source folders
  3. Runtime: JRE & Execution env.

Ideally the first page should just give the resource related options and the others can be pushed to second page/elsewhere. Since the second page allows the user to configure the JRE, source & binary folder, I guess we are not loosing any functionality if we get rid of those options. If the first page is cleaned up to have only resource related options, this is how it would look like:




in contrast to the current:


Oct 13, 2007

Wow shortcut!

Now that I've been accused as the evil friend, who will provide suggestions for your itching, let me try to do some damage control. How about letting you know about a cool shortcut? No, not the Ctrl+3, the whole world knows and loves that. This is about copying a Java file from other editor.

There are many times you would be using a TextPad or your favourite trivial editor because you double clicked a Java file from your local disk. How do you import that file into your Eclipse workspace?

Either you can locate the file in your disk, drag and drop to the Package Explorer view or simply Ctrl+A in TextPad, select the package in the Package Explorer view and do a Ctrl+V, you are done! A Java file is created for you in that package with right name and also your package statement in the file is correctly updated.

This is very helpful when you are viewing a web page with code (either some public CVS thru web or some nice tips on the web) you can do a copy and paste them in your Package Explorer view.

Cool isn't it?

Despite the usefulness, I haven't seen this in any documentation, does anyone knows a place with complete list of wonderful features like this?