Menu

#42 Code beautifier

open
nobody
3
2002-03-11
2002-03-10
Joseph Sant
No

Would it be possible to add a Java code beautifier tool to the Tools drop-down.

Discussion

  • Brian Stoler

    Brian Stoler - 2002-03-10

    Logged In: YES
    user_id=343403

    What kind of functionality do you mean for a "beautifier"?
    We already have the ability to re-indent lines. That happens
    when you hit "tab" with the lines selected. Is that what you
    meant, or were you thinking of other transformations?

    (BTW, the indenting algorithm is pretty good now, but a
    better revision is almost complete and should be available
    in a week or two.)

    Thanks for your suggestions!
    -brian

     
  • Joseph Sant

    Joseph Sant - 2002-03-11

    Logged In: YES
    user_id=481827

    I was thinking more along the lines of a full file
    (batch-oriented) beautifier
    that will indent all lines in a file consistently and place
    the braces in a consistent location relative to the control
    construct or language feature they are associated with.
    Jext has this feature and would be good for both maintaining
    programs that have been poorly formatted and for the
    pedagogy of programming.

     
  • Brian Stoler

    Brian Stoler - 2002-03-11
    • milestone: --> Small (< 1 pair-week)
    • priority: 5 --> 3
    • summary: Beautifier on Tool Dropdown --> Code beautifier
     
  • Brian Stoler

    Brian Stoler - 2002-03-11

    Logged In: YES
    user_id=343403

    Oh, I see. This is a very reasonable idea, but I don't think
    it's that high priority right now. On the other hand, it
    shouldn't be that hard to implement, because we can take a
    bunch of the code Jext uses. (Oh, the magics of the GPL!)

    Jext uses a modified version of the abandoned JSBeautifier
    project. (It was abandoned when the author developed
    &quot;Artistic Style&quot;, a project to beautify C/C++/C#/Java that's
    unfortunately written in C.) Since Jext and DrJava are both
    available under the GPL, we could just pull their code and
    integrate it.

    So, if anyone's interested in implementing this (Joe? :)),
    follow up and I can help point you to how to begin.

    -brian

     
  • Joseph Sant

    Joseph Sant - 2002-03-11

    Logged In: YES
    user_id=481827

    Brian,
    Let me know what's involved, if it's not a major job, I'll
    do it.

    Joe.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.