|Re: F3/Open Declaration disabled on cross references [message #929284 is a reply to message #926302]
||Mon, 01 October 2012 06:46
| Olivier Petri
Registered: July 2012
Thanks for your fast reply.
I did investigate in the direction you have indicated, but any of:
is called only for ctrl+mouse where only ctrl+mouse works and for both, ctrl+mouse and F3, where both work. In other words, it is too late at those points.
I do not think its a key binding problem though, since the "Open Declaration" item is disabled in the "F3 does not work" case, and not simply missing (plus the disabled menue item shows the F3 shortcut).
For similar reasons it does not seem to be very likely that I am facing an event propagation problem, like hitting F3 being swallowed by the SemanticHighlighter or something: If it was that, I'd expect the "Open Declaration" context menu to be enabled but not responding.
Thus I assume Xtext is not registering the defining rules of the cross references in question as "Declarations" upon Eclipse. Pure speculation of corse.
I'd be happy if I had made an obvious mistake in the definition of the cross referencable rule, but what can go wrong in this?:
(optionalStuff = STRING)?
'ExamplKeyWord' name = ID
'(' SomeMoreStuff ')'
exampleCall = [ ExampleItem ] '(' YetMoreStuff ')'
[Updated on: Mon, 01 October 2012 07:12]
Report message to a moderator
|Re: F3/Open Declaration disabled on cross references [message #929486 is a reply to message #929284]
||Mon, 01 October 2012 09:52
| Olivier Petri
Registered: July 2012
It seems as if this was a global problem on grammar level.|
Global, because F3 works, or does not work, for all cross references in a project/language.
On grammar level (and not on ui level), because I disabled every customisation in the UIModule of the defective project, and it still won't work. Makes me think this must be something in the main project. But where could it be?
Meanwhile I discovered there is an OpenDeclarationHandler (org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler). As you will guess, it is called when F3 gets through, but it is not called at all in the "F3 does not work" case.
DefaultHyperlinkDetector$1.exec(XtextResource) line: 38
DefaultHyperlinkDetector$1.exec(Object) line: 1
XtextDocument$XtextDocumentLocker(AbstractReadWriteAcces<P>).readOnly(IUnitOfWork<T,P>) line: 32
XtextDocument.readOnly(IUnitOfWork<T,XtextResource>) line: 78
TestingHyperlinkDetector(DefaultHyperlinkDetector).detectHyperlinks(ITextViewer, IRegion, boolean) line: 36
TestingHyperlinkDetector.detectHyperlinks(ITextViewer, IRegion, boolean) line: 65
OpenDeclarationHandler.execute(ExecutionEvent) line: 42
So this somewhat confirms my suspicion about Xtext not identifying the rules in question as a "Declaration". But it does not lead any further though, because we are still in the call stack of F3 - or not. That is too late again.
|Re: F3/Open Declaration disabled on cross references [message #989002 is a reply to message #926252]
||Tue, 04 December 2012 04:35
| Charles Bonneau
Registered: February 2010
I found your post looking for a stack trace that I have.
It is not a blocking issue but I have entries in the error log when building a DSL file, and it really bothers the users.
Here is the error :
org.eclipse.xtext.linking.lazy.LazyLinkingResource - resolution of uriFragment 'xtextLink_::0.0.4::3::/2' failed.
and a part of the stack trace :
Caused by: java.io.IOException: Could not create binding for 'org.eclipse.xtext.xbase.compiler.CompilationStrategyAdapter'.
... 47 more
And the weirdest part is that my grammar isn't XBase dependent.
Any idea on where it might come from and how to fix it ?
Powered by FUDForum
. Page generated in 0.01841 seconds