Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Erros when using Xtext in a composite
Erros when using Xtext in a composite [message #826859] Thu, 22 March 2012 15:42 Go to next message
Wladimir Schamai is currently offline Wladimir SchamaiFriend
Messages: 53
Registered: May 2010
Member
Hi all,

I am using an Xtext editor by injecting it into a composite which is inside a property section.
Since I switched to Xtext version 2.0.1 I get an error (see below) when typing shift+(, shift+), shift+{, shift+}.

When using the Xtext editor as "normal" an Eclipse editor this does not happen.
It looks like "document.getDocumentPartitioner()" returns null.
Does anyone have an idea what the problem could be?

Thanks for your support!
Wladimir




java.lang.NullPointerException
at org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy.getDocumentContent(AbstractEditStrategy.java:99)
at org.eclipse.xtext.ui.editor.autoedit.SingleLineTerminalsStrategy.handleInsertLeftTerminal(SingleLineTerminalsStrategy.java:79)
at org.eclipse.xtext.ui.editor.autoedit.SingleLineTerminalsStrategy.internalCustomizeDocumentCommand(SingleLineTerminalsStrategy.java:71)
at org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy.customizeDocumentCommand(AbstractEditStrategy.java:65)
at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3752)
at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3782)
at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1277)
at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:435)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:265)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7148)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7994)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2456)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5911)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5941)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5635)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
Re: Erros when using Xtext in a composite [message #830223 is a reply to message #826859] Tue, 27 March 2012 10:57 Go to previous message
Wladimir Schamai is currently offline Wladimir SchamaiFriend
Messages: 53
Registered: May 2010
Member
FYI, I identified the problem: it is the auto-editing feature that causes problem.
After deactivating the auto closing of brackets etc. (see http://www.eclipse.org/forums/index.php/m/830220/#msg_830220) it is fine.

Wladimir
Previous Topic:Auto Editing (parenthesis closing issue)
Next Topic:Resolve References through types
Goto Forum:
  


Current Time: Thu Apr 02 14:07:01 GMT 2020

Powered by FUDForum. Page generated in 0.02451 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top