Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext content assist(The content assist shows } even after writing } in the editor)
Xtext content assist [message #1226966] Fri, 03 January 2014 07:18 Go to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

This is my grammar
grammar org.xtext.example.mydsl1.MyDsl with org.eclipse.xtext.common.Terminals

generate myDsl "http://www.xtext.org/example/mydsl1/MyDsl"

Model:
(elements+=Type)*
;
Type:
DataType | Entity
;

DataType:
'datatype' name=ID
;

Entity:
'entity' name = ID
('extends' superType = [Entity ])?
'{'
(features += Feature)*
'}'
;

Feature:
(many ?= 'many')? name = ID ':' type = [Type ]
;
In editor
datatype int
datatype float
entity student
{
marks:int
//if i press ctrl+space here the content assist is showing '}' again ,how can i disable this
}

[Updated on: Fri, 03 January 2014 07:19]

Report message to a moderator

Re: Xtext content assist [message #1226992 is a reply to message #1226966] Fri, 03 January 2014 08:38 Go to previous message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
Think you read it the wrong way:

on the position of your cursor (after the "int")
a "}" is a possible continuation according to your grammar
Previous Topic:xtext validation on tabular inputs
Next Topic:Xtext OutputConfigurationProvider
Goto Forum:
  


Current Time: Tue Apr 23 08:34:08 GMT 2024

Powered by FUDForum. Page generated in 0.03073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top