NPE at PreferenceStoreWhitespaceInformationProvider.getLineSeparatorPreference() [message #1592004] |
Thu, 29 January 2015 21:45 |
Akash Peri Messages: 2 Registered: January 2015 |
Junior Member |
|
|
I've been running into this strange problem where, if I try to use the content assist feature, I start getting NPE's. Any idea why these are appearing, and what I can do to resolve them?
As far as I can tell, it's coming from the getLineSeparator() method of PreferenceStoreWhitespaceInformationProvider line 66. Specifically, the URI appears to be null.
I've appended the stacktrace, but how can the URI be null, and why is it trying to use a URI in the first place. This is test code, so I'm basically making sure the content assist works, and I'm building everything on the fly.
Note: I very recently upgraded from Xtext 2.1 to 2.8, as a result of moving from Eclipse 3.7 to 4.4, which is when the problems started appearing.
In some of the cases, I also see this message in the logs:
!MESSAGE org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider - Error in polymorphic dispatcher : null
NPE at:
PreferenceStoreWhitespaceInformationProvider.getLineSeparatorPreference(URI) line: 66
PreferenceStoreWhitespaceInformationProvider.getLineSeparatorInformation(URI) line: 56
FormatterImpl(AbstractDeclarativeFormatter).getLineSeparatorInfo() line: 114
FormatterImpl(AbstractDeclarativeFormatter).createFormattingConfig() line: 81
FormatterImpl(AbstractDeclarativeFormatter).getConfig() line: 92
FormatterImpl(AbstractDeclarativeFormatter).createFormatterStream(EObject, String, ITokenStream, boolean) line: 75
Serializer.serialize(EObject, ITokenStream, SaveOptions) line: 104
Serializer.serialize(EObject, SaveOptions) line: 124
Serializer.serialize(EObject) line: 52
Thanks for your advice!
[Updated on: Thu, 29 January 2015 21:45] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03168 seconds