Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Invoke a Rule Explicitly
Invoke a Rule Explicitly [message #1729891] Wed, 20 April 2016 06:24 Go to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member

  override dispatch createProposals(RuleCall ruleCall, ContentAssistContext context,
    IIdeContentProposalAcceptor acceptor)


How can I invoke a rule which is not triggered.

For example,
I know that a particular rule will not be invoked at an instance.
I wish to trigger it ,So that the above is executed with the particular rule

[Updated on: Wed, 20 April 2016 06:39]

Report message to a moderator

Re: Invoke a Rule Explicitly [message #1729892 is a reply to message #1729891] Wed, 20 April 2016 06:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13181
Registered: July 2009
Senior Member
hi i dont get that question.

you can create any proposals at any place but you have to do it manually.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Invoke a Rule Explicitly [message #1729897 is a reply to message #1729892] Wed, 20 April 2016 07:42 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
I mean to say. suppose I want to invoke Some rule say
NAME : ID ;

can I invoke it explicitly using java /xtend.
Re: Invoke a Rule Explicitly [message #1729898 is a reply to message #1729897] Wed, 20 April 2016 07:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13181
Registered: July 2009
Senior Member
i dont get your question if you want to propose "bla blubb" at any place call

val entry = new ContentAssistEntry => [
...
proposal = "bla blubb"
...
]

acceptor.accept(entry ...)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Invoke a Rule Explicitly [message #1729899 is a reply to message #1729898] Wed, 20 April 2016 07:49 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
As I understand ,

The rules are called implictly.

Hello:
ID;

I know if I type "abc" ,Hello rule will be invoked .


I wish to invoke Hello rule ,by java or xtend code.So that I get the rule call here. Its like i want to tell, trigger this rule no matter what
  override dispatch createProposals(RuleCall ruleCall, ContentAssistContext context,
    IIdeContentProposalAcceptor acceptor)

[Updated on: Wed, 20 April 2016 07:50]

Report message to a moderator

Re: Invoke a Rule Explicitly [message #1729901 is a reply to message #1729899] Wed, 20 April 2016 07:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13181
Registered: July 2009
Senior Member
sry i have no idea on that.
i am talking about the initial method that is called by content assist service which is createProposals(contexts, acceptor);


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Invoke a Rule Explicitly [message #1729909 is a reply to message #1729901] Wed, 20 April 2016 08:47 Go to previous message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
ok Thanks
Previous Topic:Application freezes when typing an undefined terminal
Next Topic:Regarding ignoreCase for Keywords.
Goto Forum:
  


Current Time: Mon Nov 11 19:39:01 GMT 2019

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

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

Back to the top