Bug 11306 New class wizard launches simple project wizard
1. In a new workspace, press the "New Class" button in the Java perspective. 2. Since there are no existing projects, the dialog prompts the user to create a new project. This is very handy. However, if the user answers yes, the resulting dialog is the first page of the generic new project wizard. The Java Class wizard should open the Java Project wizard.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/AbstractOpenWizardAction.java
/*
	 * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
	 */
	public void init(IWorkbenchWindow window) {
	}
	/*
	 * @see IActionDelegate#selectionChanged(IAction, ISelection)
	 */
	public void selectionChanged(IAction action, ISelection selection) {
		
	}
	
	protected boolean checkWorkspaceNotEmpty() {
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
		if (workspace.getRoot().getProjects().length == 0) {
			Shell shell= JavaPlugin.getActiveWorkbenchShell();
			String title= JavaUIMessages.getString("AbstractOpenWizardAction.noproject.title");
			String message= JavaUIMessages.getString("AbstractOpenWizardAction.noproject.message");
			if (MessageDialog.openQuestion(shell, title, message)) {
				IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow();
				(new NewProjectAction(window)).run();	
				return workspace.getRoot().getProjects().length != 0;
			}
			return false;
		}
		return true;
	}
	
}