You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Reuben Garrett <re...@gmail.com> on 2012/04/05 20:21:41 UTC

Re: table printer for Karaf commands

thanks, everyone, for your feedback!

it seems that to partially solve my immediate problem for the Camel Karaf
commands, i should just assume a certain console width (e.g. 80 chars) and
(statically) optimize the columns based on the width of expected content -
e.g. "status" columns will be shorter due to limited enumerated values, and
"name" columns will consume the remaining width due to arbitrary
user-dependent values.

then, for the long-term general solution (benefiting other projects than
just Camel), we could pursue publishing as a service the new table printer
that Christian has been working on.  i'm not sure if this is immediately
within my abilities, but it's an endeavor i would certainly follow.

would it be agreeable to open a Karaf JIRA requesting this kind of
modularization for the table printer somewhere down the line?

~ Reuben

Re: table printer for Karaf commands

Posted by Christian Schneider <ch...@die-schneider.net>.
Why do you want to create a service for the table printer. You can 
create it with "new". As service typically makes only sense when the 
initialization is complicated or you want to hide the implementation. 
Both is not the
case for the tables.

So on trunk you can just use it and we can also backport to 2.2.x if 
necessary.

Christian

Am 05.04.2012 20:21, schrieb Reuben Garrett:
> thanks, everyone, for your feedback!
>
> it seems that to partially solve my immediate problem for the Camel 
> Karaf commands, i should just assume a certain console width (e.g. 80 
> chars) and (statically) optimize the columns based on the width of 
> expected content - e.g. "status" columns will be shorter due to 
> limited enumerated values, and "name" columns will consume the 
> remaining width due to arbitrary user-dependent values.
>
> then, for the long-term general solution (benefiting other projects 
> than just Camel), we could pursue publishing as a service the new 
> table printer that Christian has been working on.  i'm not sure if 
> this is immediately within my abilities, but it's an endeavor i would 
> certainly follow.
>
> would it be agreeable to open a Karaf JIRA requesting this kind of 
> modularization for the table printer somewhere down the line?
>
> ~ Reuben


-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: table printer for Karaf commands

Posted by Christian Schneider <ch...@die-schneider.net>.
I overlooked one aspect you mentioned. Usage for other projects. Here 
the main concern is that you have to depend on the shell.console 
project. This is the case for commands anyway. If this is an issue we 
might create a separate bundle for the table functionality.

Christian

Am 05.04.2012 20:21, schrieb Reuben Garrett:
> thanks, everyone, for your feedback!
>
> it seems that to partially solve my immediate problem for the Camel 
> Karaf commands, i should just assume a certain console width (e.g. 80 
> chars) and (statically) optimize the columns based on the width of 
> expected content - e.g. "status" columns will be shorter due to 
> limited enumerated values, and "name" columns will consume the 
> remaining width due to arbitrary user-dependent values.
>
> then, for the long-term general solution (benefiting other projects 
> than just Camel), we could pursue publishing as a service the new 
> table printer that Christian has been working on.  i'm not sure if 
> this is immediately within my abilities, but it's an endeavor i would 
> certainly follow.
>
> would it be agreeable to open a Karaf JIRA requesting this kind of 
> modularization for the table printer somewhere down the line?
>
> ~ Reuben


-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com