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

Bug 314777

Summary: New Source folder wizard enables finish without valid project
Product: [Eclipse Project] JDT Reporter: Steffen Pingel <steffen.pingel>
Component: UIAssignee: Deepak Azad <deepakazad>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad, raksha.vasisht
Version: 3.3   
Target Milestone: 3.7 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
fix none

Description Steffen Pingel CLA 2010-05-27 17:02:34 EDT
Steps:
1. Start with clean workspace
2. Right click in package explorer
3. Select New > Source Folder
4. Click Finish

The error below is logged.

-- Configuration Details --
Product: Eclipse 1.3.0.20100526-1935 (org.eclipse.epp.package.java.product)

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_CA
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product -data ws


Error
Thu May 27 13:51:44 PDT 2010
Internal Error

java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:133)
	at org.eclipse.jdt.internal.ui.wizards.NewSourceFolderCreationWizard.performFinish(NewSourceFolderCreationWizard.java:54)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1234)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1234)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.wizards.NewSourceFolderWizardPage.createPackageFragmentRoot(NewSourceFolderWizardPage.java:478)
	at org.eclipse.jdt.internal.ui.wizards.NewSourceFolderCreationWizard.finishPage(NewSourceFolderCreationWizard.java:47)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:117)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Deepak Azad CLA 2010-05-27 22:48:04 EDT
Same problem in 3.5.2
Comment 2 Deepak Azad CLA 2010-05-27 23:22:34 EDT
Created attachment 170291 [details]
fix

fix this for RC4?
Comment 3 Dani Megert CLA 2010-05-28 02:47:47 EDT
Broken since 3.3. Not critical for 3.6.
Comment 4 Deepak Azad CLA 2010-06-11 07:15:52 EDT
(In reply to comment #2)
> Created an attachment (id=170291) [details] [diff]
> fix
Patch committed to HEAD.
Comment 5 Raksha Vasisht CLA 2010-08-03 02:05:00 EDT
Verified for 3.7 M1 with I20100802-1800.