Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 006CB200C73 for ; Wed, 26 Apr 2017 00:17:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F3312160BB6; Tue, 25 Apr 2017 22:17:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EA521160BB3 for ; Wed, 26 Apr 2017 00:17:21 +0200 (CEST) Received: (qmail 99525 invoked by uid 500); 25 Apr 2017 22:17:21 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 99513 invoked by uid 99); 25 Apr 2017 22:17:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2017 22:17:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5F836C1746 for ; Tue, 25 Apr 2017 22:17:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.396 X-Spam-Level: X-Spam-Status: No, score=-0.396 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Vq3zDGEDTwOo for ; Tue, 25 Apr 2017 22:17:17 +0000 (UTC) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E25475FBE5 for ; Tue, 25 Apr 2017 22:17:16 +0000 (UTC) Received: by mail-io0-f179.google.com with SMTP id r16so219261608ioi.2 for ; Tue, 25 Apr 2017 15:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=niiHAfA2Isv55zDs+XDka2rGXfAU/OmmnFlPt0K6l00=; b=qDjMhmhJhA0xqmFLjxVsbhcNLSbEMstAfm9XJ8kJ8t1avk1BJzxOUswtodR35G2fMO oQ3AR60p5H1FXPdJbtlcPJeN+rJbEdUQrvrPyB5oXizrTXRli8/nUKjO6Dp6rTU5E+Lx zp5MSvzdfq8tpqWRwSoZ93gyR6Hp/gUHx5rcduC6kphgH4GW3aBW8brkMP4NymjKOHyE 5cckkfL0iuNsPLsh1kWcoiBP6wOsndN6tUX6GVjk5vNzM1ymEDLJmjbPngePhNxBTaZ5 itURtaQvrzClNfOJmo7jH7G1W6rCZNVDIAEQ7Oq3hTBuFAEmwDvOGNQy19FU8WfjBSeR JusQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=niiHAfA2Isv55zDs+XDka2rGXfAU/OmmnFlPt0K6l00=; b=c42loEIXOAfU3POXAom8Pko/1PUFtmOiETmnfoAnLEV6n+KoF/2nON9d3CKLDdOatN ux5pGftAYu8+ZHW1Srks2Eb2ObAOAkBMsoDhTD3jkZG/xvkCl5CW86hA0LJuU2rJdByA jIEYrKBVGlvPOOgkgjE1rFJ/N4T6FxBwDZmU34J7N9LY2UFJXvDIRFzCVFvQb3kgoUop Ztq6ItcNgd5fkoiaspH0KBzShYUt5IxDI4ljOUKuuPh+9hAHcoYNucNij7774EguR3tp 95Jag+RxwUIuad708FntTe/Z7X0nHvJr1jKi8Ogd+4FJAWYiczgFK//DRvkni/mU2685 odHw== X-Gm-Message-State: AN3rC/5/Zrn0AuEaoK+obbdnUNh5MVmCQ2fVj2bc5+9gaFUi4bm0jpRk TR4933OKIv/FHgB0Lzs= X-Received: by 10.107.53.2 with SMTP id c2mr19217544ioa.185.1493158630197; Tue, 25 Apr 2017 15:17:10 -0700 (PDT) Received: from macbook-pro-2.domain (75-164-179-42.ptld.qwest.net. [75.164.179.42]) by smtp.gmail.com with ESMTPSA id w69sm2163759ith.29.2017.04.25.15.17.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2017 15:17:09 -0700 (PDT) From: David Jencks Content-Type: multipart/alternative; boundary="Apple-Mail=_BF35AE6D-DEBF-4A50-A22A-F745134D2994" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: DS code formatting Date: Tue, 25 Apr 2017 15:17:08 -0700 References: <7936C4DA-E192-4EC6-8CB0-646321FC38A0@gmail.com> <3e36a468-8baf-dd91-1cd2-095bd46334ac@die-schneider.net> To: dev@felix.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) archived-at: Tue, 25 Apr 2017 22:17:23 -0000 --Apple-Mail=_BF35AE6D-DEBF-4A50-A22A-F745134D2994 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99ve investigated further. I think that at some point I must = have modified the imported felix eclipse template. However,=20 - the template is out of date, there are a lot of new language features = with formatting settings. - the template doesn=E2=80=99t match the scr code very well. I=E2=80=99ve pushed a couple branches to GitHub: commit = https://github.com/djencks/felix/commit/bbc1bcff31c0d375701dc8ef7a8c0d2c51= a958b3 is the result of reformatting scr with a freshly imported v11 = template. There seem to me to be an unreasonable number of changes. commit = https://github.com/djencks/felix/commit/2724700da4699c1428e8779e7e35a08a46= 22f368 is the result of reformatting scr with a proposed updated = template. Exporting the v11 template and the proposed v12 template, = sorting, and diffing I get MacBook-Pro-2:felix david$ diff template-11-exported-s.xml = template-12-a-exported-s.xml=20 158,159c158,159 < < --- > > 162,163c162,163 < < --- > > 165,170c165,170 < < < < < < --- > > > > > > 189,190c189,190 < < --- > > 193,194c193,194 < < --- > > 196,201c196,201 < < < < < < --- > > > > > > 283c283 < --- > = I think it=E2=80=99s a bit odd that constructor and method declarations = don=E2=80=99t have spaces (Type var) whereas invocations do ( new Foo( x = ) ) There is a lot of inconsistency in the code but I think there are = more uses without spaces than with at the moment. I=E2=80=99d prefer = they all have spaces. I=E2=80=99d suggest that whether or not we adopt my proposed changes we = should: - put the template in source control so we can track changes to it - sort it so diffs make sense. If anyone thinks proceeding is a good idea I=E2=80=99ll open an issue = and attach the two sorted updated templates. thanks david jencks > On Apr 25, 2017, at 2:51 PM, Thomas Watson wrote: >=20 > I much prefer we use the eclipse formatting template. I have that = template > setup for my workspace that I use for felix. I have also noticed the = code > gets formatted on save. Looking at my workspace settings it does seem = this > is enabled to format the code on save. I am unsure if I set that = myself or > of the act of importing the formatting template did it. >=20 > Tom. >=20 > On Tue, Apr 25, 2017 at 11:09 AM, David Jencks = > wrote: >=20 >> Hi Christian, >>=20 >> Felix has such an eclipse fomatting template, apparently my problem = is >> that I tried to use it. Perhaps it should be put in a more = accessible >> place? I think we should either use it or remove it, I=E2=80=99m a = bit in favor of >> using it. >>=20 >> at the end of http://felix.apache.org/documentation/development/ >> coding-standards.html there is a link to a template at >>=20 >> https://issues.apache.org/jira/secure/attachment/ >> 12419890/Apache+Felix+Eclipse+Template.xml which is the one I=E2=80=99v= e been >> using. >>=20 >> There=E2=80=99s also https://issues.apache.org/jira/browse/FELIX-1406 = which has >> two attachments=E2=80=A6. >>=20 >> https://issues.apache.org/jira/secure/attachment/12419862/ >> ApacheFelixEclipseTemplate.xml >> = https://issues.apache.org/jira/secure/attachment/12419890/Apache%20Felix% >> 20Eclipse%20Template.xml (this is the one linked from the >> coding-standards page) >>=20 >> Reading the comments and checking links, I think that this issue has >> resulted in the current target of the coding-standards page link = being the >> 2nd attachment to the issue. >>=20 >> thanks >> david jencks >>=20 >>=20 >>> On Apr 24, 2017, at 11:43 PM, Christian Schneider < >> chris@die-schneider.net> wrote: >>>=20 >>> Hi David, >>>=20 >>> this might be an eclipse config. >>> Open preferences and go to Java / Editor / Save Actions. >>> There you can select to format the code on save of a file. >>> Maybe this option is switched on for you. >>>=20 >>> That said I think it would make sense to have a common formatter for = the >> code. In CXF we have checkstyle checks for the formatting as well >>> as an eclipse formatter. It helps a lot to make sure that the code = is >> formatted in the same way by everyone and makes it easier to spot = actual >> changes. >>> On the other hand the cxf formatting rules are a bit strange = regarding >> imports so without all the formatters installed it is a pain... So = like >>> most of the time it is a two edged sword ... >>>=20 >>> Christian >>>=20 >>>=20 >>>=20 >>> On 25.04.2017 03:51, David Jencks wrote: >>>> For reasons unclear to me Eclipse has started saving modified files >> reformatted with the felix eclipse code template. This, to put it = mildly, >> has shown that the code isn=E2=80=99t formatted with the template, = and I can=E2=80=99t >> fish out my actual changes by hand. >>>>=20 >>>> What would people think if I reformatted the entire DS project and >> checked in the result? I=E2=80=99m hoping that I can convince git to = end up >> showing me my actual changes after this exercise. >>>>=20 >>>> In a somewhat separate issue, I have so far been unable to convince >> Eclipse to let me open the R7 branch, so it=E2=80=99s possible = someone else may >> have to apply similar changes to that. >>>>=20 >>>> thanks >>>> david jencks >>>>=20 >>>=20 >>>=20 >>> -- >>> Christian Schneider >>> http://www.liquid-reality.de >>>=20 >>> Open Source Architect >>> http://www.talend.com >>>=20 >>=20 >>=20 --Apple-Mail=_BF35AE6D-DEBF-4A50-A22A-F745134D2994--