Return-Path: X-Original-To: apmail-clerezza-commits-archive@www.apache.org Delivered-To: apmail-clerezza-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9673100C9 for ; Sat, 2 Nov 2013 22:01:12 +0000 (UTC) Received: (qmail 81429 invoked by uid 500); 2 Nov 2013 22:01:12 -0000 Delivered-To: apmail-clerezza-commits-archive@clerezza.apache.org Received: (qmail 81406 invoked by uid 500); 2 Nov 2013 22:01:12 -0000 Mailing-List: contact commits-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list commits@clerezza.apache.org Received: (qmail 81399 invoked by uid 99); 2 Nov 2013 22:01:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Nov 2013 22:01:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Nov 2013 22:01:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CE4102388BA4; Sat, 2 Nov 2013 22:00:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1538292 - /clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala Date: Sat, 02 Nov 2013 22:00:48 -0000 To: commits@clerezza.apache.org From: reto@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131102220048.CE4102388BA4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: reto Date: Sat Nov 2 22:00:48 2013 New Revision: 1538292 URL: http://svn.apache.org/r1538292 Log: reformatting (spaces instead of tabs) Modified: clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala Modified: clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala URL: http://svn.apache.org/viewvc/clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala?rev=1538292&r1=1538291&r2=1538292&view=diff ============================================================================== --- clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala (original) +++ clerezza/trunk/shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala Sat Nov 2 22:00:48 2013 @@ -27,41 +27,41 @@ import org.osgi.service.component.Compon import scala.collection.JavaConversions._ class OsgiDsl(context: ComponentContext, outputStream: OutputStream) - extends ServicesDsl(context.getBundleContext) { + extends ServicesDsl(context.getBundleContext) { - lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true) - val bundleContext = context.getBundleContext + lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true) + val bundleContext = context.getBundleContext - def ps = { - for (b <- bundleContext.getBundles) {out.println(b.getBundleId+" - "+b.getSymbolicName+" "+b.getLocation)} - } - - def install(uri: String) = { - bundleContext.installBundle(uri) - } - - def start(uri: String) = { - val b = install(uri) - b.start() - b - } - - def update(pattern: String) = { - for (b <- bundleContext.getBundles; if (b.getLocation.matches(pattern))) { - out.println("updating "+b.getLocation) - b.update() - } - } - - def headers(bundleId: Int) { - headers(bundleContext.getBundle(bundleId)) - } - - def headers(bundle: Bundle) { - for ((k,v) <- bundle.getHeaders) {out.println(k+" = "+v) } - } - - def shutdown { - bundleContext.getBundle(0).stop() - } + def ps = { + for (b <- bundleContext.getBundles) {out.println(b.getBundleId+" - "+b.getSymbolicName+" "+b.getLocation)} + } + + def install(uri: String) = { + bundleContext.installBundle(uri) + } + + def start(uri: String) = { + val b = install(uri) + b.start() + b + } + + def update(pattern: String) = { + for (b <- bundleContext.getBundles; if (b.getLocation.matches(pattern))) { + out.println("updating "+b.getLocation) + b.update() + } + } + + def headers(bundleId: Int) { + headers(bundleContext.getBundle(bundleId)) + } + + def headers(bundle: Bundle) { + for ((k,v) <- bundle.getHeaders) {out.println(k+" = "+v) } + } + + def shutdown { + bundleContext.getBundle(0).stop() + } }