[forge-dev] [forge2.0 ui classes]

"Ståle W. Pedersen" spederse at redhat.com
Mon Jan 14 09:48:22 EST 2013


hi, i might have misunderstood somewhat how the ui* classes are designed 
to work, but as i can see now it there isnt any clean way to decide in 
which context the commands are executed/run.

eg the only execution point atm is UICommand.execute(UIContext c)...
with no way of differentiate if the command is run in a shell or ide.

what if we could provide two methods to UIContext that returned a 
ShellContext and a IDEContext?
that way we could provide useful object to the commands eg:
- console input/output: aesh support stderr/out (simulating it since it 
saves it in a buffer and the flush it to the proper stream, but it works 
similar). that way it will also support pipelines/redirections.
- standalone commands: eg commands that "take over" the input stream. 
examples in common shellprograms are: man/less/etc...
- ++

- or is this already covered by some other way i havent figure out of 
yet? :)

ståle


More information about the forge-dev mailing list