Eclipse command line formatter

2005-01-10 Thread Ben Konrath
Hi all, 

I'm just finishing up work on the headless Eclipse Java formatter patch:

http://www.bagu.org/eclipse/org.eclipse.jdt.core-formatter-application.patch

I just tried it out the entire classpath tree and found a bug, so that's
definitely not the final version of the patch.

Also, I'd like to know if there are any requests for this patch (like what
to output ie quiet mode for cron jobs, etc) before I post it to the
eclipse.org bugzilla (https://bugs.eclipse.org/bugs/show_bug.cgi?id=75333). 

I'm not even sure that eclipse.org will take it, if they don't it will end
up in a packaged version of eclipse near you. (Does this mean I should
make some debian packages for eclipse? :)

So next on the TODO list for this is to make a slim and trim custom app
with this so that it's actually useful for you. 

I didn't add an option to fix the imports because the solution involves a
little refactoring and therefore would be more difficult to
maintain if it is not accepted upstream. From past experience I have
found the eclipse.org developers to be very hard engage in dialogue
about enhancements, so don't cross your fingers about getting this in.
This all said, there might be an easy way to add the "fix imports" option
in the slim-trim app that I'm about to whip up but I won't know until I do
it. How important in is option?

Ok, I guess that's all I have to say for now.

Cheers, Ben



___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Michael Koch
Am Dienstag, 11. Januar 2005 08:18 schrieb Ben Konrath:
> Hi all,
>
> I'm just finishing up work on the headless Eclipse Java formatter
> patch:
>
> http://www.bagu.org/eclipse/org.eclipse.jdt.core-formatter-applicat
>ion.patch
>
> I just tried it out the entire classpath tree and found a bug, so
> that's definitely not the final version of the patch.

Thanks, really good work.

> I'm not even sure that eclipse.org will take it, if they don't it
> will end up in a packaged version of eclipse near you. (Does this
> mean I should make some debian packages for eclipse? :)

Adding this to Debian package is a good idea. Please send the final 
patch [EMAIL PROTECTED] We (the Debian people) will then 
take care of it.
 
> So next on the TODO list for this is to make a slim and trim custom
> app with this so that it's actually useful for you.
>
> I didn't add an option to fix the imports because the solution
> involves a little refactoring and therefore would be more difficult
> to maintain if it is not accepted upstream. From past experience I
> have found the eclipse.org developers to be very hard engage in
> dialogue about enhancements, so don't cross your fingers about
> getting this in. This all said, there might be an easy way to add
> the "fix imports" option in the slim-trim app that I'm about to
> whip up but I won't know until I do it. How important in is option?

I think we can live with this. Having a working formatter at all is 
BIG step forward.


Thanks again,

Michael
-- 
Homepage: http://www.worldforge.org/


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Tom Tromey
> "Ben" == Ben Konrath <[EMAIL PROTECTED]> writes:

Ben> 
http://www.bagu.org/eclipse/org.eclipse.jdt.core-formatter-application.patch

I noticed a typo, "formmatting", in FormatterAppMessages.properties.

Ben> Also, I'd like to know if there are any requests for this patch
Ben> (like what to output ie quiet mode for cron jobs, etc) before I
Ben> post it to the eclipse.org bugzilla
Ben> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=75333).

I read through processCommandLine a little.  Letting it work on
multiple files might be useful.

Ben> I didn't add an option to fix the imports because the solution involves a
Ben> little refactoring and therefore would be more difficult to
Ben> maintain if it is not accepted upstream.

IMO that's fine.

What we really need to do is make sure we can really handle Classpath
style.  With Eclipse 3.0 I think we fail to re-indent inside a block,
so we end up with:

  if (foo)
{
code here;
}

Instead of:

  if (foo)
{
  code here;
}

I haven't tried Eclipse 3.1 yet... maybe it has this.  Or maybe I just
made a mistake when configuring.  I'll try to get around to checking
this stuff; I'll file in eclipse.org bugzilla if needed.

Tom


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Per Bothner
Tom Tromey wrote:

What we really need to do is make sure we can really handle Classpath
style.  With Eclipse 3.0 I think we fail to re-indent inside a block,
so we end up with:
  if (foo)
{
code here;
}
Instead of:
  if (foo)
{
  code here;
}
I think this is fixed.
However, note that Eclipse up to 3.1M4 does not handle the GNU/Unix
conventions for tabs: Using 8-column tabs, but indenting by a different
amount.  3.1M4 is actually a regression in this respect.
I reported a bug/enhancement request, and in the last few days Tom 
Eicher posted some patches:
htts://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
Hopefully we'll have something usable soon.

I also suggest we submit a standard "GNU" coding style, and ask them
to include it as a standard formatting style.
--
--Per Bothner
[EMAIL PROTECTED]   http://per.bothner.com/
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Grzegorz B. Prokopski
Hi Ben,

On Tue, 2005-11-01 at 02:18 -0500, Ben Konrath wrote:
> I'm just finishing up work on the headless Eclipse Java formatter patch:

Wow, this is *really* great!

Since years, SableVM code C has been auto-indented with GNU indent, and
it works wonders.  But we weren't able to properly indent Classpath
code.  Now this should be possible.

I wonder, but shouldn't we also start indenting all the native C code
we have in GNU Classpath?  I guess I can provide a small patch for that.

> I'm not even sure that eclipse.org will take it, if they don't it will end
> up in a packaged version of eclipse near you. (Does this mean I should
> make some debian packages for eclipse? :)

Not everybody uses Debian (I do), so I hope they'll take it.  As for
packaging Eclipse for Debian - help would be greatly appreciated. 
Current Eclipse in Debian is only 2.x, and NOT in Sarge/Testing due to
long-standing grave bugs.  So yes, please do package it :-

> So next on the TODO list for this is to make a slim and trim custom app
> with this so that it's actually useful for you. 

It would be delightful :)

> I didn't add an option to fix the imports because the solution involves a
> little refactoring and therefore would be more difficult to
> maintain if it is not accepted upstream. From past experience I have
> found the eclipse.org developers to be very hard engage in dialogue
> about enhancements, so don't cross your fingers about getting this in.

I think all GNU Classpath developers will support your request.

Thanks & cheers,

Grzegorz B. Prokopski
-- 
Grzegorz B. Prokopski   <[EMAIL PROTECTED]>
SableVM - Free, LGPL'ed Java VM  http://sablevm.org
Why SableVM ?!?  http://sablevm.org/wiki/Features
Debian GNU/Linux - the Free OS   http://www.debian.org




___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Ben Konrath
On Tue, 11 Jan 2005 13:16:39 -0700, Tom Tromey wrote:

>> "Ben" == Ben Konrath <[EMAIL PROTECTED]> writes:
> 
> Ben> 
> http://www.bagu.org/eclipse/org.eclipse.jdt.core-formatter-application.patch
> 
> I noticed a typo, "formmatting", in FormatterAppMessages.properties.

It's fixed, thanks.
 
> Ben> Also, I'd like to know if there are any requests for this patch
> Ben> (like what to output ie quiet mode for cron jobs, etc) before I
> Ben> post it to the eclipse.org bugzilla
> Ben> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=75333).
> 
> I read through processCommandLine a little.  Letting it work on
> multiple files might be useful.

Okay, I'll add this, fix a few more things and post the patch to bugzilla.

Cheers, Ben



___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Grzegorz B. Prokopski
On Wed, 2005-12-01 at 07:17 +0100, Michael Koch wrote:
> Am Mittwoch, 12. Januar 2005 03:12 schrieb Grzegorz B. Prokopski:
> 
> > Not everybody uses Debian (I do), so I hope they'll take it.  As
> > for packaging Eclipse for Debian - help would be greatly
> > appreciated. Current Eclipse in Debian is only 2.x, and NOT in
> > Sarge/Testing due to long-standing grave bugs.  So yes, please do
> > package it :-
> 
> Gadek, you should read debian-java and #debian-java more closely, its 
> nearly done. No need to start from scratch again.

No time for IRC lately, but I looked at the ML.  Thanks for pointing it
out. :-)

Cheers,

Grzegorz B. Prokopski
-- 
Grzegorz B. Prokopski   <[EMAIL PROTECTED]>
SableVM - Free, LGPL'ed Java VM  http://sablevm.org
Why SableVM ?!?  http://sablevm.org/wiki/Features
Debian GNU/Linux - the Free OS   http://www.debian.org



___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-11 Thread Michael Koch
Am Mittwoch, 12. Januar 2005 03:12 schrieb Grzegorz B. Prokopski:

> Not everybody uses Debian (I do), so I hope they'll take it.  As
> for packaging Eclipse for Debian - help would be greatly
> appreciated. Current Eclipse in Debian is only 2.x, and NOT in
> Sarge/Testing due to long-standing grave bugs.  So yes, please do
> package it :-

Gadek, you should read debian-java and #debian-java more closely, its 
nearly done. No need to start from scratch again.


Michael
-- 
Homepage: http://www.worldforge.org/


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-12 Thread Tom Tromey
> "Per" == Per Bothner <[EMAIL PROTECTED]> writes:

>> What we really need to do is make sure we can really handle Classpath
>> style.  With Eclipse 3.0 I think we fail to re-indent inside a block,
>> so we end up with:

Per> I think this is fixed.

Yeah, I tried 3.1M4 yesterday and this seemed to work.

Tom


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Eclipse command line formatter

2005-01-12 Thread Tom Tromey
> ">" == Grzegorz B Prokopski <[EMAIL PROTECTED]> writes:

>> I wonder, but shouldn't we also start indenting all the native C code
>> we have in GNU Classpath?  I guess I can provide a small patch for that.

Unless someone knows of specially-formatted comments somewhere in the
C code (or something else that should be untouched), I think this
would be great.

I suggest we take a page from what gdb does: have a script that does
some checking and invokes indent with the right arguments.  See
gdb/src/gdb/gdb_indent.sh.

Tom


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath