Hacking Classpath in Eclipse

2005-12-20 Thread Tom Tromey
Recently Raif wrote a nice white paper on how to hack on Classpath
using Eclipse.  Mark turned this into a wiki page, and then the three
of us spent some time editing it.

We think it is now ready for a wider audience.  You can read it here:

http://developer.classpath.org/mediation/ClasspathHackingWithEclipse

This document will walk you through setting up Eclipse, checking out
Classpath, Cacao, and Mauve, and then trying them out.  This is still
a work in progress, but we think the instructions here should
generally work ok.

Tom


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


Re: Collections.binarySearch and poorly written comparators

2005-12-20 Thread Tom Tromey
> "Jim" == Jim Murphy <[EMAIL PROTECTED]> writes:

Jim> The bad comparator implementation assumes that o1 is a Foo and o2
Jim> is a Bar.  This "works" when running on the Sum JRE
Jim> implementation of Ccollections.binarySearch but fails with the
Jim> CLASSPATH's implementation because the types are transposed.

Yeah.  We actually hit this in Eclipse once.  In that case we were
able to fix it upstream.

Jim> If a goal of CLASSPATH is to be broadly useful does being "bug for bug"
Jim> compatible matter to you guys?  Would you consider this a bug?

There's no question that there is a bug in the library you're using
:-)

I'm ambivalent about fixing this in Classpath.  There was a similar
case recently where in the end I think we decided not to make a
decision... I guess you could force the issue by writing a patch for
review.  Then somebody would actually have to take a stand.

Tom


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


Collections.binarySearch and poorly written comparators

2005-12-20 Thread Jim Murphy
Hi all,

We're using CLASSPATH together with our code and a 3rd party library.  The
library contains some poorly written comparators and uses of
Collections.binarySearch.  I say poorly written because in the comparator
implementation there is assumptions about the object types and that
assumption is causing me grief by way of a ClassCastException.

>From the comparator interface:

int compare(Object o1, Object o2);

The bad comparator implementation assumes that o1 is a Foo and o2 is a Bar.
This "works" when running on the Sum JRE implementation of
Ccollections.binarySearch but fails with the CLASSPATH's implementation
because the types are transposed.  

I will have a tough time changing the 3rd party library so I feel a little
stuck.  Any suggestions?  

If a goal of CLASSPATH is to be broadly useful does being "bug for bug"
compatible matter to you guys?  Would you consider this a bug?



Jim Murphy



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


Re: builder setup

2005-12-20 Thread Mark Wielaard
Hi Tom,

On Tue, 2005-12-20 at 09:17 -0700, Tom Tromey wrote:
> > "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:
> 
> Mark> And another doing:
> Mark> source setup; cd Nightly;
> Mark> gij -cp /home/cpdev/ircbot/pircbot.jar:/home/cpdev/ircbot/cpbot.jar
> Mark> gnu.classpath.ircbot.Main
> Mark> (irc seems a bit flaky so sometimes our little bot needs to be restarted
> Mark> by hand)
> 
> Could we change the bot to restart itself on failure?

Probably, but I haven't looked very closely at the source. What seems to
happen is that the irc server sometimes just "traps" the bot and doesn't
let it join a channel, I haven't found out why. Often it happens for a
couple times so I need to restart the bot till it clear up.

> Mark> I haven't figured out how to easily share this screen setup. Screen
> Mark> seems to not like being run from a sudo su cpdev session :{
> Mark> Any hints or tips appreciated.
> 
> Instead of screen we could run it in the background, and provide a
> couple scripts to start and stop it.  We could also add an '@reboot'
> cron job to make sure it starts when the machine is rebooted.

Yeah, that is probably better. I thought the screen idea was nicer since
you can in principle share it, but apparently that doesn't work well
when su-ing to a different user since screen gets confused about the
controlling terminal.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: builder setup

2005-12-20 Thread Tom Tromey
> "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:

Mark> And another doing:
Mark> source setup; cd Nightly;
Mark> gij -cp /home/cpdev/ircbot/pircbot.jar:/home/cpdev/ircbot/cpbot.jar
Mark> gnu.classpath.ircbot.Main
Mark> (irc seems a bit flaky so sometimes our little bot needs to be restarted
Mark> by hand)

Could we change the bot to restart itself on failure?

Mark> I haven't figured out how to easily share this screen setup. Screen
Mark> seems to not like being run from a sudo su cpdev session :{
Mark> Any hints or tips appreciated.

Instead of screen we could run it in the background, and provide a
couple scripts to start and stop it.  We could also add an '@reboot'
cron job to make sure it starts when the machine is rebooted.

Mark> I am planning to create a new builder module in mauve to more easily
Mark> share the code next week with others as soon as we are reasonable happy
Mark> about the current script setup.

The scripts could use a serious scrubbing.  Let's do that after they
are in cvs though.

Tom


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


Re: javax.swing.JTextField

2005-12-20 Thread Anthony Balkissoon
On Mon, 2005-12-19 at 22:40 -0500, Christopher Lansdown wrote:
> Hi,
> 
> JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed,
> and looking through the source it doesn't seem to try to catch this.
> 

Hi Chris, I ran a little test program and it seems to work for me.  Are
you trying to activate the ActionEvent programmatically, or were you
actually typing the ENTER key into the text area?  Are you using the
newest Classpath?  

Here's a little test program to run, type in some text and hit enter.
Every time you hit enter "hi" is printed to the console.  Works for me.
If this little program doesn't work for anyone, or if you can write a
small program that shows what's wrong, please file a bug or email the
list again.

Test Program:
import java.awt.event.*;
import javax.swing.*;

public class Test
{ 
  public static void main(String[] args)
  {
JFrame jf = new JFrame();
final JTextField text = new JTextField(10);
text.addActionListener (new ActionListener()
  {
public void actionPerformed(ActionEvent e)
{
  System.out.println ("hi");
}
  }
);
jf.add(text);
jf.pack();
jf.setVisible(true);
  }
} 

--Tony





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


Re: builder setup

2005-12-20 Thread Jim Pick
Actually, the reboots were due to the fact the colo physically moved the
server between different sites.  They're moving everything from AboveNet
in San Jose to Market Post Tower in San Jose (home of MAE-West).  I had
an email about a week ago about the move, but I didn't know when they'd
actually do it until about an hour before they did it.  It seems to have
gone fairly smoothly though.  Some of the extra reboots were just
because I wanted to test to make sure the IPMI setup was working and I
could still access the BIOS.

Also, they're going to ask us to switch to new IP addresses in a month
or so.

I do want to upgrade to Xen 3.0 sometime in the future.  I don't think
I'll have time for that until after the holidays though.

Overall, I think things have been pretty stable.  :-)

Cheers,

 - Jim

Mark Wielaard wrote:
> Hi all, Hi list,
> 
> builder.classpath.org seems to shape up nicely.
> 
> There were 3 reboot last night. I assume that was Jim doing a Xen
> upgrade?
> 
> There were a couple of issues with email (the scripts now fake the
> envelop sender with sendmail to look like emails come from
> developer.classpath.org) that I have asked the gnu.org sysadmin to look
> at (we had the same issue with developer.classpath.org in the past,
> gnu.org thinks it handles all of classpath.org, but developer and
> builder are special).
> 
> I tweaked the Ecj script that Anthony contributed a bit (also created a
> toplevel Nightly/ecj dir that the script expects to be there) and
> together with Tom debugged gcjx a little. The script now builds/runs 5
> versions of ecj:
> - build ecj bytecode with gcj -C
> - build native ecj with gcj
> - build ecj bytecode with gcjx
> - build ecj with jamvm using gcj bytecode version
> - build ecj bytecode with native-ecj
> There should probably be a jacks run added to check that
> ecj-built-by-ecj version is completely sane. The produced ecj hasn't
> been wired into the other build/check scripts.
> 
> I currently have a screen session running with one screen doing:
> source setup; while true; do Everything; Report Idle; sleep 3600; done
> (The sleep is there to prevent builder going insane and spamming
> classpath-testresults with failure messages.)
> And another doing:
> source setup; cd Nightly;
> gij -cp /home/cpdev/ircbot/pircbot.jar:/home/cpdev/ircbot/cpbot.jar
> gnu.classpath.ircbot.Main
> (irc seems a bit flaky so sometimes our little bot needs to be restarted
> by hand)
> 
> I haven't figured out how to easily share this screen setup. Screen
> seems to not like being run from a sudo su cpdev session :{
> Any hints or tips appreciated.
> 
> There is no real web frontend yet, but I did do:
> ln -s /home/cpdev/Nightly/CurrentStatus /var/www/index.html 
> so you can see what builder is doing by looking at
> http://builder.classpath.org/
> 
> I am planning to create a new builder module in mauve to more easily
> share the code next week with others as soon as we are reasonable happy
> about the current script setup.
> 
> Cheers,
> 
> Mark
> 



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


Re: javax.swing.JTextField

2005-12-20 Thread Christopher Lansdown
On 12/20, Roman Kennke wrote:
> Hi Christopher,
> 
> Am Montag, den 19.12.2005, 22:40 -0500 schrieb Christopher Lansdown:
> > Hi,
> > 
> > JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed,
> > and looking through the source it doesn't seem to try to catch this.
> > 
> > Is anyone working on this currently?
> 
> Which version of Classpath have you tried?

CVS as of a day or two ago.

> I tested with current CVS HEAD and there it seems to work. And I believe,
> nobody worked on that in the last weeks, so it should at least be in 0.19
> too. You can find the associated sourcecode in javax/swing/JTextField.java
> starting at line 95 (the notifyAction stuff).

I apologize; I thought that the fileTextField of JFileChooser (in the Metal
plaf) had an action listener (as it should), but I looked more closely and
it doesn't. When I added it, the action event was indeed fired.

(In passing, I had read the code that you referred to; I simply didn't
know enough about the way keymaps were installed to recognize it as such.)

What's strange is that JFormattedTextField, which inherits from JTextField,
doesn't fire the action event... Oh, I see, it specifically overrides the
action map. Is it correct that JFormattedTextField's getActions() just
returns null, rather than invoking its super-class, or at least providing
the same action for the enter key?

> If you still have problems, I would like to see a testcase where it
> fails.

Many thanks,
Chris Lansdown

-- 
"Let us endeavor so to live that when we come to die even the undertaker 
will be sorry."  -- Mark Twain, "Pudd'nhead Wilson's Calendar"
== Evil Overlord Quote of the Day (www.eviloverlord.com) =
97. My dungeon cells will not be furnished with objects that contain
reflective surfaces or anything that can be unravelled. 


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


Re: javax.swing.JTextField

2005-12-20 Thread Roman Kennke
Hi Christopher,

Am Montag, den 19.12.2005, 22:40 -0500 schrieb Christopher Lansdown:
> Hi,
> 
> JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed,
> and looking through the source it doesn't seem to try to catch this.
> 
> Is anyone working on this currently?

Which version of Classpath have you tried? I tested with current CVS
HEAD and there it seems to work. And I believe, nobody worked on that in
the last weeks, so it should at least be in 0.19 too. You can find the
associated sourcecode in javax/swing/JTextField.java starting at line 95
(the notifyAction stuff).

If you still have problems, I would like to see a testcase where it
fails.

Cheers, Roman



signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


builder setup

2005-12-20 Thread Mark Wielaard
Hi all, Hi list,

builder.classpath.org seems to shape up nicely.

There were 3 reboot last night. I assume that was Jim doing a Xen
upgrade?

There were a couple of issues with email (the scripts now fake the
envelop sender with sendmail to look like emails come from
developer.classpath.org) that I have asked the gnu.org sysadmin to look
at (we had the same issue with developer.classpath.org in the past,
gnu.org thinks it handles all of classpath.org, but developer and
builder are special).

I tweaked the Ecj script that Anthony contributed a bit (also created a
toplevel Nightly/ecj dir that the script expects to be there) and
together with Tom debugged gcjx a little. The script now builds/runs 5
versions of ecj:
- build ecj bytecode with gcj -C
- build native ecj with gcj
- build ecj bytecode with gcjx
- build ecj with jamvm using gcj bytecode version
- build ecj bytecode with native-ecj
There should probably be a jacks run added to check that
ecj-built-by-ecj version is completely sane. The produced ecj hasn't
been wired into the other build/check scripts.

I currently have a screen session running with one screen doing:
source setup; while true; do Everything; Report Idle; sleep 3600; done
(The sleep is there to prevent builder going insane and spamming
classpath-testresults with failure messages.)
And another doing:
source setup; cd Nightly;
gij -cp /home/cpdev/ircbot/pircbot.jar:/home/cpdev/ircbot/cpbot.jar
gnu.classpath.ircbot.Main
(irc seems a bit flaky so sometimes our little bot needs to be restarted
by hand)

I haven't figured out how to easily share this screen setup. Screen
seems to not like being run from a sudo su cpdev session :{
Any hints or tips appreciated.

There is no real web frontend yet, but I did do:
ln -s /home/cpdev/Nightly/CurrentStatus /var/www/index.html 
so you can see what builder is doing by looking at
http://builder.classpath.org/

I am planning to create a new builder module in mauve to more easily
share the code next week with others as soon as we are reasonable happy
about the current script setup.

Cheers,

Mark

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


javax.swing.JTextField

2005-12-20 Thread Christopher Lansdown
Hi,

JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed,
and looking through the source it doesn't seem to try to catch this.

Is anyone working on this currently?

Thanks,
Chris Lansdown

-- 
"Let us endeavor so to live that when we come to die even the undertaker 
will be sorry."  -- Mark Twain, "Pudd'nhead Wilson's Calendar"
== Evil Overlord Quote of the Day (www.eviloverlord.com) =
7. When I've captured my adversary and he says, "Look, before you kill me,
will you at least tell me what this is all about?" I'll say, "No." and
shoot him. No, on second thought I'll shoot him then say "No." 


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