You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Ido Hadanny <id...@gmail.com> on 2011/07/28 09:47:50 UTC

eclipse formatting problem when using "apache hive formatter"

Hey,
I'm using eclipse to edit the file
/hive/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java.
Whenever I'm saving it, eclipse changes every non-javadoc comment in that
file.
In each comment there's a line that contains only a *, then a blank space
and then a LF.
Eclipse changes it to a * immediately followed by a LF.
I've double-checked, and my "java code style"->"formatter" settings are:

   - enable project specific settings
   - active profile = "Unmanaged profile 'Apache Hive Formatter'"

What am I doing wrong??

Example of the problem (invisible, use your cursor to see the difference :)
:

Before save:

  /*
   * (non-Javadoc)
   *
   * @see java.sql.PreparedStatement#addBatch()
   */

After save:

  /*
   * (non-Javadoc)
   *
   * @see java.sql.PreparedStatement#addBatch()
   */

Re: eclipse formatting problem when using "apache hive formatter"

Posted by Ido Hadanny <id...@gmail.com>.
Ok, found the problem.

*before* you start developing on the hive codebase go here:
project -> properties -> java editor -> save actions -> additional actions
-> configure...
and change the "remove trailing whitespace" from "all lines" to "ignore
empty lines".

happy contributing, ido


On Thu, Jul 28, 2011 at 10:47 AM, Ido Hadanny <id...@gmail.com> wrote:

> Hey,
> I'm using eclipse to edit the file
> /hive/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java.
> Whenever I'm saving it, eclipse changes every non-javadoc comment in that
> file.
> In each comment there's a line that contains only a *, then a blank space
> and then a LF.
> Eclipse changes it to a * immediately followed by a LF.
> I've double-checked, and my "java code style"->"formatter" settings are:
>
>    - enable project specific settings
>    - active profile = "Unmanaged profile 'Apache Hive Formatter'"
>
> What am I doing wrong??
>
> Example of the problem (invisible, use your cursor to see the difference :)
> :
>
> Before save:
>
>   /*
>    * (non-Javadoc)
>    *
>    * @see java.sql.PreparedStatement#addBatch()
>    */
>
> After save:
>
>   /*
>    * (non-Javadoc)
>    *
>    * @see java.sql.PreparedStatement#addBatch()
>    */
>
>
>