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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
"Artistic Style", 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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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
"Artistic Style", 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
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.