Return-Path: X-Original-To: apmail-karaf-user-archive@minotaur.apache.org Delivered-To: apmail-karaf-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E395101BA for ; Fri, 3 Jan 2014 12:15:34 +0000 (UTC) Received: (qmail 54188 invoked by uid 500); 3 Jan 2014 12:07:47 -0000 Delivered-To: apmail-karaf-user-archive@karaf.apache.org Received: (qmail 54108 invoked by uid 500); 3 Jan 2014 12:07:44 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 53993 invoked by uid 99); 3 Jan 2014 12:07:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 12:07:42 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cschneider111@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qc0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 12:07:36 +0000 Received: by mail-qc0-f172.google.com with SMTP id e16so14636498qcx.17 for ; Fri, 03 Jan 2014 04:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=nwNNxX1vd0Ws2/KSNDrFNt/+jjritsVw7+/RKKTlaJI=; b=bEz/I8S95pCjCl1cQpw3q3AsH5eNZqRr2jRWFm8/IoQNT2herV6Hx/KyOa1Tll/t+g xDfPCuQiE+z0H62SDVI/eTFg1gn9ey5tEn9OmTZywf6phXH9ogX7qZWNF4tANtJMTM6O nwH3227htXRlDMbhm2yXKATXnlRhY3eJjI1X23803bf1I8PiFYgeUA9usrXh0fkegMt2 T8Sd6CEBzh8n7majh/jMB8EagWgw9AoAr6OG6iidCNwUlz3chwjMyxUmt8KvmdxC64Dn cTVdw8gokImrhQqNrWjrOBDNDc7ZPBwcDSyeOASzvHPZO5fsFc8c9OfOxxLLTlbWDnxh MWCg== X-Received: by 10.229.220.3 with SMTP id hw3mr146383994qcb.19.1388750835742; Fri, 03 Jan 2014 04:07:15 -0800 (PST) Received: from [192.168.0.110] (HSI-KBW-5-10-51-197.hsi18.kabel-badenwuerttemberg.de. [5.10.51.197]) by mx.google.com with ESMTPSA id p20sm85320865qay.0.2014.01.03.04.07.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Jan 2014 04:07:15 -0800 (PST) Sender: Christian Schneider Message-ID: <52C6A7E7.7060709@die-schneider.net> Date: Fri, 03 Jan 2014 13:07:03 +0100 From: Christian Schneider User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: user@karaf.apache.org Subject: Re: karaf 3.0 : ShellTable question References: <1388741711572-4030886.post@n3.nabble.com> In-Reply-To: <1388741711572-4030886.post@n3.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. -- Christian Schneider http://www.liquid-reality.de Open Source Architect Talend Application Integration Division http://www.talend.com