Community
Participate
Working Groups
Build Identifier: Following Error appears whenever the XText editor is not in focus and refresh dirty action is called on the Query view. java.lang.NullPointerException at org.eclipse.emf.query2.internal.shared.EmfHelper.getElement(EmfHelper.java:124) at org.eclipse.emf.query2.internal.moinql.preprocessor.TypeCheckerImpl.convertFromEntry(TypeCheckerImpl.java:394) at org.eclipse.emf.query2.internal.moinql.preprocessor.TypeCheckerImpl.convertFromEntries(TypeCheckerImpl.java:318) at org.eclipse.emf.query2.internal.moinql.preprocessor.TypeCheckerImpl.convertQuery(TypeCheckerImpl.java:245) at org.eclipse.emf.query2.internal.moinql.preprocessor.TypeCheckerImpl.convert(TypeCheckerImpl.java:144) at org.eclipse.emf.query2.internal.moinql.controller.QueryProcessorImpl.prepareInternal(QueryProcessorImpl.java:353) at org.eclipse.emf.query2.internal.moinql.controller.QueryProcessorImpl.executeInternal(QueryProcessorImpl.java:549) at org.eclipse.emf.query2.internal.moinql.controller.QueryProcessorImpl.execute(QueryProcessorImpl.java:609) at org.eclipse.emf.query2.internal.ui.QueryView.doQuery(QueryView.java:221) at org.eclipse.emf.query2.internal.ui.QueryView.refresh(QueryView.java:240) at org.eclipse.emf.query2.internal.ui.handlers.RefreshQueryView.execute(RefreshQueryView.java:19) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820) at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) 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(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: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) Reproducible: Always Steps to Reproduce: 1. Open Query View 2. Open some other editor and bring it into the focus. 3. Click on the 'Refresh Dirty' action of the Query view. 4. The error appears
Created attachment 179664 [details] Fix for the bug Patch containes fix for the bug. 1. Out of the focus XTextEditor is retrieved and gets the resourceset. 2. QueryContentProvider now has logic for parent retrieval for the items which are not QueryItem
Patch submitted
Closing this as the bug has been resolved