Community
Participate
Working Groups
Build Identifier: Xtext 2.0.0.v201106070531 When entering a new rule between existing rules after typing the rule name and then the keyword returns and then pausing for a moment the NPE is thrown when refreshing the outline. This occurs when the grammar imports an existing ecore model, but not when the ecore model is generated. The grammar: grammar org.osate.xtext.aadl2.errormodel.ErrorModel with org.eclipse.xtext.common.Terminals import "platform:/resource/org.osate.aadl2/model/aadl2.ecore" as aadl2 PModel returns aadl2::Element: PropertySet ; xx returns !!! causes the error PropertySet returns aadl2::PropertySet: 'property' 'set' name=ID 'is' 'end' ID ';' ; java.lang.NullPointerException at org.eclipse.xtext.xtext.ui.editor.outline.XtextOutlineTreeProvider.getReturnTypeText(XtextOutlineTreeProvider.java:63) at org.eclipse.xtext.xtext.ui.editor.outline.XtextOutlineTreeProvider._createNode(XtextOutlineTreeProvider.java:95) at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider.createNode(DefaultOutlineTreeProvider.java:104) at org.eclipse.xtext.xtext.ui.editor.outline.XtextOutlineTreeProvider._createChildren(XtextOutlineTreeProvider.java:103) 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.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider.createChildren(DefaultOutlineTreeProvider.java:77) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$1.process(AbstractOutlineNode.java:80) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$1.process(AbstractOutlineNode.java:1) at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:36) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:161) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:1) at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32) at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode.readOnly(AbstractOutlineNode.java:158) at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode.getChildren(AbstractOutlineNode.java:77) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:68) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:71) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$1.exec(OutlineRefreshJob.java:60) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$1.exec(OutlineRefreshJob.java:1) at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32) at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.refreshOutlineModel(OutlineRefreshJob.java:57) at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.run(OutlineRefreshJob.java:46) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Reproducible: Always Steps to Reproduce: 1. Take a grammar referencing an existing ecore model 2. Have at least two rules 3. Enter a third rule between the two and pasue after the keyword returns
Hi Peter, the sample grammar does not provide a NPE, neither with "show return types" or "hide return types" in the outline view. Marked as works for me.
Closing all bugs that were set to RESOLVED before Neon.0