|
|
Re: Customizing content assist suggestions [message #1767508 is a reply to message #1767502] |
Thu, 06 July 2017 15:23 |
Susie Agerholm Messages: 54 Registered: April 2017 |
Member |
|
|
yes of course :) I have an abstract geometry object, that must be implemented as either a box, a cylinder, a sphere or a mesh. Even though one of these concrete geometrical implementations (box, sphere, cylinder or mesh) must be referenced after the Geometry keyword in the concrete syntax, the content assist suggestion box i polluted with additional suggestions from outer and inner scope.
But since this is an alternative parser rule, I dont think I can do much more to narrow it down further in metamodel, grammar or scoping - but if possible of course i should do it there...
I have found this blogpost from you, that is related to the subject of manipulating proposals:
https://christiandietrich.wordpress.com/2015/03/19/xtext-and-strings-as-cross-references/
Here you alter the proposal at the time of running the accept method from the ICompletionProposalAcceptor - but I have to get to it earlier while creating the options for the suggest dropdown - but how to do that, I dont know...
GRAMMAR:
Visual:
{Visual} 'Visual' (name=ID)?
'Geometry' geometry+=Geometry*
(origin=Origin)?
('Material' material=Material)?
;
Geometry:
Box | Cylinder | Mesh | Sphere
;
-
Box:
'Box' (name=ID)?
'height' height=URDFAttrNumeric
'length' length=URDFAttrNumeric
'width' width=URDFAttrNumeric
;
Cylinder:
'Cylinder' (name=ID)?
'radius' radius=URDFAttrNumeric
'length' length=URDFAttrNumeric
;
Mesh:
'Mesh' (name=ID)?
'pathToFile' pathToFile=URDFAttrSTRING
//('scale' dimension=Box)?
;
Sphere:
'Sphere' (name=ID)?
'radius' radius=URDFAttrNumeric
;
-
Attachment: box.png
(Size: 19.56KB, Downloaded 265 times)
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03543 seconds