GithubHelp home page GithubHelp logo

Inconsistent Results about eclipsecodeformatter HOT 8 CLOSED

krasa avatar krasa commented on July 24, 2024
Inconsistent Results

from eclipsecodeformatter.

Comments (8)

idcmp avatar idcmp commented on July 24, 2024

..and by "attached" I mean: https://gist.github.com/idcmp/e5e12da322e943f2b0ff

from eclipsecodeformatter.

krasa avatar krasa commented on July 24, 2024

Both Eclipse and this plugin wraps it the same. What Eclipse version do you use?

from eclipsecodeformatter.

idcmp avatar idcmp commented on July 24, 2024

Well that's embarrassing. Let me double check this situation.

from eclipsecodeformatter.

idcmp avatar idcmp commented on July 24, 2024

I'm able to reproduce this locally with the latest version of EAP 14 with something as simple as:

public class Hello {

    public void hello(String name) {
        System.out.println("name = " + name);
    }
}

Hitting reformat outputs the following in idea.log:

2014-08-28 11:19:10,256 [ 402765] DEBUG - plugin.EclipseCodeStyleManager - reformatText Hello.java 0 162
2014-08-28 11:19:10,257 [ 402766] DEBUG - er.plugin.EclipseCodeFormatter - #format 0-162
2014-08-28 11:19:10,257 [ 402766] DEBUG - er.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen Hello.java
2014-08-28 11:19:10,257 [ 402766] DEBUG - clipse.JavaCodeFormatterFacade - #formatInternal
2014-08-28 11:19:10,258 [ 402767] DEBUG - clipse.JavaCodeFormatterFacade - #starting to format by eclipse formatter
2014-08-28 11:19:10,261 [ 402770] DEBUG - clipse.JavaCodeFormatterFacade - reformatting done
2014-08-28 11:19:10,264 [ 402773] DEBUG - er.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done

This gives me:

public class Hello {

    public void hello(
            String name) {
        System.out.println("name = " + name);
    }
}

Formatter XML was created on (and runs fine on) Eclipse Kepler SR2 20140224-0627

from eclipsecodeformatter.

krasa avatar krasa commented on July 24, 2024

Eclipse Kepler SR2 20140224-0627
image
image

from eclipsecodeformatter.

markiewb avatar markiewb commented on July 24, 2024

Perhaps there is another save action active in eclipse, which is applied after the formatting? Remove-Whitespaces or so...

from eclipsecodeformatter.

idcmp avatar idcmp commented on July 24, 2024

I finally found the root cause of this. The developer configuring the standards was committing the wrong file into git. User error. Thanks for looking into this; if you have a paypal link, let me know. :-)

from eclipsecodeformatter.

markiewb avatar markiewb commented on July 24, 2024

@idcmp : I am not the author of this plugin. @krasa is the author. His paypal link you will find on the project page: http://plugins.jetbrains.com/plugin/?idea&id=6546 (the big button on the bottom)

from eclipsecodeformatter.

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.