Bug 15801 NPE New class wizard opened on non-Java project
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
if (!folder.exists()) {
			CoreUtility.createFolder(folder, true, true, monitor);			
		}
		
		IClasspathEntry[] entries= fCurrJProject.getRawClasspath();
		IClasspathEntry[] newEntries;
		IPath outputLocation= fOutputLocation;
		
		if (fIsProjectAsSourceFolder) {
			IPath projPath= fCurrJProject.getProject().getFullPath();
			newEntries= new IClasspathEntry[entries.length];
			for (int i= 0; i < newEntries.length; i++) {
				IClasspathEntry curr= entries[i];
				if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE && curr.getPath().equals(projPath)) {		
					curr= JavaCore.newSourceEntry(path);
				}
				newEntries[i]= curr;
			}
			if (outputLocation.equals(projPath)) {
				outputLocation= projPath.append(JavaBasePreferencePage.getOutputLocationName());
				if (BuildPathsBlock.hasClassfiles(fCurrJProject.getProject())) {
					if (BuildPathsBlock.getRemoveOldBinariesQuery(shell).doQuery(projPath)) {
						BuildPathsBlock.removeOldClassfiles(fCurrJProject.getProject());
					}
				}
			}
		} else {
			newEntries= new IClasspathEntry[entries.length + 1];
			int k= entries.length;
			for (int i= k - 1; i >= 0; i--) {