Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 300672

Summary: Simplify New Java Class Creation Wizard
Product: z_Archived Reporter: Wayne Beaton <wayne.beaton>
Component: IDE4EDUAssignee: Project Inbox <ide4edu-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 244645, 300275    
Bug Blocks:    
Attachments:
Description Flags
mylyn/context/zip none

Description Wayne Beaton CLA 2010-01-25 09:02:44 EST
With the creation of a viable NewJavaClassConstructor, we should be able to significantly simplify the New Java Class Creation Wizard. I believe that our requirements are relatively simple: we need fields to capture the name of the new class. 

If a Java Project is highlighted when the wizard opens, that project becomes the home of the new class. If a package or class is currently selected, that package or the containing package becomes the home of the new class. If no Java Project is currently selected, but there is a single Java Project in the workspace, that Java Project becomes the home. If there is more than one Java Project, the one named "My Java Project" is used. If no project exists with that name, a drop down is added to the wizard to let the user select the project they want to use. If the workspace has no Java Projects, a new project with the name "My Java Project" is created.

For this first-cut implementation, the created class should contain, at a minimum, a main(String[]) method.

At some point in the future (and this is probably the subject of a different bug), I foresee this wizard being more dynamic and presenting additional options to a more experienced user. In a workspace that already contains several classes, we might include fields to specify the target package. In a workspace that already contains several projects, we might include a page in the wizard that lets the user create a new project with a name of their selection, for example. We might also include such things as automagic creation of unit tests, and other options.
Comment 1 Wayne Beaton CLA 2010-01-25 09:08:23 EST
*** Bug 288850 has been marked as a duplicate of this bug. ***
Comment 2 Wayne Beaton CLA 2010-01-29 16:48:00 EST
I have committed a new implementation of the wizard that uses the constructor created as part of Bug 300275. With this commit, I am going to declare victory on this bug and open several more to address the deficiencies with the current implementation. Please open a bug yourself if I miss something.

I'm not happy with the class name; we should consider changing it.
Comment 3 Wayne Beaton CLA 2010-01-29 16:48:15 EST
Created attachment 157674 [details]
mylyn/context/zip