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

Bug 484820

Summary: Cannot create new class
Product: [Eclipse Project] JDT Reporter: Todd Allen <bif>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 4.4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Todd Allen CLA 2015-12-22 16:13:48 EST
Each time I try to create a new class I get no response.  The "Finish" button is active and not grayed out.  I enter the class name and click the "Finish" button but nothing happens.  This happened on the Juno release and still happens after upgrading to Luna.  The .log file indicates a NullPointerException.  Stack trace:

!ENTRY org.eclipse.ui 4 0 2015-12-22 15:51:33.010
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.JavaPlugin.getTemplateContextRegistry(JavaPlugin.java:827)
	at org.eclipse.jdt.internal.ui.JavaPlugin.getTemplateStore(JavaPlugin.java:872)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.warnAboutTypeCommentDeprecation(NewElementWizard.java:147)
	at org.eclipse.jdt.internal.ui.wizards.NewClassCreationWizard.performFinish(NewClassCreationWizard.java:79)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
	at org.eclipse.jface.window.Window.open(Window.java:808)
	at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:136)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Comment 1 Todd Allen CLA 2015-12-23 11:42:30 EST
*** Bug 484866 has been marked as a duplicate of this bug. ***
Comment 2 Dani Megert CLA 2016-01-05 08:22:07 EST
Works for me using plain 4.5.1:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.5.1-201509040015/

I suspect it's the same issue as bug 244770.

*** This bug has been marked as a duplicate of bug 244770 ***
Comment 3 Todd Allen CLA 2016-01-05 13:57:27 EST
I looked at bug 244770.  It looks similar but not the same.  The PHPEclipse plugin was installed and has been removed. The problem persists. The same stack trace is in the .log file.

Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600
Comment 4 Dani Megert CLA 2016-01-05 14:07:53 EST
(In reply to Todd Allen from comment #3)
> I looked at bug 244770.  It looks similar but not the same.  The PHPEclipse
> plugin was installed and has been removed. The problem persists. The same
> stack trace is in the .log file.
> 
> Version: Luna Service Release 2 (4.4.2)
> Build id: 20150219-0600

Sorry, but Luna is no longer supported. Please take
http://download.eclipse.org/eclipse/downloads/drops4/R-4.5.1-201509040015/
and if you can reproduce with that and a new workspace reopen with detailed steps.