New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple problems have occurred pop-up #1243

Closed
brlarson opened this Issue May 16, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@brlarson

brlarson commented May 16, 2018

Please suppress/eliminate this annoying pop-up that occurred a dozen times in the last ten minutes when typing Actual_Connection_Binding properties

java.lang.NullPointerException
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:1269)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5456)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:1495)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5414)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.lambda$232(Aadl2Formatter.java:1448)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:1450)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5510)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.lambda$681(Aadl2Formatter.java:3945)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.formatComponentImplementationCommon(Aadl2Formatter.java:3947)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:4011)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5195)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.lambda$267(Aadl2Formatter.java:1640)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.formatPackageSectionCommon(Aadl2Formatter.java:1642)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:1550)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5375)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter._format(Aadl2Formatter.java:1396)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5390)
	at org.eclipse.xtext.formatting2.internal.FormattableDocument.format(FormattableDocument.java:194)
	at org.eclipse.xtext.formatting2.AbstractFormatter2._format(AbstractFormatter2.java:203)
	at org.osate.xtext.aadl2.formatting2.Aadl2Formatter.format(Aadl2Formatter.java:5468)
	at org.eclipse.xtext.formatting2.AbstractFormatter2.format(AbstractFormatter2.java:271)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:147)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:174)
	at org.osate.xtext.aadl2.serializer.InstanceEnabledSerializer.serialize(InstanceEnabledSerializer.java:16)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:55)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getValueAsString(ValueColumnLabelProvider.java:255)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.lambda$0(ValueColumnLabelProvider.java:205)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$27(AadlPropertyView.java:1649)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.safeRead(AadlPropertyView.java:1651)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getText(ValueColumnLabelProvider.java:209)
	at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:34)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:946)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:117)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1025)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:475)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2159)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:840)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:595)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:763)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1624)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2490)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2959)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1454)
	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:354)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1408)
	at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1506)
	at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inputChanged(FilteredTree.java:1183)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1685)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$29(AadlPropertyView.java:1688)
	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:58)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:168)
	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4034)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3701)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	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:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage May 16, 2018

Contributor

The popup appears when typing the opening parenthesis for a reference value in the property value: ..., reference(

Contributor

lwrage commented May 16, 2018

The popup appears when typing the opening parenthesis for a reference value in the property value: ..., reference(

@joeseibel joeseibel self-assigned this May 17, 2018

@joeseibel

This comment has been minimized.

Show comment
Hide comment
@joeseibel

joeseibel May 18, 2018

Contributor

I was able to reproduce this problem. It is an interaction between the text editor and the property view. Normally, formatting would not occur when typing in the text editor. However, when the property view is open, it listens to model changes in the current editor and refreshes the contents of the view. This refresh uses the serializer to get the updated property values as text which invokes the formatter.

In addition to the NPE, I also encountered a RuntimeException complaining that a ContainmentPathElement could not be serialized. The property view should catch these serialization exceptions. Stack trace:

!ENTRY org.eclipse.jface 4 2 2018-05-18 11:09:27.389
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.RuntimeException: Could not serialize ContainmentPathElement:
ContainmentPathElement.namedElement is required to have a value, but it does not.
Semantic Object: AadlPackage'pkg1'.ownedPublicSection->PublicPackageSection'pkg1_public'.ownedClassifier[1]->SystemImplementation's1.i'.ownedPropertyAssociation[0]->PropertyAssociation.ownedValue[0]->ModalPropertyValue.ownedValue->ListValue.ownedListElement[0]->ReferenceValue.path->ContainmentPathElement
URI: platform:/resource/proj1/pkg1.aadl
Context: ContainmentPathElement returns ContainmentPathElement
	at org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(ISerializationDiagnostic.java:131)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:503)
	at org.osate.xtext.aadl2.properties.serializer.AbstractPropertiesSemanticSequencer.sequence_ContainmentPathElement(AbstractPropertiesSemanticSequencer.java:274)
	at org.osate.xtext.aadl2.serializer.AbstractAadl2SemanticSequencer.sequence(AbstractAadl2SemanticSequencer.java:371)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:67)
	at org.osate.xtext.aadl2.serializer.Aadl2SemanticSequencer.createSequence(Aadl2SemanticSequencer.java:158)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:325)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:352)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
	at org.osate.xtext.aadl2.properties.serializer.AbstractPropertiesSemanticSequencer.sequence_ReferenceTerm(AbstractPropertiesSemanticSequencer.java:490)
	at org.osate.xtext.aadl2.serializer.AbstractAadl2SemanticSequencer.sequence(AbstractAadl2SemanticSequencer.java:784)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:67)
	at org.osate.xtext.aadl2.serializer.Aadl2SemanticSequencer.createSequence(Aadl2SemanticSequencer.java:158)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:115)
	at org.eclipse.xtext.serializer.impl.Serializer.serializeToRegions(Serializer.java:136)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:142)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:174)
	at org.osate.xtext.aadl2.serializer.InstanceEnabledSerializer.serialize(InstanceEnabledSerializer.java:16)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:55)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getValueAsString(ValueColumnLabelProvider.java:255)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.lambda$0(ValueColumnLabelProvider.java:205)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$27(AadlPropertyView.java:1649)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.safeRead(AadlPropertyView.java:1651)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getText(ValueColumnLabelProvider.java:209)
	at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:34)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:946)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:117)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1025)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:475)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2159)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:840)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:595)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:763)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1624)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2490)
	at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1759)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2962)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1715)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1075)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.updateSelection(AadlPropertyView.java:1569)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$0(AadlPropertyView.java:278)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:239)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.handleSelectionChanged(SelectionService.java:88)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.lambda$0(SelectionService.java:64)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$2.run(SelectionAggregator.java:126)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyListeners(SelectionAggregator.java:123)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$6(SelectionAggregator.java:121)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$7$1.run(SelectionAggregator.java:231)
	at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:56)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$7.changed(SelectionAggregator.java:228)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:114)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:355)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:370)
	at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setSelection(SelectionServiceImpl.java:31)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.selectionChanged(CompatibilityPart.java:461)
	at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:155)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:152)
	at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2611)
	at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2590)
	at org.eclipse.jface.text.TextViewer.setSelectedRange(TextViewer.java:2284)
	at org.eclipse.jface.text.TextViewer.setSelection(TextViewer.java:2417)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:380)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlinePage$5.run(OutlinePage.java:316)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	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:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Contributor

joeseibel commented May 18, 2018

I was able to reproduce this problem. It is an interaction between the text editor and the property view. Normally, formatting would not occur when typing in the text editor. However, when the property view is open, it listens to model changes in the current editor and refreshes the contents of the view. This refresh uses the serializer to get the updated property values as text which invokes the formatter.

In addition to the NPE, I also encountered a RuntimeException complaining that a ContainmentPathElement could not be serialized. The property view should catch these serialization exceptions. Stack trace:

!ENTRY org.eclipse.jface 4 2 2018-05-18 11:09:27.389
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.RuntimeException: Could not serialize ContainmentPathElement:
ContainmentPathElement.namedElement is required to have a value, but it does not.
Semantic Object: AadlPackage'pkg1'.ownedPublicSection->PublicPackageSection'pkg1_public'.ownedClassifier[1]->SystemImplementation's1.i'.ownedPropertyAssociation[0]->PropertyAssociation.ownedValue[0]->ModalPropertyValue.ownedValue->ListValue.ownedListElement[0]->ReferenceValue.path->ContainmentPathElement
URI: platform:/resource/proj1/pkg1.aadl
Context: ContainmentPathElement returns ContainmentPathElement
	at org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(ISerializationDiagnostic.java:131)
	at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:503)
	at org.osate.xtext.aadl2.properties.serializer.AbstractPropertiesSemanticSequencer.sequence_ContainmentPathElement(AbstractPropertiesSemanticSequencer.java:274)
	at org.osate.xtext.aadl2.serializer.AbstractAadl2SemanticSequencer.sequence(AbstractAadl2SemanticSequencer.java:371)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:67)
	at org.osate.xtext.aadl2.serializer.Aadl2SemanticSequencer.createSequence(Aadl2SemanticSequencer.java:158)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:325)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:352)
	at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
	at org.osate.xtext.aadl2.properties.serializer.AbstractPropertiesSemanticSequencer.sequence_ReferenceTerm(AbstractPropertiesSemanticSequencer.java:490)
	at org.osate.xtext.aadl2.serializer.AbstractAadl2SemanticSequencer.sequence(AbstractAadl2SemanticSequencer.java:784)
	at org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer.createSequence(AbstractSemanticSequencer.java:67)
	at org.osate.xtext.aadl2.serializer.Aadl2SemanticSequencer.createSequence(Aadl2SemanticSequencer.java:158)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:115)
	at org.eclipse.xtext.serializer.impl.Serializer.serializeToRegions(Serializer.java:136)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:142)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:174)
	at org.osate.xtext.aadl2.serializer.InstanceEnabledSerializer.serialize(InstanceEnabledSerializer.java:16)
	at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:55)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getValueAsString(ValueColumnLabelProvider.java:255)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.lambda$0(ValueColumnLabelProvider.java:205)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$27(AadlPropertyView.java:1649)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.safeRead(AadlPropertyView.java:1651)
	at org.osate.xtext.aadl2.ui.propertyview.ValueColumnLabelProvider.getText(ValueColumnLabelProvider.java:209)
	at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:34)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:946)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:117)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1025)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:475)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2159)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:840)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:595)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:763)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1624)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2490)
	at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1759)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2962)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1715)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1075)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.updateSelection(AadlPropertyView.java:1569)
	at org.osate.xtext.aadl2.ui.propertyview.AadlPropertyView.lambda$0(AadlPropertyView.java:278)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:239)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.handleSelectionChanged(SelectionService.java:88)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.lambda$0(SelectionService.java:64)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$2.run(SelectionAggregator.java:126)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyListeners(SelectionAggregator.java:123)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$6(SelectionAggregator.java:121)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$7$1.run(SelectionAggregator.java:231)
	at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:56)
	at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$7.changed(SelectionAggregator.java:228)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:114)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:355)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:370)
	at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setSelection(SelectionServiceImpl.java:31)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.selectionChanged(CompatibilityPart.java:461)
	at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:155)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:152)
	at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2611)
	at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2590)
	at org.eclipse.jface.text.TextViewer.setSelectedRange(TextViewer.java:2284)
	at org.eclipse.jface.text.TextViewer.setSelection(TextViewer.java:2417)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:380)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlinePage$5.run(OutlinePage.java:316)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	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:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment