You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Derek Baum (JIRA)" <ji...@apache.org> on 2009/07/24 10:00:19 UTC
[jira] Created: (FELIX-1406) eclipse code format template does not
match existing code
eclipse code format template does not match existing code
---------------------------------------------------------
Key: FELIX-1406
URL: https://issues.apache.org/jira/browse/FELIX-1406
Project: Felix
Issue Type: Bug
Components: Documentation
Reporter: Derek Baum
Priority: Minor
The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
generates slightly different white space and blank line formatting than existing felix code.
Specifically:
1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
int method1( String arg1 )
{
if ( expr )
{
method1( arg1 );
}
}
The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
but all the examples show code formatted without them.
2. two blank lines are inserted after package statement and between method declarations
This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1406) eclipse code format template does
not match existing code
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756733#action_12756733 ]
Filippo Diotalevi commented on FELIX-1406:
------------------------------------------
Thanks.
I linked the wiki to the new attachment.
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: Apache Felix Eclipse Template.xml, ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1406) eclipse code format template does not
match existing code
Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Derek Baum updated FELIX-1406:
------------------------------
Attachment: Apache Felix Eclipse Template.xml
new template attached that fixes previously reported problems.
1. (space before : in for statement) - there was a setting to directly change this
2. javadoc comment changed into non-javadoc comment
This was odd. The original template only enabled formatting of block comments. I was able to fix this problem either by enabling formatting of javadoc comments or by not formatting block comments.
I chose the latter.
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: Apache Felix Eclipse Template.xml, ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1406) eclipse code format template does not
match existing code
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filippo Diotalevi updated FELIX-1406:
-------------------------------------
Attachment: ApacheFelixEclipseTemplate.xml
I attached an improved version of the Eclipse formatting template.
I uploaded it also in the wiki and made it available for download at
http://cwiki.apache.org/confluence/display/FELIX/Coding+Standards
(direct link is
http://cwiki.apache.org/confluence/download/attachments/19425/ApacheFelixEclipseTemplate.xml?version=1 )
Please check it and close the bug if satisfied.
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1406) eclipse code format template does
not match existing code
Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756517#action_12756517 ]
Derek Baum commented on FELIX-1406:
-----------------------------------
This template looks good, but still has two differences that I'm not sure about:
1. no space after the : in a Java5 for loop:
- for (Method m : methods)
+ for (Method m: methods)
2. javadoc comment is changed into non-javadoc comment and blank lines are inserted between parameters:
(gogo/Reflective.java):
- /**
+ /*
* Complex routein to convert the arguments given from the command line to
* the arguments of the method call. First, an attempt is made to convert
* each argument. If this fails, a check is made to see if varargs can be
* applied. This happens when the last method argument is an array.
- *
+ *
* @param session
+ *
* @param target
+ *
* @param types
+ *
* @param out
+ *
* @param in
+ *
* @return
+ *
* @throws Exception
*/
@SuppressWarnings("unchecked")
- private int coerce(CommandSession session, Object target, Class<?> types[], Object out[], List<Object> in) throws Exception
+ private int coerce(CommandSession session, Object target, Class<?> types[],
+ Object out[], List<Object> in) throws Exception
{
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1406) eclipse code format template does not
match existing code
Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Derek Baum updated FELIX-1406:
------------------------------
Attachment: (was: Apache Felix Eclipse Template.xml)
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: Apache Felix Eclipse Template.xml, ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1406) eclipse code format template does not
match existing code
Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Derek Baum updated FELIX-1406:
------------------------------
Attachment: Apache Felix Eclipse Template.xml
grant license to attachment
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: Apache Felix Eclipse Template.xml, ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-1406) eclipse code format template does not
match existing code
Posted by "Derek Baum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Derek Baum closed FELIX-1406.
-----------------------------
Resolution: Fixed
eclipse template now correctly reflects felix coding standards.
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: Apache Felix Eclipse Template.xml, ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1406) eclipse code format template does
not match existing code
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756527#action_12756527 ]
Filippo Diotalevi commented on FELIX-1406:
------------------------------------------
Good points.
If you have time, just go ahead and upload a new version of the template with the 2 fixes; otherwise I'll do that later tonight or tomorrow.
> eclipse code format template does not match existing code
> ---------------------------------------------------------
>
> Key: FELIX-1406
> URL: https://issues.apache.org/jira/browse/FELIX-1406
> Project: Felix
> Issue Type: Bug
> Components: Documentation
> Reporter: Derek Baum
> Priority: Minor
> Attachments: ApacheFelixEclipseTemplate.xml
>
>
> The eclipse code format template http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
> generates slightly different white space and blank line formatting than existing felix code.
> Specifically:
> 1. spaces are inserted after the opening paren and before the closing paren in declarations and method calls:
> int method1( String arg1 )
> {
> if ( expr )
> {
> method1( arg1 );
> }
> }
> The felix coding standards document http://felix.apache.org/site/coding-standards.html does not specifically specify these spaces,
> but all the examples show code formatted without them.
> 2. two blank lines are inserted after package statement and between method declarations
> This actually agrees with the eclipse template, but the code I was reformatting (gogo) only had one blank line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.