Community
Participate
Working Groups
The library folders framework should be robust for contributors who return null elements in the array of library names. NPE exception stack trace: !ENTRY org.eclipse.ui 4 0 2014-05-23 01:07:46.105 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.php.internal.ui.actions.UseAsSourceFolderAction.getSortedElementNames(UseAsSourceFolderAction.java:145) at org.eclipse.php.internal.ui.actions.UseAsSourceFolderAction.run(UseAsSourceFolderAction.java:105) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) 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.Display.sendEvent(Display.java:4166) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 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:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) 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:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) [reply] [−] Comment 19 gossi CLA 2014-05-23 02:34:20 EEST
Actually, I was wrong why the NPE happens. It is not because of a contribution to the extension point, but because the disabled folder may not be in the build path anymore. Here are steps to reproduce: 1. Create new PHP project. 2. Create folder "f1". 3. Create folder "f2" as a subfolder of "f1". 4. Right-click on "f1" and select "Use As Library Folder". 5. Right-click on "f1" and select "Build Path > Exclude". 6. Right-click on "f2" and select "Build Path > Use As Source Folder". 7. Right-click on "f2" and select "Use As Source Folder".
Patch: https://git.eclipse.org/r/27644/ This patch refactors the API and implementation in a way that is more centered around the Resource API instead of the DLTK Model API. This way folders that are not on the build path can be handled in a better way.
Fixed for Luna RC3. http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=dbc07203ced89fdd3b8528ac48ac196e5e6dccda
marking as fixed.
Verified. A relevant message dialog appears now. Closing