Community
Participate
Working Groups
The New Class and New Package buttons are always enabled, even when there is no current selection in the Package Explorer. This means the wizard doesn't know which project to create the new element in, and we get an error message about the (invisible!) source folder field. The buttons could be disabled when there is no selection, but this doesn't help when the wizards are accessed from the main File->New... menu (assuming bug 246087 is fixed). Solution is probably to insert an initial "select project" page when there is no workbench selection available.
IMHO, we should try and do things as automagically as possible. The button should always be enabled. If there is a project highlighted, then that project's 'src' directory should be the target. If there are no projects in the workspace, then one should be created (I like the idea of creating a default "My Assignment" project). If there is one project in the workspace and it is not highlighted, then that project's 'src' directory should be the target. If there are multiple projects in the workspace, but none are highlighted, then an additional wizard page should ask.
Maxime Caron and me are working on that.
Created attachment 149237 [details] Add the project chooser page to the class wizard. Add a page to the class wizard when there's 2 projects or more in the project explorer and none is selected. The new page show the list of project so the user can choose to which project he wants to add the new class.
Created attachment 149276 [details] Add the project chooser page to the class wizard. The Finish button was enabled even on the first page. It's corrected.
Can we close this bug? The new java wizard constructors address this issue using the aforementioned "automagically" technique. Therefore, this bug can probably be closed right?
Agreed. Closing as WONTFIX