Adding a platform architecture results into an NPE
I noticed that adding a new platform architecture to a FileProject
s
results into below NPE (an aftermath of #3746).
The reason for this is that for IProjectRootElements
annotations are
not instantiated when they are added to the project via the compositor.
!ENTRY org.eclipse.ui.views.properties.tabbed 4 2 2019-09-10 10:05:18.255
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
!STACK 0
org.conqat.lib.commons.assertion.PreconditionException: Can not observe null value!
at org.conqat.lib.commons.assertion.CCSMPre.isTrue(CCSMPre.java:44)
at org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue(ObservableUtils.java:60)
at org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue(ObservableUtils.java:44)
at org.fortiss.af3.platform.ui.properties.TypeSizePropertySection.refresh(TypeSizePropertySection.java:87)
at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:220)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:223)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:231)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2124)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1661)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:376)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:763)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:571)
at org.eclipse.ui.views.properties.PropertySheet.showSelectionAndDescription(PropertySheet.java:526)
at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:506)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:240)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:176)
at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:215)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$3.run(PartServiceImpl.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:250)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:775)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:684)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:679)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3217)
at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3114)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3112)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3083)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
at org.fortiss.tooling.kernel.ui.internal.ModelEditorBindingService.openInEditor(ModelEditorBindingService.java:153)
at org.fortiss.tooling.kernel.ui.internal.views.GenericNewMenu$AddPrototypeAction$1.run(GenericNewMenu.java:122)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext$2.execute(ModelContext.java:400)
at org.fortiss.tooling.kernel.internal.storage.eclipse.EMFTransactionalCommand$1.doExecute(EMFTransactionalCommand.java:55)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.fortiss.tooling.kernel.internal.storage.eclipse.EMFTransactionalCommand$2.run(EMFTransactionalCommand.java:67)
at org.fortiss.tooling.kernel.internal.storage.eclipse.EMFTransactionalCommand.runInTransaction(EMFTransactionalCommand.java:99)
at org.fortiss.tooling.kernel.internal.storage.eclipse.EMFTransactionalCommand.execute(EMFTransactionalCommand.java:64)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
at org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.fortiss.tooling.kernel.internal.storage.eclipse.AutoUndoCommandStack.execute(AutoUndoCommandStack.java:79)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext.runAsCommand(ModelContext.java:391)
at org.fortiss.tooling.kernel.internal.CommandStackService.runAsCommand(CommandStackService.java:103)
at org.fortiss.tooling.kernel.ui.internal.views.GenericNewMenu$AddPrototypeAction.run(GenericNewMenu.java:115)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:49)
at org.eclipse.equinox.internal.apEclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
(from redmine: issue id 3816, created on 2019-09-10, closed on 2019-09-26)