Auto edit strategy with ID's [message #1074022] |
Thu, 25 July 2013 20:20  |
Eclipse User |
|
|
|
I need to implement an auto edit strategy which should have ID's in its context. My DSL has something like this:
'function' name=ID ':'
FunctionBody
'end'
So, I need to check when the user typed "function", followed by an ID and a colon, and only then auto complete the "end" keyword. Is it possible?
I looked into the DefaultAutoEditStrategyProvider, but it only seemed capable of autoediting predetermined tokens. Also, SingleLineTerminalsStrategy and MultiLineTerminalsEditStrategy seemed to ignore strategies triggered by a keyword. Is there a way around?
|
|
|
|
Re: Auto edit strategy with ID's [message #1074428 is a reply to message #1074128] |
Fri, 26 July 2013 14:59  |
Eclipse User |
|
|
|
Thank you for your suggestion, I'm trying templates now. They're probably better for my case.
As for inserting function/end with the multilineTerminals, it is not possible. It ignores auto edit rules containing keywords, I'm not sure why.
|
|
|
Powered by
FUDForum. Page generated in 0.03578 seconds