Community
Participate
Working Groups
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.
*** Bug 288850 has been marked as a duplicate of this bug. ***
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.
Created attachment 157674 [details] mylyn/context/zip