No hovers in Fowler's State-Machine [message #1009528] |
Fri, 15 February 2013 04:26  |
Eclipse User |
|
|
|
Hi,
If I create the Martin Fowler example from within eclipse: "new->project->xtext->examples->xtext state-machine example", hovers are working with the mouse over in the editor and in content assist.
If however I create the Fowler DSL State Machine example as per Sven's blog (see: http://blog.efftinge.de/2011/06/five-simple-steps-to-fowlers-dsl-with.html), whilst the resultant project works insofar as content assist etc, there are no hovers within the editor or within content assist.
I'm sure I religiously followed the instructions in Sven's blog; please could someone explain why I am not seeing the hovers.
Many thanks,
Dan
|
|
|
|
|
|
|
|
|
|
|
|
Re: No hovers in Fowler's State-Machine [message #1009778 is a reply to message #1009728] |
Fri, 15 February 2013 12:33   |
Eclipse User |
|
|
|
HI,
it should work with zero customization. even with the greeting example.
here is a stacktrace to look for debug points
MultiLineCommentDocumentationProvider.getDocumentation(EObject) line: 121
DefaultHoverDocumentationProvider.getDocumentation(EObject) line: 25
DefaultEObjectHoverProvider.getDocumentation(EObject) line: 107
DefaultEObjectHoverProvider.getHoverInfoAsHtml(EObject) line: 80
DefaultEObjectHoverProvider.getHoverInfo(EObject, IRegion, XtextBrowserInformationControlInput) line: 91
DefaultEObjectHoverProvider$2.getInfo() line: 519
DispatchingEObjectTextHover.getHoverInfo(EObject, ITextViewer, IRegion) line: 38
AbstractEObjectHover$2.exec(XtextResource) line: 82
AbstractEObjectHover$2.exec(Object) line: 1
XtextDocument$XtextDocumentLocker(AbstractReadWriteAcces<P>).readOnly(IUnitOfWork<T,P>) line: 32
XtextDocument.readOnly(IUnitOfWork<T,XtextResource>) line: 78
DispatchingEObjectTextHover(AbstractEObjectHover).getHoverInfo2(ITextViewer, IRegion) line: 74
DefaultCompositeHover(AbstractCompositeHover).getHoverInfo2(ITextViewer, IRegion) line: 90
TextViewerHoverManager$4.run() line: 166
I Would start with org.eclipse.xtext.ui.editor.hover.AbstractCompositeHover.getHoverRegion(ITextViewer, int)
|
|
|
Re: No hovers in Fowler's State-Machine [message #1009817 is a reply to message #1009778] |
Fri, 15 February 2013 14:23  |
Eclipse User |
|
|
|
Hi Christian,
I tracked the problem down to the case sensitive nature of the file name extension. Initially I used a file name extension of ".myDsl" which resulted in no hovers. With a file name extension of ".mydsl", I get hovers. (the editor extension in the plugin.xml is "mydsl")
The root cause was in the isValid method in org.eclipse.xtext.resource.FileExtensionProvider. The hashmap contains "mydsl" and not "myDsl".
Many thanks for all your assistance.
Dan
|
|
|
Powered by
FUDForum. Page generated in 0.35295 seconds