Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Invoke a Rule Explicitly
Invoke a Rule Explicitly [message #1729891] Wed, 20 April 2016 02:24 Go to next message
Eclipse UserFriend

  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 02:39] by Moderator

Re: Invoke a Rule Explicitly [message #1729892 is a reply to message #1729891] Wed, 20 April 2016 02:42 Go to previous messageGo to next message
Eclipse UserFriend
hi i dont get that question.

you can create any proposals at any place but you have to do it manually.
Re: Invoke a Rule Explicitly [message #1729897 is a reply to message #1729892] Wed, 20 April 2016 03:42 Go to previous messageGo to next message
Eclipse UserFriend
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 03:46 Go to previous messageGo to next message
Eclipse UserFriend
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 ...)
Re: Invoke a Rule Explicitly [message #1729899 is a reply to message #1729898] Wed, 20 April 2016 03:49 Go to previous messageGo to next message
Eclipse UserFriend
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 03:50] by Moderator

Re: Invoke a Rule Explicitly [message #1729901 is a reply to message #1729899] Wed, 20 April 2016 03:53 Go to previous messageGo to next message
Eclipse UserFriend
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);
Re: Invoke a Rule Explicitly [message #1729909 is a reply to message #1729901] Wed, 20 April 2016 04:47 Go to previous message
Eclipse UserFriend
ok Thanks
Previous Topic:Application freezes when typing an undefined terminal
Next Topic:Regarding ignoreCase for Keywords.
Goto Forum:
  


Current Time: Thu Jul 24 00:12:00 EDT 2025

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

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

Back to the top