Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335635

Summary: NPE from "Refreshing outline" when terminal fragment has errors
Product: [Modeling] TMF Reporter: Henrik Lindberg <henrik.lindberg>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan, sven.efftinge, tmf.xtext-inbox
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: M5   
Hardware: All   
OS: All   
Whiteboard:

Description Henrik Lindberg CLA 2011-01-27 18:13:00 EST
Reproducible always:
In "MyDSL.xtext" editor enter:

terminal fragment : ;

When the line above is changed (inserting a space etc), a NPE is thrown:


java.lang.NullPointerException
at org.eclipse.jface.viewers.StyledString.append(StyledString.java:264)
at org.eclipse.jface.viewers.StyledString.<init>(StyledString.java:133)
at org.eclipse.xtext.xtext.ui.editor.outline.XtextOutlineTreeProvider._text(XtextOutlineTreeProvider.java:50)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:288)
at org.eclipse.xtext.xtext.ui.editor.outline.XtextOutlineTreeProvider._createNode(XtextOutlineTreeProvider.java:88)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:288)
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.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:288)
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)
Comment 1 Jan Koehnlein CLA 2011-01-28 04:26:19 EST
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 17:15:59 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:27:25 EDT
Closing all bugs that were set to RESOLVED before Neon.0