karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: karaf 3.0 : ShellTable question
Date Fri, 03 Jan 2014 12:26:33 GMT
Hi Christian,

+1 to deprecate the "old" addRow method and update to the new one.

Regards
JB

On 01/03/2014 01:07 PM, Christian Schneider wrote:
> Hi Luca,
>
> I think my original idea was that all methods with just a subject as
> name were thought to return Shelltable so they could be chained.
> As this is already not the case for column it is not consistent though.
>
> So I think it makes sense to add a new method Row row() and also Row
> row(Object... content).
>
> Should we deprecated the old addRow method to avoid duplication and show
> people how to use the interface?
> Btw. I would also like to adapt the tests to reflect the main way to use
> Shelltable.
>
> Christian
>
>
>
> Am 03.01.2014 10:35, schrieb lbu:
>> Hi,
>> I've started playing with Karaf 3.0 (thanks for the Christmas gift) and I
>> have some questions related to ShellTable:
>>
>> For most of the methods, the action is not in the name so you have
>> column(...),  separator(...), etc but this is not true for addRow:
>>      public Row addRow() {
>>          Row row = new Row();
>>          rows.add(row);
>>          return row;
>>      }
>>
>> Is there any reason?
>>
>> For my own needs, I've also created an EnhancedShellTable which let
>> you to:
>> - set-up columns in the constructor
>>      public EnhancedShellTable(String... columns) {
>>          super();
>>          for(String column : columns) {
>>              super.column(column);
>>          }
>>      }
>>
>> - add and fill a row with a single method
>>
>>      public void row(Object... content) {
>>          addRow().addContent(content);
>>      }
>>
>> Would it be possible to add them to ShellTable?
>>
>> Regards,
>> Luca
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/karaf-3-0-ShellTable-question-tp4030886.html
>>
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message