ESH Console extensions [message #1783308] |
Sun, 11 March 2018 13:22  |
Eclipse User |
|
|
|
I was looking for general documentation on the console extensions, but haven't found anything. I'm looking to add some extensions, but would like to know how the console is instantiated.
I assume that the console is instantiated once per user, but are the implementations of AbstractConsoleCommandExtension instantiated on each command, or is this created when the console is created?
I would to store some context variables between sub commands if possible so the user doesn't need to type all options every time. Is this possible?
So for example, instead of -:
cmd thing subcommand1 value1
cmd thing subcommand2 value2
we could have something like -:
cmd thing
cmd subcommand1 value1
cmd subcommand2 value2
Thanks
Chris
|
|
|
Re: ESH Console extensions [message #1783347 is a reply to message #1783308] |
Mon, 12 March 2018 09:31  |
Eclipse User |
|
|
|
Hi Chris,
the implementations for RFC 147 and Eclipse suggest that they are ordinary service instances, hence they also could keep some state in between calls.
As far as I can see, your use-case should work. Whether one should do that or not is another question and probably also depends on the concrete use-case, of course.
Cheers,
Simon
|
|
|
Powered by
FUDForum. Page generated in 0.03989 seconds