Content Assist [message #1024305] |
Tue, 26 March 2013 04:40 |
Neeraj Bhusare Messages: 177 Registered: July 2009 Location: Canada |
Senior Member |
|
|
Hi,
I am finding it hard to get the content assist working for the following dsl. To be specific, while defining the type for an attribute (Attribute rule), content assist shows the defined Entities and not the Datatypes (string, decimal,...). For some reason, the methods complete_XXDataType() in the Proposal provider are not getting invoked. If I change the Attribute rule to [0], the complete methods get invoked. Not sure what is going wrong.
I checked the forum but I couldn't find anything related to my problem. I also had a look at couple of dsl's [1], but it didn't help. Any thoughts/pointers ?
NSDeclaration:
// namespace and import
entity=Entity
;
Entity:
'entity' name=ID '{'
attributes+=Attribute*
'}'
;
Attribute:
name=ID ':' type=Type
;
Type:
datatype=DataType | entityRef=EntityReference
;
EntityReference:
entity=[Entity]
;
DataType:
StringDataType | DecimalDataType | BooleanDataType | NumberDataType
;
StringDataType:
'string'
;
DecimalDataType:
'decimal'
;
BooleanDataType:
'boolean'
;
NumberDataType:
'number'
;
------------------------------------------
[0]
Attribute:
name=ID ':' (datatype=DataType | entityRef=EntityReference)
;
-------------------------------------------
[1]
http://www.eclipse.org/Xtext/community.html
Thanks in advance.
Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
[Updated on: Tue, 26 March 2013 04:41] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds