[cp-patches] FYI: JLayeredPane API fix

2005-07-20 Thread Roman Kennke

2005-07-20  Roman Kennke  [EMAIL PROTECTED]

   * javax/swing/JLayeredPane.java:
   Fixed and extended API documentation / class description.


/Roman

Index: javax/swing/JLayeredPane.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JLayeredPane.java,v
retrieving revision 1.23
diff -u -r1.23 JLayeredPane.java
--- javax/swing/JLayeredPane.java   2 Jul 2005 20:32:47 -   1.23
+++ javax/swing/JLayeredPane.java   20 Jul 2005 09:46:02 -
@@ -47,20 +47,41 @@
 import javax.accessibility.Accessible;
 
 /**
- * pThe Layered Pane is a container which divides its children into 6 (or
- * more) disjoint sets. the pre-defined sets are:/p
+ * A container that adds depth to the usual codeContainer/code semantics.
+ * Each child component of a codeLayered Pane/code is placed within one
+ * of several layers. codeJLayeredPane/code defines a set of standard
+ * layers. The pre-defined sets are (in the order from button to top):
  *
- *  ul
- *liFrame Content/li
- *liDefault/li
- *liPalette/li
- *liModal/li
- *liPopup/li
- *liDrag/li
- *  /ul
+ *  dl
+ *dt[EMAIL PROTECTED] #DEFAULT_LAYER}/dt
+ *ddThe layer where most of the normal components are placed. This
+ *  is the bottommost layer./dd
+ *
+ *dt[EMAIL PROTECTED] #PALETTE_LAYER/dt
+ *ddPalette windows are placed in this layer./dd
+ *
+ *dt[EMAIL PROTECTED] #MODAL_LAYER}/dt
+ *ddThe layer where internal modal dialog windows are placed./dd
+ *
+ *dt[EMAIL PROTECTED] #POPUP_LAYER/dt
+ *ddThe layer for popup menus/dd
+ *
+ *dt[EMAIL PROTECTED] #DRAG_LAYER}/dt
+ *ddComponents that are beeing dragged are temporarily placed in
+ *   this layer./dd
+ *  /dl
  *
  * pA child is in exactly one of these layers at any time, though there may
  * be other layers if someone creates them./p
+ *
+ * pYou can add a component to a specific layer using the
+ * [EMAIL PROTECTED] Container#add(Component, Object)} method. I.e.
+ * codelayeredPane.add(comp, JLayeredPane.MODAL_LAYER)/code will add the
+ * component codecomp/code to the modal layer of codelayeredPane/code.
+ * /p
+ *
+ * pTo change the layer of a component that is already a child of
+ * a codeJLayeredPane/code, use the [EMAIL PROTECTED] #setLayer} 
method./p
  *
  * pThe purpose of this class is to translate this view of layers into a
  * contiguous array of components: the one held in our ancestor,
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: more JSlider fixes

2005-07-20 Thread David Gilbert
I committed this patch to make JSlider pass all the Mauve tests I added:

2005-07-20  David Gilbert  [EMAIL PROTECTED]

* javax/swing/JSlider.java
(setMinimum): fire PropertyChangeEvent for new value,
(setMaximum): likewise,
(setSnapToTicks): fire PropertyChangeEvent, not ChangeEvent,
(setPaintTrack): fire PropertyChangeEvent for new value,
(setPaintLabels): initialise label table.

I think there is more work to do on the labels, but I'll be looking at
that more closely as I work more on BasicSliderUI and MetalSliderUI.

Regards,

Dave

Index: javax/swing/JSlider.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JSlider.java,v
retrieving revision 1.16
diff -u -r1.16 JSlider.java
--- javax/swing/JSlider.java19 Jul 2005 13:20:38 -  1.16
+++ javax/swing/JSlider.java20 Jul 2005 10:28:14 -
@@ -509,7 +509,10 @@
*/
   public void setMinimum(int minimum)
   {
+int old = sliderModel.getMinimum();
 sliderModel.setMinimum(minimum);
+if (minimum != old)
+  firePropertyChange(minimum, old, minimum);
   }
 
   /**
@@ -529,7 +532,10 @@
*/
   public void setMaximum(int maximum)
   {
+int old = sliderModel.getMaximum();
 sliderModel.setMaximum(maximum);
+if (maximum != old)
+  firePropertyChange(maximum, old, maximum);
   }
 
   /**
@@ -817,7 +823,7 @@
 if (snap != snapToTicks)
   {
snapToTicks = snap;
-   fireStateChanged();
+   firePropertyChange(snapToTicks, !snap, snap);
   }
   }
 
@@ -863,13 +869,19 @@
   }
 
   /**
-   * This method sets whether the track will be painted.
+   * Sets the flag that controls whether or not the track is painted, and
+   * sends a [EMAIL PROTECTED] PropertyChangeEvent} (for the paintTrack 
property) to all
+   * registered listeners.
*
* @param paint Whether the track will be painted.
*/
   public void setPaintTrack(boolean paint)
   {
-paintTrack = paint;
+if (paintTrack != paint)
+{
+  paintTrack = paint;
+  firePropertyChange(paintTrack, !paint, paint);
+}
   }
 
   /**
@@ -891,9 +903,10 @@
   {
 if (paint != paintLabels)
   {
-   boolean oldPaintLabels = paintLabels;
paintLabels = paint;
-   firePropertyChange(paintLabels, oldPaintLabels, paintLabels);
+if (paint  majorTickSpacing  0)
+  labelTable = createStandardLabels(majorTickSpacing);
+   firePropertyChange(paintLabels, !paint, paint);
   }
   }
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: SwingUtilities API doc fixlet

2005-07-20 Thread Roman Kennke
I brought the class description of SwingUtilities a little bit closer to 
the recommendations for JavaDocs.


2005-07-20  Roman Kennke  [EMAIL PROTECTED]

   * javax/swing/SwingUtilities.java:
   Made class description more concise.

/Roman
Index: javax/swing/SwingUtilities.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
retrieving revision 1.32
diff -u -r1.32 SwingUtilities.java
--- javax/swing/SwingUtilities.java 2 Jul 2005 20:32:49 -   1.32
+++ javax/swing/SwingUtilities.java 20 Jul 2005 12:41:26 -
@@ -63,7 +63,7 @@
 import javax.swing.plaf.InputMapUIResource;
 
 /**
- * This class contains a number of static utility functions which are
+ * A number of static utility functions which are
  * useful when drawing swing components, dispatching events, or calculating
  * regions which need painting.
  *
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: Fixlet for InternalFrame UI classes

2005-07-20 Thread Roman Kennke

This fixes a problem I got with a custom LF and InternalFrames.

2005-07-20  Roman Kennke  [EMAIL PROTECTED]

   * javax/swing/plaf/basic/BasicInternalFrameUI.java
   (installUI): Moved titlePane.setOpaque() call into
   BasicInternalFrameTitlePane's constructor.
   * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
   (constructor): Moved titlePane.setOpaque() call from
   BasicInternalFrameUI.installUI into this constructor.

/Roman

Index: javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,v
retrieving revision 1.11
diff -u -r1.11 BasicInternalFrameTitlePane.java
--- javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 12 Jul 2005 
16:57:03 -  1.11
+++ javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 20 Jul 2005 
13:08:38 -
@@ -592,6 +592,7 @@
 setOpaque(true);
 
 setBackground(Color.LIGHT_GRAY);
+setOpaque(true);
 
 installTitlePane();
   }
Index: javax/swing/plaf/basic/BasicInternalFrameUI.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,v
retrieving revision 1.13
diff -u -r1.13 BasicInternalFrameUI.java
--- javax/swing/plaf/basic/BasicInternalFrameUI.java12 Jul 2005 19:10:27 
-  1.13
+++ javax/swing/plaf/basic/BasicInternalFrameUI.java20 Jul 2005 13:08:38 
-
@@ -1150,7 +1150,6 @@
installKeyboardActions();
 
frame.setOpaque(true);
-   titlePane.setOpaque(true);
frame.invalidate();
   }
   }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches]: Patch: JTree clicking

2005-07-20 Thread Thomas Fitzsimmons
On Wed, 2005-07-20 at 14:25 -0400, Lillian Angel wrote:
 I fixed this already. This was a temporary patch to get things working
 at the time. It works really well now, without the constants.

OK, great.

Thanks,
Tom




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


[cp-patches] Re: [RFA/JDWP] ClassObjectReferenceCommandSet.java

2005-07-20 Thread Aaron Luchko
On Wed, 2005-07-20 at 11:10 -0600, Tom Tromey wrote:
  Aaron == Aaron Luchko [EMAIL PROTECTED] writes:
 
 Aaron 2005-07-12  Aaron Luchko  [EMAIL PROTECTED]
 Aaron  * 
 gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java:
 AaronImplemented the ClassObjectReference CommandSet.
 
 This looks fine to me... one nit though.
 
 Aaron +throw new NotImplementedException(Command  + command +
 Aaron +   not found in String Reference Command Set.);
 
 Isn't this Class Object, not String?

Oops :)

This has actually slipped into a few different CommandSets. I'll just
fix those with other future fixes.

Due to the merger it looks like I should only be committing this stuff
to classpath from now on so I've applied the patch there but not gcj.

thanks, Aaron

ChangeLog

2005-07-20  Aaron Luchko  [EMAIL PROTECTED]

 * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java:
   Implemented the ClassObjectReference CommandSet.

--- /dev/null	2005-06-09 16:29:11.371620296 -0400
+++ gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java	2005-07-20 13:56:44.0 -0400
@@ -0,0 +1,100 @@
+/* ClassObjectReferenceCommandSet.java -- class to implement the 
+   ClassObjectReference Command Set
+   Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ClassObjectReference Command Set.
+ * 
+ * @author Aaron Luchko [EMAIL PROTECTED]
+ */
+public class ClassObjectReferenceCommandSet implements CommandSet
+{
+  // Manages all the different ids that are assigned by jdwp
+  private final IdManager idMan = Jdwp.getIdManager();
+
+  public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+throws JdwpException
+  {
+try
+  {
+switch (command)
+  {
+  case JdwpConstants.CommandSet.ClassObjectReference.REFLECTED_TYPE:
+executeReflectedType(bb, os);
+break;
+  default:
+throw new NotImplementedException(Command  + command +
+   not found in ClassObject Reference Command Set.);
+  }
+  }
+catch (IOException ex)
+  {
+// The DataOutputStream we're using isn't talking to a socket at all
+// So if we throw an IOException we're in serious trouble
+throw new JdwpInternalErrorException(ex);
+  }
+return true;
+  }
+
+  public void executeReflectedType(ByteBuffer bb, DataOutputStream os)
+throws JdwpException, IOException
+  {
+ObjectId oid = idMan.readId(bb);
+Class clazz = (Class) oid.getObject();
+
+// The difference between a ClassObjectId and a ReferenceTypeId is one is
+// stored as an ObjectId and the other as a ReferenceTypeId.
+ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
+  

Re: [cp-patches]: Patch: JTree clicking

2005-07-20 Thread Lillian Angel
I fixed this already. This was a temporary patch to get things working
at the time. It works really well now, without the constants.

On Wed, 2005-07-20 at 14:08 -0400, Thomas Fitzsimmons wrote:
 Hi,
 
 On Fri, 2005-07-15 at 13:35 -0400, Lillian Angel wrote:
 
  + Rectangle bounds = BasicTreeUI.this.getCellBounds(x, y,
  cell);
  + if ((clickY = (y - 10)  clickY = (y + bounds.height +
  10))
  +(clickX = x  clickX = (x + bounds.width + 25)))
 
 Where do these constants come from?  Shouldn't they be calculated based
 on the cell's bounds?
 
 Tom
 
 



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


Re: [cp-patches] [RFA] update to eclipse formatter settings

2005-07-20 Thread Mark Wielaard
Hi,

On Thu, 2005-07-07 at 16:13 -0400, Aaron Luchko wrote:
 I've found a couple issues with the style formatter included
 in .settings/org.eclipse.jdt.core.prefs
 
 The guidelines I'm going by are here,
 
 Implements and extends on separate lines, throws too. Indent extends,
 implements, throws. Apply deep indentation for method arguments.
 http://www.gnu.org/software/classpath/docs/hacking.html#SEC6
 
 As well eclipse automatically added a setting for enum_constants which
 shouldn't affect anything.

 
 2005-07-05  Aaron Luchko  [EMAIL PROTECTED]
   * .settings/org.eclipse.jdt.core.prefs: Fixed indent of 'throws'
 clause for eclipse formatter

This never seem to have made it into the tree.
Tom, as guardian of our (.)eclipse files, could you take a look at this.

Cheers,

Mark


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


Re: [cp-patches] FYI: file locks

2005-07-20 Thread Mark Wielaard
Hi,

On Mon, 2005-07-11 at 21:37 -0700, Casey Marshall wrote:
 On Jul 11, 2005, at 5:14 PM, Robert Schuster wrote:
 
  Hi,
  should that patch allow me to run Eclipse without - 
  Dosgi.locking=none?
 
 It might. I don't know what Eclipse does internally, but if it uses  
 FileChannel.lock and you are running on a platform that supports the  
 'fcntl' function, then I guess it should.

It doesn't because our our FileLock uses a range of (0, Long.MAX_VALUE)
to lock a whole file which doesn't map transparently on how fcntl uses
it (it wants a len of zero when marking everything locked). I have some
mauve tests now for a couple of corner cases and am working on a patch
to fix any remaining issues. I can startup eclipse now without needing
-Dosgi.locking=none locally now:)

Cheers,

Mark


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


[cp-patches] Re: String class: hack for ORP 1.0.9

2005-07-20 Thread Mark Wielaard
Hi David,

On Tue, 2005-07-12 at 08:06 -0400, David P Grove wrote:
 So, I'm having a hard time seeing how this optimization actually makes 
 the code faster under any reasonable assumptions of what an optimizing JIT 
 is going to do.  It seems mostly harmless to have it (although it makes 
 the method larger, and thus a slightly less attractive candidate for 
 inlining), but if it actually buys you any measurable speedup on a high 
 performance VM, then you should really take a hard look at your VM/JIT 
 and find out why they didn't do a good job on the unoptimized version in 
 the first place.  clone() on an array is just a short hand for a new 
 followed by an arraycopy, and the new followed by arraycopy idiom shows up 
 all over the place so you need to do a good job on it.

I hear you :) Don't do performance hacks without actual benchmarking.

I admit to have only done some quick tests on a none-high performance
runtime (jamvm). And the numbers seemed to indicate that this special
case was triggered a lot, so I just assumed it would be beneficial in
general. Unfortunately I didn't have a working setup of jikesRVM and
kaffe and gcj both have a slightly different implementation of this
method.

The reason I thought no reasonable optimizing JIT could actually
optimize this even with the call to arraycopy was because it cannot know
that when count == value.length then offset == 0 so no bounds-checks are
needed. So hand-optimizing that case into a array.clone() seemed like a
win.

It would be interesting to see the actual code produced by JikesRVM
before and after this optimization for this method.

Ideally we would have a dedicated benchmark box and run free software
benchmarks on it comparing CVS from day to day. I had wanted to set
something up like that using DaCapo. Unfortunately the box I wanted to
use is actually a multi-user/server machine, so that wouldn't generate
reliable results. And DaCapo isn't actually free software, even though
it is build from all kinds of real world free software programs and
libraries (we had some discussions about that, but when I found out I
didn't actually have a box to run it on I dropped the issue.).
There is the Ashes Suite Collection though which we could use.

Cheers,

Mark


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


[cp-patches]: Patch: keyHandling for JTree

2005-07-20 Thread Lillian Angel
Still a few more to be implemented. Most are done.

2005-07-20  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTreeUI.java
(keyPressed): Implemented some more VK_XXX and VK_KP_XXX events.

Index: javax/swing/plaf/basic/BasicTreeUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.44
diff -u -r1.44 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	20 Jul 2005 13:52:04 -	1.44
+++ javax/swing/plaf/basic/BasicTreeUI.java	20 Jul 2005 18:56:52 -
@@ -1706,50 +1706,108 @@
* @param e the key pressed
*/
   public void keyPressed(KeyEvent e)
-  { 
+  {
  TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath();
  DefaultMutableTreeNode last = null;
- 
  if (start != null)
 last = (DefaultMutableTreeNode) start.getLastPathComponent();
+
  if (last != null)
  {
-if (e.getKeyCode() == KeyEvent.VK_DOWN)
+// DOWN, KP_DOWN
+if (e.getKeyCode() == KeyEvent.VK_DOWN
+  || e.getKeyCode() == KeyEvent.VK_KP_DOWN)
 {
DefaultMutableTreeNode next = (DefaultMutableTreeNode) 
   BasicTreeUI.this.getNextVisibleNode(last);
-   
if (next != null)
-  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
-new TreePath(next.getPath()));
+   {
+  TreePath newPath = new TreePath(next.getPath());
+  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, newPath);
+  if (e.isControlDown())
+ tree.setLeadSelectionPath(newPath);
+  else if (!next.isLeaf()  e.isShiftDown())
+  {
+ BasicTreeUI.this.tree.expandPath(newPath);
+ BasicTreeUI.this.tree.fireTreeExpanded(newPath);
+  }
+   }
 }
-else if (e.getKeyCode() == KeyEvent.VK_UP)
+// UP, KP_UP
+else if (e.getKeyCode() == KeyEvent.VK_UP
+  || e.getKeyCode() == KeyEvent.VK_KP_UP)
 {
DefaultMutableTreeNode prev = (DefaultMutableTreeNode) 
-   BasicTreeUI.this.getPreviousVisibleNode(last);
-
-if (prev != null)
-   BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
- new TreePath(prev.getPath()));
+  BasicTreeUI.this.getPreviousVisibleNode(last);
+
+   if (prev != null)
+   {
+  TreePath newPath = new TreePath(prev.getPath());
+  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+new TreePath(prev.getPath()));
+  if (e.isControlDown())
+ tree.setLeadSelectionPath(newPath);
+  else if (!prev.isLeaf()  e.isShiftDown())
+  {
+ BasicTreeUI.this.tree.expandPath(newPath);
+ BasicTreeUI.this.tree.fireTreeExpanded(newPath);
+  }
+   }
 }
-else if (e.getKeyCode() == KeyEvent.VK_LEFT)
+// LEFT, KP_LEFT
+else if (e.getKeyCode() == KeyEvent.VK_LEFT
+  || e.getKeyCode() == KeyEvent.VK_KP_LEFT)
 {
TreePath path = new TreePath(last.getPath());
-   
+   DefaultMutableTreeNode p = (DefaultMutableTreeNode) last
+ .getParent();
+
if (!last.isLeaf()  BasicTreeUI.this.tree.isExpanded(path))
{
   BasicTreeUI.this.tree.collapsePath(path);
   BasicTreeUI.this.tree.fireTreeCollapsed(path);
}
+   else if (p != null)
+  BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+new TreePath(p.getPath()));
 }
-else if (e.getKeyCode() == KeyEvent.VK_RIGHT)
+// RIGHT, KP_RIGHT
+else if (e.getKeyCode() == KeyEvent.VK_RIGHT
+  || e.getKeyCode() == KeyEvent.VK_KP_RIGHT)
 {
TreePath path = new TreePath(last.getPath());
-   
+
if (!last.isLeaf()  BasicTreeUI.this.tree.isCollapsed(path))
{
   BasicTreeUI.this.tree.expandPath(path);
   BasicTreeUI.this.tree.fireTreeExpanded(path);
+   }
+   else
+   {
+  DefaultMutableTreeNode next = (DefaultMutableTreeNode) 
+ BasicTreeUI.this.getNextVisibleNode(last);
+
+  if (next != null)
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+   new 

[cp-patches] FYI: some JTable key bindings implemented

2005-07-20 Thread Anthony Balkissoon
This implements some of the key actions for a JTable.

2005-07-20  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/JTable:
(JTable): Set the lead selection index for each of the two lists
associated with this table to 0 (instead of -1).  This complies with
JDK.
* javax/swing/plaf/basic/BasicTableUI.java:
(KeyHandler.keyPressed):  Implemented the following key actions (with
CTRL/SHIFT handling when appropriate): UP/DOWN/LEFT/RIGHT, HOME/END,
CTRL-A, CTRL-\, CTRL-/.


-Tony
Index: javax/swing/JTable.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JTable.java,v
retrieving revision 1.34
diff -u -r1.34 JTable.java
--- javax/swing/JTable.java	7 Jul 2005 21:15:54 -	1.34
+++ javax/swing/JTable.java	20 Jul 2005 20:16:52 -
@@ -618,9 +618,14 @@
   {
 setModel(dm == null ? createDefaultDataModel() : dm);
 setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
-
+
 this.columnModel = cm;
 initializeLocalVars();
+// The next two lines are for compliance with the JDK which starts
+// the JLists associated with a JTable  with both lead selection 
+// indices at 0, rather than -1 as in regular JLists
+selectionModel.setLeadSelectionIndex(0);
+columnModel.getSelectionModel().setLeadSelectionIndex(0);
 updateUI();
   }
 
Index: javax/swing/plaf/basic/BasicTableUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v
retrieving revision 1.10
diff -u -r1.10 BasicTableUI.java
--- javax/swing/plaf/basic/BasicTableUI.java	8 Jul 2005 10:35:35 -	1.10
+++ javax/swing/plaf/basic/BasicTableUI.java	20 Jul 2005 20:16:54 -
@@ -97,12 +97,178 @@
 
   class KeyHandler implements KeyListener
   {
-public void keyPressed(KeyEvent e) 
+public void keyPressed(KeyEvent evt) 
 {
+  ListSelectionModel rowModel = table.getSelectionModel();
+  ListSelectionModel colModel = table.getColumnModel().getSelectionModel();
+
+  int rowLead = rowModel.getLeadSelectionIndex();
+  int rowMax = table.getModel().getRowCount() - 1;
+
+  int colLead = colModel.getLeadSelectionIndex();
+  int colMax = table.getModel().getColumnCount() - 1;
+
+  if ((evt.getKeyCode() == KeyEvent.VK_DOWN)
+  || (evt.getKeyCode() == KeyEvent.VK_KP_DOWN))
+{
+  if (!evt.isShiftDown())
+{
+  
+  table.clearSelection();
+  rowModel.setSelectionInterval(Math.min(rowLead + 1, rowMax),
+Math.min(rowLead + 1, rowMax));
+  colModel.setSelectionInterval(colLead,colLead);
+}
+  else 
+{
+  rowModel.setLeadSelectionIndex(Math.min(rowLead + 1, rowMax));
+  colModel.setLeadSelectionIndex(colLead);
+}
+}
+  else if ((evt.getKeyCode() == KeyEvent.VK_UP)
+   || (evt.getKeyCode() == KeyEvent.VK_KP_UP))
+{
+  if (!evt.isShiftDown())
+{
+  table.clearSelection();
+  rowModel.setSelectionInterval(Math.max(rowLead - 1, 0),
+Math.max(rowLead - 1, 0));
+  colModel.setSelectionInterval(colLead,colLead);
+}
+  else
+{
+  rowModel.setLeadSelectionIndex(Math.max(rowLead - 1, 0));
+  colModel.setLeadSelectionIndex(colLead);
+}
+}
+  else if ((evt.getKeyCode() == KeyEvent.VK_LEFT)
+   || (evt.getKeyCode() == KeyEvent.VK_KP_LEFT))
+{
+  if (evt.isShiftDown())
+{
+  colModel.setLeadSelectionIndex(Math.max(colLead - 1, 0));
+  rowModel.setLeadSelectionIndex(rowLead);
+}
+  else
+{
+  table.clearSelection();
+  rowModel.setSelectionInterval(rowLead,rowLead);
+  colModel.setSelectionInterval(Math.max(colLead - 1, 0),
+Math.max(colLead - 1, 0));
+}
+}
+  else if ((evt.getKeyCode() == KeyEvent.VK_RIGHT)
+   || (evt.getKeyCode() == KeyEvent.VK_KP_RIGHT))
+{
+  if (evt.isShiftDown())
+{
+  colModel.setLeadSelectionIndex(Math.min(colLead + 1, colMax));
+  rowModel.setLeadSelectionIndex(rowLead);
+}
+  else
+{
+  table.clearSelection();
+  rowModel.setSelectionInterval(rowLead,rowLead);
+  colModel.setSelectionInterval(Math.min(colLead + 1, colMax),
+Math.min(colLead + 1, colMax));
+}
+}
+  else if (evt.getKeyCode() == KeyEvent.VK_END)
+{
+  if (evt.isControlDown()  evt.isShiftDown())
+{
+  

[cp-patches] FYI: BorderLayout fixes JMenu strange size reduction.

2005-07-20 Thread Anthony Balkissoon
This patch is committed.
-Tony

On Wed, 2005-07-20 at 11:18 -0400, Anthony Balkissoon wrote:
 This patch fixes the strange size reduction seen in Robert Schuster's
 license chooser program and reported to bug-classpath.
 
 This patch essentially removes the horizontal and vertical padding of
 components when there is no adjacent component.  The problem involved
 JRootPane being resized everytime its JLayeredPane was resized: the
 JLayeredPane would be set to the full size of the JRootPane only to have
 the JRootPane be reduced in size due to this padding issue.
 
 This patch needs approval, especially since it involves an AWT layout
 manager rather than my normal swing widgets.
 
 Patch is attached.
 
 2005-07-20  Anthony Balkissoon  [EMAIL PROTECTED]
 
 * java/awt/BorderLayout.java:
 (layoutContainer): Removed addition of horizontal and vertical gaps
 when there is no corresponding adjacent component.
 ___
 Classpath-patches mailing list
 Classpath-patches@gnu.org
 http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: java/awt/BorderLayout.java
===
RCS file: /cvsroot/classpath/classpath/java/awt/BorderLayout.java,v
retrieving revision 1.15
diff -u -r1.15 BorderLayout.java
--- java/awt/BorderLayout.java	2 Jul 2005 20:32:23 -	1.15
+++ java/awt/BorderLayout.java	20 Jul 2005 15:02:21 -
@@ -591,25 +591,25 @@
   */
 
   int x1 = i.left;
-  int x2 = x1 + w.width + hgap;
+  int x2 = x1 + w.width + (w.width == 0 ? 0 : hgap);
   int x3;
   if (t.width = i.right + e.width)
-x3 = x2 + w.width + hgap;
+x3 = x2 + w.width + (w.width == 0 ? 0 : hgap);
   else
 x3 = t.width - i.right - e.width;
   int ww = t.width - i.right - i.left;
 
   int y1 = i.top;
-  int y2 = y1 + n.height + vgap;
+  int y2 = y1 + n.height + (n.height == 0 ? 0 : vgap);
   int midh = Math.max(e.height, Math.max(w.height, c.height));
   int y3;
   if (t.height = i.bottom + s.height)
 y3 = y2 + midh + vgap;
   else
 y3 = t.height - i.bottom - s.height;
-  int hh = y3-y2-vgap;
+  int hh = y3-y2-(s.height == 0 ? 0 : vgap);
 
-  setBounds(center, x2, y2, x3-x2-hgap, hh);
+  setBounds(center, x2, y2, x3-x2-(w.width == 0 ? 0 : hgap), hh);
   setBounds(my_north, x1, y1, ww, n.height);
   setBounds(my_south, x1, y3, ww, s.height);
   setBounds(my_west, x1, y2, w.width, hh);
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [RFA/JDWP] Values

2005-07-20 Thread Aaron Luchko
This it a utility class for Reading/Writing values and untagged-values.
http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp-spec.html

As well this patch touches ObjectReferenceCommandSet.java and
ReferenceTypeCommandSet.java. The main reason is this is a change to the
Value api so they need to use the new api. This also does a couple
trivial changes at the same time fixing a couple minor typos and a
single line in ObjectReference reflecting a minor change in the api for
IVirtualMachine.

thanks,
Aaron

ChangeLog

2005-07-20  Aaron Luchko  [EMAIL PROTECTED]

* gnu/classpath/jdwp/util/Value.java: Class to read/write JDWP
untagged values and tagged values.
* gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java:
use new api for Values and IVirtualMachine and fix message in
exception.
* gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java:
use new api for Values and fix message in exception.
--- /dev/null	2005-06-09 16:29:11.371620296 -0400
+++ gnu/classpath/jdwp/util/Value.java	2005-07-20 16:36:18.0 -0400
@@ -0,0 +1,297 @@
+/* Value.java -- class to read/write JDWP tagged and untagged values
+   Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.id.ObjectId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class to read/write JDWP tagged and untagged values.
+ * 
+ * @author Aaron Luchko [EMAIL PROTECTED]
+ */
+public class Value
+{
+  /**
+   * Will write the given object as an untagged value to the DataOutputStream.
+   * 
+   * @param os write the value here
+   * @param obj the Object to write
+   * @throws IOException
+   * @throws InvalidFieldException
+   */  
+  public static void writeUntaggedValue(DataOutputStream os, Object obj)
+throws InvalidFieldException, IOException
+  {
+writeValue(os, obj, false);
+  }
+  
+  /**
+   * Will write the given object as a tagged value to the DataOutputStream.
+   * 
+   * @param os write the value here
+   * @param obj the Object to write
+   * @throws IOException
+   * @throws InvalidFieldException
+   */
+  public static void writeTaggedValue(DataOutputStream os, Object obj)
+throws InvalidFieldException, IOException
+  {
+writeValue(os, obj, true);
+  }
+  
+  /**
+   * Will write the given object as either a value or an untagged value to the
+   * DataOutputStream.
+   * 
+   * @param os write the value here
+   * @param obj the Object to write
+   * @param tagged true if the value is tagged, false otherwise
+   * @throws IOException
+   * @throws InvalidFieldException
+   */
+  private static void writeValue(DataOutputStream os, Object obj,
+boolean tagged)
+throws IOException, InvalidFieldException
+  {
+Class clazz = obj.getClass();
+if (clazz.isPrimitive())
+  {
+if (clazz == byte.class)
+  {
+if (tagged)
+  os.writeByte(JdwpConstants.Tag.BYTE);
+   

[cp-patches] [RFA/JDWP] ArrayReferenceCommandSet.java

2005-07-20 Thread Aaron Luchko
This class implements the Array Reference Command Set
http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_ArrayReference

There's a slightly ugly part with a big if/else in executeGetValues but
there doesn't seem to be a way to get rid of this. Fortunately this is
the only place arrayregions are touched so it shouldn't be a problem.

Aaron

ChangeLog
2005-07-20  Aaron Luchko  [EMAIL PROTECTED]

* gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java:
Implemented the ArrayReference CommandSet.

--- /dev/null	2005-06-09 16:29:11.371620296 -0400
+++ gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java	2005-07-20 18:01:21.0 -0400
@@ -0,0 +1,178 @@
+/* ArrayReferenceCommandSet.java -- class toclass to implement the Array
+   Reference Command Set
+   Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.Value;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ArrayReference Command Set.
+ * 
+ * @author Aaron Luchko [EMAIL PROTECTED]
+ */
+public class ArrayReferenceCommandSet implements CommandSet
+{
+  // Manages all the different ids that are assigned by jdwp
+  private final IdManager idMan = Jdwp.getIdManager();
+
+  public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+throws JdwpException
+  {
+try
+  {
+switch (command)
+  {
+  case JdwpConstants.CommandSet.ArrayReference.LENGTH:
+executeLength(bb, os);
+break;
+  case JdwpConstants.CommandSet.ArrayReference.GET_VALUES:
+executeGetValues(bb, os);
+break;
+  case JdwpConstants.CommandSet.ArrayReference.SET_VALUES:
+executeSetValues(bb, os);
+break;
+  default:
+throw new NotImplementedException(Command  + command +
+   not found in Array Reference Command Set.);
+  }
+  }
+catch (IOException ex)
+  {
+// The DataOutputStream we're using isn't talking to a socket at all
+// So if we throw an IOException we're in serious trouble
+throw new JdwpInternalErrorException(ex);
+  }
+return true;
+  }
+
+  private void executeLength(ByteBuffer bb, DataOutputStream os)
+throws InvalidObjectException, IOException
+  {
+ObjectId oid = idMan.readId(bb);
+Object array = oid.getObject();
+os.writeInt(Array.getLength(array));
+  }
+
+  private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+throws JdwpException, IOException
+  {
+ObjectId oid = idMan.readId(bb);
+Object array = oid.getObject();
+int first = bb.getInt();
+int length = bb.getInt();
+
+ 

Re: areas of divergence

2005-07-20 Thread Mark Wielaard
Hi,

I CCed the main classpath list because I think this will interest most
hackers there. (Those that didn't notice yet: The Big Merge is done!)

On Sat, 2005-07-16 at 11:26 -0600, Tom Tromey wrote:
 Here's some info on the areas where libgcj and classpath still
 diverge.
 
 gnu.gcj.convert
 java.io
   The charset conversion framework still differs.
   I think Bryce has a patch to fix this, though perhaps there are
   still performance concerns (btw if we have benchmarks here it would
   be good to have them in a mauve module or something like that)
 
 gnu.gcj.runtime.*
   Most of this is gcj-specific.
   However some of it could probably be shared.  E.g., Classpath has
   system and other class loaders as anonymous classes in
   java.lang.ClassLoader; perhaps one implementation could be changed.
 
 gnu.gcj.xlib
 gnu.awt.xlib
   Our xlib peers that use CNI.  These are unlikely to be merged.

Probably since only gcj currently supports CNI.
But even then it might be a good idea to merge them because that will
make it easier to keep them up to date when/if we make (peer interface)
changes.

 gnu.java.net
 java.net.URLClassLoader
   We have some additional protocol handlers (core, gcjlib), but also
   some divergences in file, jar, and http.  These need to be
   investigated, as I don't think there is a good reason to diverge
   here.

What we should probably do is split out the inner-class URLLoaders into
their own (package private) classes. And have a VMURLClassLoader through
which a runtime can register its own special URLLoaders (like the
gcjlib: and core: handlers of libgcj).

 gnu.java.locale
 java.text
 java.util
   We're still using the old locale framework.  The only reason for
   this is that I didn't want to do too much in the merge.  I hope to
   look into this soon.
 
 gnu.java.rmi.rmic
   Classpath doesn't have rmic in the tree any more.  And the rmic in
   classpath-tools now uses ASM.  I'm not sure what we want to do
   about this.  Removing it would mean stepping back a bit from our
   completeness goal; OTOH merging in tools would mean handling ASM
   somehow ...

We probably should make separate releases of GNU Classpath Tools on day.
These should of course also come with native gcj-compiled versions of
each tool. Just like we do now for gjdoc.

 gnu.java.nio
   I think we differ here because CNI lets us be more efficient.  I
   haven't looked at this much.
 
 java.net
   Not sure
 
 java.util.logging
   Minor differences having to do with how getCallerStackFrame is
   handled.  This is an area to VM-ize and push into Classpath.

Yes. Just before 0.17 I fixed up this code a but in GNU Classpath. But
it definitely must be either factored out completely into its own
VMLogger class, or it should use the VMStackWalker infrastructure
(another point to make sure libgcj and classpath align their
interfaces.)

 java.util.zip
   Most of the divergences are because we use zlib.  More could be
   merged than currently is; some of the Classpath code here looks like
   it isn't doing enough checking (I have a partial, untested patch...).
   I think kaffe also has a zlib-based implementation so perhaps we
   could do a 3-way merge and get a JNI/zlib implementation into
   Classpath as an alternative somehow.
 
 java.util.ResourceBundle
   Stack trace differences again

Hopefully the same solution as java.util.logging.

 java.lang
   The Float/Double diffs seem to be because we wanted some native
   methods for things like floatToIntBits.  This seems like a bad
   choice to me.  IMO these methods can be inlined by the compiler if
   performance is needed, and if not, an extra method call is not super
   important.
 
   Object, Class, and String are unlikely to be fully merged.
   Perhaps Character falls into this category as well.
 
 java.lang.ref
   A change for how we handle references.
   I think our handling here is actually subtly wrong :-(
 
 java.lang.reflect
   I haven't looked at the Classpath versions here.
   Most of the classes we have seem to be in the vm-specific area, so
   perhaps there's nothing to do.
 
 java.nio
   I think CNI-isms again.  Not sure about java.nio.charset

 There are a few changes here and there that I haven't mentioned.  Over
 time I would like to reduce our divergences as much as possible.  In
 most cases there is no benefit to having changes from Classpath.

Thanks so much for the Big Merge Tom! This really brings us much closer
and should make maintanance a lot easier.

Do you have any guidelines for keeping the big merge in sync?
When is a new overlay version tagged and moved into the gcc tree?
Could/Should we coordinate that with GNU Classpath developer snapshot
releases? And how do we handle small (emergency) divergences that pop up
in the embedded classpath dir inside the gcc tree?

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org

Re: String class: hack for ORP 1.0.9

2005-07-20 Thread Mark Wielaard
Hi David,

On Tue, 2005-07-12 at 08:06 -0400, David P Grove wrote:
 So, I'm having a hard time seeing how this optimization actually makes 
 the code faster under any reasonable assumptions of what an optimizing JIT 
 is going to do.  It seems mostly harmless to have it (although it makes 
 the method larger, and thus a slightly less attractive candidate for 
 inlining), but if it actually buys you any measurable speedup on a high 
 performance VM, then you should really take a hard look at your VM/JIT 
 and find out why they didn't do a good job on the unoptimized version in 
 the first place.  clone() on an array is just a short hand for a new 
 followed by an arraycopy, and the new followed by arraycopy idiom shows up 
 all over the place so you need to do a good job on it.

I hear you :) Don't do performance hacks without actual benchmarking.

I admit to have only done some quick tests on a none-high performance
runtime (jamvm). And the numbers seemed to indicate that this special
case was triggered a lot, so I just assumed it would be beneficial in
general. Unfortunately I didn't have a working setup of jikesRVM and
kaffe and gcj both have a slightly different implementation of this
method.

The reason I thought no reasonable optimizing JIT could actually
optimize this even with the call to arraycopy was because it cannot know
that when count == value.length then offset == 0 so no bounds-checks are
needed. So hand-optimizing that case into a array.clone() seemed like a
win.

It would be interesting to see the actual code produced by JikesRVM
before and after this optimization for this method.

Ideally we would have a dedicated benchmark box and run free software
benchmarks on it comparing CVS from day to day. I had wanted to set
something up like that using DaCapo. Unfortunately the box I wanted to
use is actually a multi-user/server machine, so that wouldn't generate
reliable results. And DaCapo isn't actually free software, even though
it is build from all kinds of real world free software programs and
libraries (we had some discussions about that, but when I found out I
didn't actually have a box to run it on I dropped the issue.).
There is the Ashes Suite Collection though which we could use.

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: Fix for java/net/URLClassLoader

2005-07-20 Thread Mark Wielaard
Hi,

On Sat, 2005-07-09 at 15:14 -0500, Archie Cobbs wrote:
 This patch (checked in) fixes two Mauve tests and removes some
 obsolete code.
 
  2005-07-09  Archie Cobbs  [EMAIL PROTECTED]
 
 * java/net/URLClassLoader.java: disallow directories as resources

I remember we added getting file URLs for directories as resources
because Nice depended on that being possible. (Indicating that the Mauve
test and/or the spec is wrong here.) It doesn't really make sense to
return it as resource since it is unclear what to return as content. If
I remember correctly some people wanted to return some
HTML-representation of the directory...

Daniel, can you remember the discussion? And does Nice still depend on
this?

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


Error: No space left on device

2005-07-20 Thread Wolfgang Baer

Hi,

I just tried to read some decisions on the mediation wiki
and got a IOError[Errno 28] No space left on device.

Wolfgang



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


Re: areas of divergence

2005-07-20 Thread Tom Tromey
 Mark == Mark Wielaard [EMAIL PROTECTED] writes:

 gnu.java.net
 java.net.URLClassLoader
 We have some additional protocol handlers (core, gcjlib), but also
 some divergences in file, jar, and http.  These need to be
 investigated, as I don't think there is a good reason to diverge
 here.

Mark What we should probably do is split out the inner-class URLLoaders into
Mark their own (package private) classes. And have a VMURLClassLoader through
Mark which a runtime can register its own special URLLoaders (like the
Mark gcjlib: and core: handlers of libgcj).

Yeah, I agree.  I filed PR 22579 for this.

 gnu.java.locale
 java.text
 java.util
 We're still using the old locale framework.  The only reason for
 this is that I didn't want to do too much in the merge.  I hope to
 look into this soon.

FWIW I started fixing this.  I'm just debugging some test failures.

 gnu.java.rmi.rmic
 Classpath doesn't have rmic in the tree any more.  And the rmic in
 classpath-tools now uses ASM.  I'm not sure what we want to do
 about this.  Removing it would mean stepping back a bit from our
 completeness goal; OTOH merging in tools would mean handling ASM
 somehow ...

Mark We probably should make separate releases of GNU Classpath Tools on day.
Mark These should of course also come with native gcj-compiled versions of
Mark each tool. Just like we do now for gjdoc.

The issue for gcj is that we've historically shipped the tools.  It is
really part of our vision (which is really Per's original vision) of
supplying a complete toolchain.

I think we should do as Bryce suggests and include ASM in our builds
(though not in libgcj).

Mark Do you have any guidelines for keeping the big merge in sync?
Mark When is a new overlay version tagged and moved into the gcc tree?
Mark Could/Should we coordinate that with GNU Classpath developer snapshot
Mark releases? And how do we handle small (emergency) divergences that pop up
Mark in the embedded classpath dir inside the gcc tree?

I put some guidelines about this into libjava/HACKING, but I have a
few more to add.

I think we should tag classpath when we do the import, for
traceability.  I did that with this import FWIW.

For emergencies I think we can just check in patches to
libjava/classpath/, but we need to make sure we have some long term
fix as well -- I don't want hacks and divergences accumulating there.
We already have one of these ... unfortunately for a bug I can't
reproduce myself :-(

I think importing Classpath releases would make sense.  Some
coordination is needed when gcc releases are looming.

Tom


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


Re: Error: No space left on device

2005-07-20 Thread Mark Wielaard
On Wed, 2005-07-20 at 22:23 +0200, Wolfgang Baer wrote:
 I just tried to read some decisions on the mediation wiki
 and got a IOError[Errno 28] No space left on device.

Eep. Thanks for the report.

I removed some stuff, but we are dangerously low on space on
developer.classpath.org:

FilesystemSize  Used Avail Use% Mounted on
/dev/ubd0 2.0G  1.9G   14M 100% /

I'll investigate what takes up so much disk.

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: areas of divergence

2005-07-20 Thread Ranjit Mathew
Tom Tromey wrote:
 
 Mark We probably should make separate releases of GNU Classpath Tools on day.
 Mark These should of course also come with native gcj-compiled versions of
 Mark each tool. Just like we do now for gjdoc.
 
 The issue for gcj is that we've historically shipped the tools.  It is
 really part of our vision (which is really Per's original vision) of
 supplying a complete toolchain.
 
 I think we should do as Bryce suggests and include ASM in our builds
 (though not in libgcj).

I would say that we also import Classpath Tools lock-stock-and-barrel
in a manner similar to what we have done for Classpath, say, in a
folder named libjava/cptools. I would really like GCJ to be a complete
Java development environment.

Tom, thank you very much for the painstaking but desirable Classpath
import.

Ranjit.

-- 
Ranjit Mathew  Email: rmathew AT gmail DOT com

Bangalore, INDIA.Web: http://ranjitmathew.hostingzero.com/


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


[commit-cp] classpath ./ChangeLog java/text/AttributedChara...

2005-07-20 Thread David Gilbert
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: David Gilbert [EMAIL PROTECTED]   05/07/20 08:10:07

Modified files:
.  : ChangeLog 
java/text  : AttributedCharacterIterator.java 
 BreakIterator.java CharacterIterator.java 

Log message:
2005-07-20  David Gilbert  [EMAIL PROTECTED]

* java/text/AttributedCharacterIterator.java: fixed minor API
doc
problems and 80 column wrapping;
* java/text/BreakIterator.java
(getCharacterInstance(Locale)): matched argument name to API
docs,
(getLineInstance(Locale)): likewise,
(getSentenceInstance(Locale)): likewise,
(getWordInstance(Locale)): likewise,
and fixed minor API doc problems all over;
* java/text/CharacterIterator.java: fixed minor API doc
problems.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4149tr2=1.4150r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/text/AttributedCharacterIterator.java.diff?tr1=1.11tr2=1.12r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/text/BreakIterator.java.diff?tr1=1.11tr2=1.12r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/text/CharacterIterator.java.diff?tr1=1.7tr2=1.8r1=textr2=text



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath


[commit-cp] classpath ./ChangeLog javax/swing/Action.java

2005-07-20 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/07/20 09:10:41

Modified files:
.  : ChangeLog 
javax/swing: Action.java 

Log message:
2005-07-20  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/Action.java:
Fixes the class description to be more concise.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4150tr2=1.4151r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/Action.java.diff?tr1=1.10tr2=1.11r1=textr2=text



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath


[commit-cp] classpath ./ChangeLog javax/swing/JLayeredPane....

2005-07-20 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/07/20 09:46:33

Modified files:
.  : ChangeLog 
javax/swing: JLayeredPane.java 

Log message:
2005-07-20  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JLayeredPane.java:
Fixed and extended API documentation / class description.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4151tr2=1.4152r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JLayeredPane.java.diff?tr1=1.23tr2=1.24r1=textr2=text



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath


[commit-cp] classpath/gnu/classpath/jdwp/event

2005-07-20 Thread Aaron Luchko
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/20 19:54:18

classpath/gnu/classpath/jdwp/event

Update of /cvsroot/classpath/classpath/gnu/classpath/jdwp/event
In directory savannah:/tmp/cvs-serv20131/gnu/classpath/jdwp/event

Log Message:
Directory /cvsroot/classpath/classpath/gnu/classpath/jdwp/event added to the 
repository



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath


[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-07-20 Thread Anthony Balkissoon
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Anthony Balkissoon [EMAIL PROTECTED]  05/07/20 20:15:04

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicListUI.java 

Log message:
2005-07-20  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicListUI.java:
(KeyHandler.keyPressed): Restore the lead selection index after doing
a select all operation.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4163tr2=1.4164r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicListUI.java.diff?tr1=1.24tr2=1.25r1=textr2=text



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath


[commit-cp] classpath ./ChangeLog java/awt/BorderLayout.java

2005-07-20 Thread Anthony Balkissoon
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Anthony Balkissoon [EMAIL PROTECTED]  05/07/20 20:30:33

Modified files:
.  : ChangeLog 
java/awt   : BorderLayout.java 

Log message:
2005-07-20  Anthony Balkissoon  [EMAIL PROTECTED]

* java/awt/BorderLayout.java:
(layoutContainer): Removed addition of horizontal and vertical gaps
when there is no corresponding adjacent component.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4165tr2=1.4166r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/BorderLayout.java.diff?tr1=1.15tr2=1.16r1=textr2=text



___
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath