|Re: Resolve different parser rules dependency. [message #1781344 is a reply to message #1781330]
||Tue, 06 February 2018 09:25
| Mohd Danish
Registered: October 2017
(1a) for references: are these local references or not. if not have a look at IReferenceFinder.findReferences*
What do you mean by local references? Does it mean all the code is present in a single file?
Also, I am able to understand the method and its usage but I am not sure how to use it. I am creating a new class say A in the package 'org.xtext.xx.ui' which extends EcoreUtil2. Now I want to use 'getAllReferencedObjects' which take 2 parameters. I want to know how I can get these parameters value?
Also, do I need to override the default implementation of ''getAllReferencedObjects' if present and write my code there? Or creating a new class in package 'org.xtext.xx.ui' is correct?
(2) i dont understand
Below is my xtext grammar. The product_line_decl forms the relationship between the deltas and features described above.
Feature_decl: 'feature' name=ID;
Delta_decl: 'delta' name=ID;
Product_line_decl: 'productline' name=ID delta=[Delta_decl|ID] 'when' feature+=[Feature_decl|ID]* (',' feature+=[Feature_decl|ID]*) ';' ;
productline example1 D1 when F1,,F2; // Establish the relationship between feature and delta
productline example2 D2 when F1,F2,F3;
When I override the 'compile' function present in 'org.xx.generator' (sorry I mentioned the wrong package), I was able to print
(3) I dont understand. if you can print "hello world" you can print "your calculated stuff"
I am able to print custom messages in 'org.xtext.xx.ui.labeling' package and the compile function is present in the another package called the 'generator'. I am not able to use the text function present in the org.xtext.xx.ui.labeling in my generator class. Hope this helps. Sorry, I am new to xtext so I am not sure what I am doing is correct.
Many thanks for the help anyways.
|Re: Navigation on Hover. [message #1782112 is a reply to message #1782111]
||Sun, 18 February 2018 12:28
|| Christian Dietrich
Registered: July 2009
I Dont understand.|
simply create as many hyperlinks as you wish
the helper calls org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper.createHyperlinksTo(XtextResource, Region, EObject, IHyperlinkAcceptor)
simply create different hyperlinks to different targets ?!?
regarding your second question
yes and no
everythings is customizable
but you need to do it.
i cannot tell you how since i dont know
you need to read the code
read existing cxustomizations
Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
[Updated on: Sun, 18 February 2018 12:30]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02173 seconds