Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » about proposals
about proposals [message #1071975] Sun, 21 July 2013 15:31 Go to next message
Yueming Hong is currently offline Yueming Hong
Messages: 87
Registered: April 2013
Member
Hi friends,
there are multiple select-able proposals when I use multiple acceptor.accept(proposal),
is there any way to know which option has been selected or even know there is one has been selected?

Thanks ~
Re: about proposals [message #1071986 is a reply to message #1071975] Sun, 21 July 2013 16:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6143
Registered: July 2009
Senior Member
Hi,

what is your question behind this question?
why do you ask?

~Christian
--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: about proposals [message #1071992 is a reply to message #1071986] Sun, 21 July 2013 16:32 Go to previous messageGo to next message
Yueming Hong is currently offline Yueming Hong
Messages: 87
Registered: April 2013
Member
when the editor offers the proposals, user can choose not to select any.
My point is:
the proposal only applies when there is no one has been selected.
for instance,
XXsomethingXX <somthing which can be selected from proposals> (if selected, then ctrl+space won't trigger any proposal again after that, if I cannot know which proposal has been selected, I need to check part within <> to ensure that)

Maybe i am just a little confused. Embarrassed
Re: about proposals [message #1071995 is a reply to message #1071992] Sun, 21 July 2013 16:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6143
Registered: July 2009
Senior Member
Hi sorry I still don't know why you need to check. Could you come up
with a real world example

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: about proposals [message #1072001 is a reply to message #1071995] Sun, 21 July 2013 16:59 Go to previous messageGo to next message
Yueming Hong is currently offline Yueming Hong
Messages: 87
Registered: April 2013
Member
for another example:
if i have pseudo-grammar : component.resource operation-option
operation-option can be set() or add().
when user select set can get C.R set("a")<if ctrl+space after this won't trigger any proposal, so there is no more operation when one has been picked>

I am not sure it is clear enough
Re: about proposals [message #1072003 is a reply to message #1072001] Sun, 21 July 2013 17:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6143
Registered: July 2009
Senior Member
Hi you should fix this upfront and filter the proposals on creation.
The methods in the proposal provider (or even scoping) should you
offer enough context to detect this situation

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: about proposals [message #1072010 is a reply to message #1072003] Sun, 21 July 2013 17:30 Go to previous messageGo to next message
Yueming Hong is currently offline Yueming Hong
Messages: 87
Registered: April 2013
Member
Then i need to determine the proposals myself.
thanks.

BTW, What is the exact functionality of scoping? i know it is about cross reference.
So if there is no cross reference in my grammar, then there is no need to customize the scoping. Am i right?

Thanks
Re: about proposals [message #1072129 is a reply to message #1072010] Mon, 22 July 2013 02:05 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6143
Registered: July 2009
Senior Member
Yes you are Right

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:Xtext grammar for Java?
Next Topic:Xtext Cross referencing
Goto Forum:
  


Current Time: Thu Jul 31 03:25:19 EDT 2014

Powered by FUDForum. Page generated in 0.01715 seconds