Giter Club home page Giter Club logo

Comments (9)

cmm0004 avatar cmm0004 commented on September 25, 2024

this is intellij 2019.3

from java-code-styles.

JakeWharton avatar JakeWharton commented on September 25, 2024

Can you illustrate what that would change?

My best guess is that it changes the behavior from

/**
 * Foo
 * <p>
 * Bar
 */

to

/**
 * Foo
 *
 * <p>Bar
 */

which is not what we want.

Oracle's Javadoc guide recommends the <p> be placed on its own line. I can't find the link right now, but I have in the past when this has come up.

from java-code-styles.

JakeWharton avatar JakeWharton commented on September 25, 2024

Here's a link: https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#format

It's not the one I'm thinking of, but it does illustrate that <p> goes on its own line.

from java-code-styles.

egraham-square avatar egraham-square commented on September 25, 2024

@JakeWharton, not quite.

When that setting is unticked you have this (empty line allowed to stay empty):

/**
 * Foo
 * 
 * Bar
 */

Once ticked, the autoformatter inserts <p> on the empty line:

/**
 * Foo
 * <p>
 * Bar
 */

I just checked 2019.1, and it looks like it's unticked by default with the Java Code Styles there, so it must have changed at some point between that version and 2019.3.

from java-code-styles.

JakeWharton avatar JakeWharton commented on September 25, 2024

I have a fresh 2020.2 EAP installation from today into which I installed the styles and the checkbox is ticked for me:

Screen Shot 2020-05-28 at 10 41 54 AM

from java-code-styles.

JakeWharton avatar JakeWharton commented on September 25, 2024

🤦

Whoops. Forgot to restart to actually get the styles...

from java-code-styles.

JakeWharton avatar JakeWharton commented on September 25, 2024

Take 2

Screen Shot 2020-05-28 at 10 54 26 AM

from java-code-styles.

egraham-square avatar egraham-square commented on September 25, 2024

Ah interesting. Was this an intentional change to the Java Code Style? Or an oversight?

from java-code-styles.

egraham-square avatar egraham-square commented on September 25, 2024

huh, so I see now that the settings repo isn't specific to any IJ version. And it looks like the setting we're talking about is already false (the desired behavior) in the repo:

<option name="JD_P_AT_EMPTY_LINES" value="false" />

So I'm at a loss as to why it's defaulting to true in some cases. Will try to replicate tomorrow.

from java-code-styles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.