Re: [cp-patches] FYI: ParserDelegator compatibility fix.
Maybe. 2005-07-12 Audrius Meskauskas [EMAIL PROTECTED] * javax/swing/text/html/parser/ParserDelegator.java (gnuParser.getDTD): Added comment about 'super'. Robert Schuster wrote: could you please add a small comment that this is a workaround for 1.3's javac to make sure no one removes it when the next spring clean happens. :) cu Robert Meskauskas Audrius wrote: Roman says this is required to compile the class with JDK1.3's javac (and only for that compiler). 2005-07-12 Audrius Meskauskas [EMAIL PROTECTED] * javax/swing/text/html/parser/ParserDelegator.java (gnuParser.getDTD): added super. to refer the inherited field more obvious. Index: javax/swing/text/html/parser/ParserDelegator.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/parser/ParserDelegator.java,v retrieving revision 1.6 diff -u -r1.6 ParserDelegator.java --- javax/swing/text/html/parser/ParserDelegator.java 11 Jul 2005 23:01:02 - 1.6 +++ javax/swing/text/html/parser/ParserDelegator.java 12 Jul 2005 07:10:04 - @@ -113,6 +113,8 @@ DTD getDTD() { + // Accessing the inherited gnu.javax.swing.text.html.parser.support.Parser + // field. super. is a workaround, required to support JDK1.3's javac. return super.dtd; } } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: JTextComponent.CaretBlinkTimer fixlet
Hi, From time to time the JTextComponent.CaretBlinkTimer would fire while the caret was null. Resulting in nasty exceptions. This patch guards all uses of caret in the Timer with a check to make sure the caret actually exists. 2005-07-12 Mark Wielaard [EMAIL PROTECTED] * javax/swing/text/JTextComponent.java (CaretBlinkTimer.actionPerformed): Check that caret != null. (CaretBlinkTimer.update): Likewise. Committed, Mark Index: javax/swing/text/JTextComponent.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/JTextComponent.java,v retrieving revision 1.33 diff -u -r1.33 JTextComponent.java --- javax/swing/text/JTextComponent.java 5 Jul 2005 10:22:42 - 1.33 +++ javax/swing/text/JTextComponent.java 12 Jul 2005 09:04:33 - @@ -322,7 +322,9 @@ */ public void actionPerformed(ActionEvent ev) { - caret.setVisible(!caret.isVisible()); + Caret c = caret; + if (c != null) + c.setVisible(!c.isVisible()); } /** @@ -331,11 +333,15 @@ public void update() { stop(); - setDelay(caret.getBlinkRate()); - if (editable) -start(); - else -caret.setVisible(false); + Caret c = caret; + if (c != null) + { + setDelay(c.getBlinkRate()); + if (editable) + start(); + else + c.setVisible(false); + } } } 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] FYI: Make MediaTRacker handle Images that didn't properly load
Hi, In MediaTracker we didn't correctly handle Images that were already loaded, but that actually failed to load correctly. In such a case prepareImage() will return false immediately, but the ImageObserver will never be called. So we need an extra call to checkImage() to explicitly grab the status. And since checkImage() itself doesn't in itself try to load the image, we do still need the prepareImage() call to kick off the loading. 2005-07-12 Mark Wielaard [EMAIL PROTECTED] * java/awt/MediaTracker.java (checkAll): Set and check status of MediaEntry with checkImage() if prepareImage() returns false. (statusAll): Likewise. (checkID): Likewise. (statusID): Likewise. This makes our swing work again when the Look and Feel references images that don't exist. Thanks to Sven, Stephane and Thomas for walking me through the Image loading maze. Committed, Mark Index: java/awt/MediaTracker.java === RCS file: /cvsroot/classpath/classpath/java/awt/MediaTracker.java,v retrieving revision 1.17 diff -u -r1.17 MediaTracker.java --- java/awt/MediaTracker.java 6 Jul 2005 08:15:17 - 1.17 +++ java/awt/MediaTracker.java 12 Jul 2005 09:12:00 - @@ -241,15 +241,24 @@ { if (load ((e.status LOADING) == 0)) { -e.status = LOADING; -result = false; -boolean complete = target.prepareImage(e.image, e); -if (complete) - { -e.status = COMPLETE; -result = true; - } - } + if (target.prepareImage(e.image, e)) + e.status = COMPLETE; + else + { + e.status = LOADING; + int flags = target.checkImage(e.image, e); + if ((flags ImageObserver.ABORT) != 0) + e.status = ABORTED; + else if ((flags ImageObserver.ERROR) != 0) + e.status = ERRORED; + else if ((flags ImageObserver.ALLBITS) != 0) + e.status = COMPLETE; + } + boolean complete = (e.status + (COMPLETE | ABORTED | ERRORED)) != 0; + if (!complete) + result = false; + } else result = false; } @@ -373,11 +382,19 @@ { if (load e.status == 0) { -boolean complete = target.prepareImage(e.image, e); -if (complete) +if (target.prepareImage(e.image, e)) e.status = COMPLETE; else - e.status = LOADING; + { +e.status = LOADING; +int flags = target.checkImage(e.image, e); + if ((flags ImageObserver.ABORT) != 0) + e.status = ABORTED; + else if ((flags ImageObserver.ERROR) != 0) + e.status = ERRORED; + else if ((flags ImageObserver.ALLBITS) != 0) + e.status = COMPLETE; + } } result |= e.status; e = e.next; @@ -422,13 +439,22 @@ if (load ((e.status LOADING) == 0)) { e.status = LOADING; -result = false; -boolean complete = target.prepareImage(e.image, e); -if (complete) - { -e.status = COMPLETE; -result = true; - } + if (target.prepareImage(e.image, e)) + e.status = COMPLETE; + else + { + int flags = target.checkImage(e.image, e); + if ((flags ImageObserver.ABORT) != 0) + e.status = ABORTED; + else if ((flags ImageObserver.ERROR) != 0) + e.status = ERRORED; + else if ((flags ImageObserver.ALLBITS) != 0) + e.status = COMPLETE; + } + boolean complete = (e.status + (COMPLETE | ABORTED | ERRORED)) != 0; + if (!complete) + result = false; } else result = false; @@ -567,11 +593,19 @@ { if (load e.status == 0) { -boolean complete = target.prepareImage(e.image, e); -if (complete) + if (target.prepareImage(e.image, e)) e.status = COMPLETE; -else - e.status = LOADING; + else + { + e.status = LOADING; + int flags = target.checkImage(e.image, e); + if ((flags ImageObserver.ABORT) != 0) + e.status = ABORTED; + else if ((flags ImageObserver.ERROR) != 0) + e.status = ERRORED; + else if ((flags ImageObserver.ALLBITS) != 0) + e.status = COMPLETE; + } } result |= e.status; } 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
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. --dave [EMAIL PROTECTED] wrote on 07/12/2005 04:54:01 AM: On Tue, 2005-07-12 at 13:02 +1200, Simon Kitching wrote: I just wondered if it was time to remove this hack... Wow, that is a very old workaround. And indeed a nice optimization to have. A quick startup of eclipse (with just a little project) shows 4642 hits of String.toCharArray() of which 4200 have (count == value.length). Thanks for finding this. Committed as: Reported by Simon Kitching [EMAIL PROTECTED] * java/lang/String.java (toCharArray): Return value.clone() when count == value.length. Cheers, Mark diff -u -r1.67 String.java --- java/lang/String.java 11 Jul 2005 22:30:07 - 1.67 +++ java/lang/String.java 12 Jul 2005 08:48:23 - @@ -1499,10 +1499,9 @@ */ public char[] toCharArray() { -// XXX ORP 1.0.9 crashes on (char[]) clone() during bootstrap, so we -// omit this optimization for now. -// if (count == value.length) -// return (char[]) value.clone(); +if (count == value.length) + return (char[]) value.clone(); + char[] copy = new char[count]; VMSystem.arraycopy(value, offset, copy, 0, count); return copy; [attachment signature.asc deleted by David P Grove/Watson/IBM] ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: fixlet for JApplet, JDialog, JFrame, JWindow
This is the same as Roman's JInternalFrame addImpl fixlet from yesterday. Add to the top level container itself if we're in the initialization stage, otherwise add to its content pane. Patch attached. 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JApplet.java, * javax/swing/JDialog.java, * javax/swing/JFrame.java, * javax/swing/JWindow.java: (addImpl): Add to the frame itself if we are in the init stage, otherwise add to the contentPane. -Tony Index: javax/swing/JApplet.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JApplet.java,v retrieving revision 1.17 diff -u -r1.17 JApplet.java --- javax/swing/JApplet.java 2 Jul 2005 20:32:47 - 1.17 +++ javax/swing/JApplet.java 12 Jul 2005 13:44:41 - @@ -148,9 +148,9 @@ protected void addImpl(Component comp, Object constraints, int index) { -// If we're adding the rootPane (initialization stages) use super.add. +// If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. -if (comp == rootPane) +if (!initStageDone) super.addImpl(comp, constraints, index); else { Index: javax/swing/JDialog.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JDialog.java,v retrieving revision 1.15 diff -u -r1.15 JDialog.java --- javax/swing/JDialog.java 2 Jul 2005 20:32:47 - 1.15 +++ javax/swing/JDialog.java 12 Jul 2005 13:44:41 - @@ -438,9 +438,9 @@ */ protected void addImpl(Component comp, Object constraints, int index) { -// If we're adding the rootPane (initialization stages) use super.add. +// If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. -if (comp == rootPane) +if (!initStageDone) super.addImpl(comp, constraints, index); else { Index: javax/swing/JFrame.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JFrame.java,v retrieving revision 1.25 diff -u -r1.25 JFrame.java --- javax/swing/JFrame.java 2 Jul 2005 20:32:47 - 1.25 +++ javax/swing/JFrame.java 12 Jul 2005 13:44:41 - @@ -214,9 +214,9 @@ protected void addImpl(Component comp, Object constraints, int index) { -// If we're adding the rootPane (initialization stages) use super.add. +// If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. -if (comp==rootPane) +if (!initStageDone) super.addImpl(comp, constraints, index); else { Index: javax/swing/JWindow.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JWindow.java,v retrieving revision 1.19 diff -u -r1.19 JWindow.java --- javax/swing/JWindow.java 2 Jul 2005 20:32:49 - 1.19 +++ javax/swing/JWindow.java 12 Jul 2005 13:44:41 - @@ -190,9 +190,9 @@ protected void addImpl(Component comp, Object constraints, int index) { -// If we're adding the rootPane (initialization stages) use super.add. +// If we're adding in the initialization stage use super.add. // otherwise pass the add onto the content pane. -if (comp == rootPane) +if (!initStageDone) super.addImpl(comp, constraints, index); else { ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Patch: JTree demo
2005-07-11 Lillian Angel [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkTreeWorld): Implemented (mkTabbedPane): added in tab for TreeWorld * javax/swing/plaf/basic/BasicLookAndFeel.java Changed default color of text non selection background. * javax/swing/plaf/basic/BasicTreeUI.java Removed irrelevant comment * javax/swing/tree/DefaultTreeCellRenderer.java (getTreeCellRendererComponent): changed to use background's non selection default color instead Index: examples/gnu/classpath/examples/swing/Demo.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java,v retrieving revision 1.13 diff -u -r1.13 Demo.java --- examples/gnu/classpath/examples/swing/Demo.java 11 Jul 2005 20:40:55 - 1.13 +++ examples/gnu/classpath/examples/swing/Demo.java 12 Jul 2005 15:16:01 - @@ -429,6 +429,110 @@ return jsp; } + private static JPanel mkTreeWorld() + { +// non-leafs +DefaultMutableTreeNode root = new DefaultMutableTreeNode(Exotic Subsistence); +DefaultMutableTreeNode fruit = new DefaultMutableTreeNode(Interesting Fruit); +DefaultMutableTreeNode veg = new DefaultMutableTreeNode(Extraordinary Vegetables); +DefaultMutableTreeNode liq = new DefaultMutableTreeNode(Peculiar Liquids); + +// leafs +DefaultMutableTreeNode f1 = new DefaultMutableTreeNode(Abiu); +DefaultMutableTreeNode f2 = new DefaultMutableTreeNode(Bamboo Shoots); +DefaultMutableTreeNode f3 = new DefaultMutableTreeNode(Breadfruit); +DefaultMutableTreeNode f4 = new DefaultMutableTreeNode(Canistel); +DefaultMutableTreeNode f5 = new DefaultMutableTreeNode(Duku); +DefaultMutableTreeNode f6 = new DefaultMutableTreeNode(Guava); +DefaultMutableTreeNode f7 = new DefaultMutableTreeNode(Jakfruit); +DefaultMutableTreeNode f8 = new DefaultMutableTreeNode(Quaribea); + +DefaultMutableTreeNode v1 = new DefaultMutableTreeNode(Amaranth); +DefaultMutableTreeNode v2 = new DefaultMutableTreeNode(Kiwano); +DefaultMutableTreeNode v3 = new DefaultMutableTreeNode(Leeks); +DefaultMutableTreeNode v4 = new DefaultMutableTreeNode(Luffa); +DefaultMutableTreeNode v5 = new DefaultMutableTreeNode(Chayote); +DefaultMutableTreeNode v6 = new DefaultMutableTreeNode(Jicama); +DefaultMutableTreeNode v7 = new DefaultMutableTreeNode(Okra); + +DefaultMutableTreeNode l1 = new DefaultMutableTreeNode(Alcoholic); +DefaultMutableTreeNode l11 = new DefaultMutableTreeNode(Caipirinha); +DefaultMutableTreeNode l21 = new DefaultMutableTreeNode(Mojito); +DefaultMutableTreeNode l31 = new DefaultMutableTreeNode(Margarita); +DefaultMutableTreeNode l41 = new DefaultMutableTreeNode(Martini); +DefaultMutableTreeNode l5 = new DefaultMutableTreeNode(Non Alcoholic); +DefaultMutableTreeNode l55 = new DefaultMutableTreeNode(Babaji); +DefaultMutableTreeNode l65 = new DefaultMutableTreeNode(Chikita); + +root.add(fruit); +root.add(veg); +root.add(liq); +fruit.add(f1); +fruit.add(f2); +fruit.add(f3); +fruit.add(f4); +fruit.add(f5); +fruit.add(f6); +fruit.add(f7); +fruit.add(f8); +veg.add(v1); +veg.add(v2); +veg.add(v3); +veg.add(v4); +veg.add(v5); +veg.add(v6); +veg.add(v7); +liq.add(l1); +l1.add(l11); +l1.add(l21); +l1.add(l31); +l1.add(l41); +liq.add(l5); +l5.add(l55); +l5.add(l65); + +final JTree tree = new JTree(root); +tree.setRootVisible(true); +tree.setLargeModel(true); +DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel(); +dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION); +tree.setSelectionModel(dtsm); + +// buttons to add and delete +JButton add = mkButton(add element); +add.addActionListener(new ActionListener() + { +int i = 0; +public void actionPerformed(ActionEvent e) +{ + for (int i = 0; i tree.getRowCount(); i++) + { + if (tree.isRowSelected(i)) + { + TreePath p = tree.getPathForRow(i); + DefaultMutableTreeNode n = (DefaultMutableTreeNode) p. + getLastPathComponent(); + n.add(new DefaultMutableTreeNode(New Element)); + tree.repaint(); + break; + } + } +} + }); + + +JPanel p1 = new JPanel(); +p1.setLayout(new BorderLayout()); + +JPanel p2 = new JPanel(); +p2.add(add); + +p1.add(p2, BorderLayout.NORTH); +p1.add(mkScrollPane(tree), BorderLayout.CENTER); + +return p1; + } + public static JPanel mkListWorld() { @@ -545,6 +649,7 @@ tabs.add(Button world!, mkButtonWorld()); tabs.add(List
[cp-patches] FYI: fixlet for BasicLookAndFeel
This corrects the color values for Basic buttons. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicLookAndFeel.java (initComponentDefaults): Corrected color values for BasicLF buttons. /Roman Index: javax/swing/plaf/basic/BasicLookAndFeel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v retrieving revision 1.30 diff -u -r1.30 BasicLookAndFeel.java --- javax/swing/plaf/basic/BasicLookAndFeel.java 12 Jul 2005 15:23:11 - 1.30 +++ javax/swing/plaf/basic/BasicLookAndFeel.java 12 Jul 2005 15:59:35 - @@ -253,7 +253,7 @@ AbstractUndoableEdit.undoText, Undo, AbstractUndoableEdit.redoText, Redo, - Button.background, new ColorUIResource(light), + Button.background, new ColorUIResource(Color.LIGHT_GRAY), Button.border, new UIDefaults.LazyValue() { @@ -262,17 +262,17 @@ return BasicBorders.getButtonBorder(); } }, - Button.darkShadow, new ColorUIResource(shadow), + Button.darkShadow, new ColorUIResource(Color.BLACK), Button.focusInputMap, new UIDefaults.LazyInputMap(new Object[] { SPACE, pressed, released SPACE, released }), Button.font, new FontUIResource(Dialog, Font.PLAIN, 12), - Button.foreground, new ColorUIResource(darkShadow), - Button.highlight, new ColorUIResource(highLight), - Button.light, new ColorUIResource(highLight), + Button.foreground, new ColorUIResource(Color.BLACK), + Button.highlight, new ColorUIResource(Color.WHITE), + Button.light, new ColorUIResource(Color.LIGHT_GRAY), Button.margin, new InsetsUIResource(2, 2, 2, 2), - Button.shadow, new ColorUIResource(shadow), + Button.shadow, new ColorUIResource(Color.GRAY), Button.textIconGap, new Integer(4), Button.textShiftOffset, new Integer(0), CheckBox.background, new ColorUIResource(light), ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Fixed JInternalFrame's title bar
Hi, I have hacked JInternalFrame's title bar in the Basic LF, so that it matches the Basic LF of the JDK more, and also fixed some behavioural aspects. For example, we had some candidates for paint/layout loops in the title bar's LayoutManager that I removed. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java (TitlePaneLayout.layoutContainer): Do not change any state of the components here (visible/enableActions). This is not the purpose of a layout manager and can lead to loops. Also correct the layout to be closer to the layout of the reference implementation. (TitlePaneLayout.preferredLayoutSize): Return (22, 18) here. That is how high the title pane should be. (PaneButton): Don't set the border to null. (createButtons): The buttons are opaque. (createButtonIcons): Don't create icons in the Basic LF. /Roman Index: javax/swing/plaf/basic/BasicInternalFrameTitlePane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,v retrieving revision 1.9 diff -u -r1.9 BasicInternalFrameTitlePane.java --- javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 2 Jul 2005 20:32:50 - 1.9 +++ javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 12 Jul 2005 14:54:54 - @@ -349,48 +349,36 @@ */ public void layoutContainer(Container c) { - enableActions(); - + Dimension size = c.getSize(); Insets insets = c.getInsets(); - int width = c.getBounds().width - insets.left - insets.right; - int height = c.getBounds().height - insets.top - insets.bottom; + int width = size.width - insets.left - insets.right; + int height = size.height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. Dimension menupref = menuBar.getPreferredSize(); menuBar.setBounds(insets.left, insets.top, menupref.width, height); - int loc = width + insets.left; - - Insets i = closeButton.getInsets(); - Dimension prefs = new Dimension(iconSize + i.left + i.right, - iconSize + i.top + i.bottom); - int top = insets.top + (height - prefs.height) / 2; - if (closeAction.isEnabled()) + int loc = width + insets.left - 1; + int top = insets.top + 1; + int buttonWidth = height - 2; + int buttonHeight = height - 4; + if (closeButton.isVisible()) { - loc -= prefs.width; - closeButton.setVisible(true); - closeButton.setBounds(loc, top, prefs.width, prefs.height); + loc -= buttonWidth + 2; + closeButton.setBounds(loc, top, buttonWidth, buttonHeight); } - else - closeButton.setVisible(false); - if (maximizeAction.isEnabled()) + if (maxButton.isVisible()) { - loc -= prefs.width; - maxButton.setVisible(true); - maxButton.setBounds(loc, top, prefs.width, prefs.height); + loc -= buttonWidth + 2; + maxButton.setBounds(loc, top, buttonWidth, buttonHeight); } - else - maxButton.setVisible(false); - if (iconifyAction.isEnabled()) + if (iconButton.isVisible()) { - loc -= prefs.width; - iconButton.setVisible(true); - iconButton.setBounds(loc, top, prefs.width, prefs.height); + loc -= buttonWidth + 2; + iconButton.setBounds(loc, top, buttonWidth, buttonHeight); } - else - iconButton.setVisible(false); if (title != null) title.setBounds(insets.left + menupref.width, insets.top, @@ -420,26 +408,7 @@ */ public Dimension preferredLayoutSize(Container c) { - Insets frameInsets = frame.getInsets(); - - // Height is the max of the preferredHeights of all components - // inside the pane - int height = 0; - int width = 0; - Dimension d; - - Component[] components = BasicInternalFrameTitlePane.this.getComponents(); - for (int i = 0; i components.length; i++) -{ - d = components[i].getPreferredSize(); - height = Math.max(height, d.height); - width += d.width; -} - - Insets insets = BasicInternalFrameTitlePane.this.getInsets(); - height += insets.top + insets.bottom; - - return new Dimension(width, height); + return new Dimension(22, 18); } /** @@ -468,7 +437,6 @@ { super(a); setMargin(new Insets(0, 0, 0, 0)); - setBorder(null); } /** @@ -813,26 +781,17 @@ protected void createButtons() { closeButton = new PaneButton(closeAction); -closeButton.setOpaque(false); - iconButton = new PaneButton(iconifyAction); -iconButton.setOpaque(false); - maxButton = new PaneButton(maximizeAction); -maxButton.setOpaque(false); } /** - * This method sets the icons in the buttons. + * This method sets the icons in the
[cp-patches] FYI: JMenu fix closes bug 13683
Committed this patch that paints the background of a disabled JMenu properly when it is selected. This, in addition to the JMenu patches I committed yesterday, should close bug 13683. Patch is attached. 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JMenu.java: (isSelected): Call super.isSelected() instead of super.isArmed(). * javax/swing/plaf/basic/BasicMenuItemUI.java: (paintMenuItem): Replaced incorrect selection criteria with call to isSelected(). (paintText): Likewise Index: javax/swing/JMenu.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v retrieving revision 1.19 diff -u -r1.19 JMenu.java --- javax/swing/JMenu.java 11 Jul 2005 18:06:24 - 1.19 +++ javax/swing/JMenu.java 12 Jul 2005 15:30:52 - @@ -328,7 +328,7 @@ */ public boolean isSelected() { -return super.isArmed(); +return super.isSelected(); } /** @@ -351,7 +351,7 @@ { super.setArmed(true); super.setSelected(true); - + // FIXME: The popup menu should be shown on the screen after certain // number of seconds pass. The 'delay' property of this menu indicates // this amount of seconds. 'delay' property is 0 by default. Index: javax/swing/plaf/basic/BasicMenuItemUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java,v retrieving revision 1.12 diff -u -r1.12 BasicMenuItemUI.java --- javax/swing/plaf/basic/BasicMenuItemUI.java 2 Jul 2005 20:32:50 - 1.12 +++ javax/swing/plaf/basic/BasicMenuItemUI.java 12 Jul 2005 15:30:52 - @@ -506,11 +506,8 @@ br.width += insets.right + insets.left; br.height += insets.top + insets.bottom; -/* Menu item is considered to be highlighted when it is selected. - It is considered to be selected if menu item is inside some menu - and is armed or if it is both armed and pressed */ -if (m.getModel().isArmed() - (m.getParent() instanceof MenuElement || m.getModel().isPressed())) +// Menu item is considered to be highlighted when it is selected. +if (m.isSelected()) { if (m.isContentAreaFilled()) { @@ -606,12 +603,8 @@ { if (menuItem.isEnabled()) { -/* Menu item is considered to be highlighted when it is selected. - It is considered to be selected if menu item is inside some menu - and is armed or if it is both armed and pressed */ -if (menuItem.getModel().isArmed() - (menuItem.getParent() instanceof MenuElement -|| menuItem.getModel().isPressed())) +// Menu item is considered to be highlighted when it is selected. +if (menuItem.isSelected()) g.setColor(selectionForeground); else g.setColor(menuItem.getForeground()); @@ -619,7 +612,10 @@ else // FIXME: should fix this to use 'disabledForeground', but its // default value in BasicLookAndFeel is null. - g.setColor(Color.gray); + + // FIXME: should there be different foreground colours for selected + // or deselected, when disabled? + g.setColor(Color.gray); int mnemonicIndex = menuItem.getDisplayedMnemonicIndex(); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Cleaned up BasicInternalFrameTitlePane
Hi, I removed some cruft from BasicInternalFrame and fixed handling of property changes from the enclosing JInternalFrame. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java Removed ad-hoc icons. Replaced them by BasicIconFactory.createEmptyFrameIcon just like in the JDK. (PropertyChangeHandler.propertyChange): Handle change events for closable, iconifiable and maximizable here. (createButtons): Recognize if the JInternalFrame is closable, iconifiable or maximizable. /Roman Index: javax/swing/plaf/basic/BasicInternalFrameTitlePane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,v retrieving revision 1.10 diff -u -r1.10 BasicInternalFrameTitlePane.java --- javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 12 Jul 2005 15:06:59 - 1.10 +++ javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 12 Jul 2005 16:50:45 - @@ -253,11 +253,29 @@ */ public void propertyChange(PropertyChangeEvent evt) { - // The title and frameIcon are taken care of during painting time. - // The only other thing this will care about are the isizable - // properties. So we call enable actions to properly handle the - // buttons and menu items for us. - enableActions(); + String propName = evt.getPropertyName(); + if (propName.equals(closable)) + { + if (evt.getNewValue().equals(Boolean.TRUE)) + closeButton.setVisible(true); + else + closeButton.setVisible(false); + } + else if (propName.equals(iconifiable)) + { + if (evt.getNewValue().equals(Boolean.TRUE)) + iconButton.setVisible(true); + else + iconButton.setVisible(false); + } + else if (propName.equals(maximizable)) + { + if (evt.getNewValue().equals(Boolean.TRUE)) + maxButton.setVisible(true); + else + maxButton.setVisible(false); + } + } } @@ -508,110 +526,14 @@ /** Inactive foreground color. */ protected Color inactiveFGColor; - // FIXME: These icons need to be moved to MetalIconFactory. - - /** The size of the icons in the buttons. */ - private static final int iconSize = 16; - - /** The icon displayed in the close button. */ - protected Icon closeIcon = new Icon() -{ - public int getIconHeight() - { - return iconSize; - } - - public int getIconWidth() - { - return iconSize; - } - - public void paintIcon(Component c, Graphics g, int x, int y) - { - g.translate(x, y); - Color saved = g.getColor(); - g.setColor(Color.BLACK); - - int four = iconSize / 4; - int six = iconSize * 6 / 16; - int ten = iconSize * 10 / 16; - int twelve = iconSize * 12 / 16; - - Polygon a = new Polygon(new int[] { four, six, ten, twelve }, - new int[] { six, four, twelve, ten }, 4); - Polygon b = new Polygon(new int[] { four, six, ten, twelve }, - new int[] { ten, twelve, four, six }, 4); - - g.fillPolygon(a); - g.fillPolygon(b); - - g.setColor(saved); - g.translate(-x, -y); - } -}; - - // FIXME: Create new icon. - /** The icon displayed in the restore button. */ - protected Icon minIcon; + protected Icon minIcon = BasicIconFactory.createEmptyFrameIcon(); /** The icon displayed in the maximize button. */ - protected Icon maxIcon = new Icon() -{ - public int getIconHeight() - { - return iconSize; - } - - public int getIconWidth() - { - return iconSize; - } - - public void paintIcon(Component c, Graphics g, int x, int y) - { - g.translate(x, y); - Color saved = g.getColor(); - g.setColor(Color.BLACK); - - int four = iconSize / 4; - int two = four / 2; - int six = iconSize * 6 / 16; - int eight = four * 2; - - g.fillRect(four, four, eight, two); - g.drawRect(four, six, eight, six); - - g.setColor(saved); - g.translate(-x, -y); - } -}; + protected Icon maxIcon = BasicIconFactory.createEmptyFrameIcon(); /** The icon displayed in the iconify button. */ - protected Icon iconIcon = new Icon() -{ - public int getIconHeight() - { - return iconSize; - } - - public int getIconWidth() - { - return iconSize; - } - - public void paintIcon(Component c, Graphics g, int x, int y) - { - g.translate(x, y); - Color saved = g.getColor(); - g.setColor(Color.BLACK); - - g.fillRect(iconSize / 4, iconSize * 10 / 16, iconSize / 2, iconSize / 8); - - g.setColor(saved); - g.translate(-x, -y); - } -}; + protected Icon iconIcon = BasicIconFactory.createEmptyFrameIcon(); /** The JInternalFrame that this TitlePane is used in. */ protected JInternalFrame frame; @@ -781,8 +703,14 @@ protected void createButtons() { closeButton = new PaneButton(closeAction); +if (!frame.isClosable()) + closeButton.setVisible(false);
[cp-patches] [RFA/JDWP] VirtualMachineCommandSet.java
Ok this is a touch more complicated but not too bad, there's also a couple possibly minor issues. This implements the VirtualMachine CommandSet http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine The VERSION command is the first one that is a bit of an interpretation http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_Version All the fields are pretty direct except for the first one. description: Text information on the VM version Sun along with IBM and BEA (they all actually return the exact same response for this command) return Java Debug Wire Protocol (Reference Implementation) version 1.4?JVM Debug Interface version 1.3?JVM version 1.4.2_06 (Java HotSpot(TM) Client VM' mixed mode) Which seems pretty generic/non-standard so I just did Properties props = System.getProperties(); // The description field is pretty loosely defined String description = JVM version + props.getProperty(java.vm.name) + + props.getProperty(java.vm.version) + + props.getProperty(java.version); which for my rpm installed gcj gave, JVM version GNU libgcj 4.0.0 20050622 (Red Hat 4.0.0-13) 1.4.2 The next issue, the commands AllThreads and TopLevelThreadGroups http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_Version Rely on two things: 1. There can only be 1 top level thread group. 2. The aforesaid top level group can be attained via recursively going group.getParent(). If those assumptions are incorrect then things could get more complicated. There's also the theoretical concern if these are true of a user run program being able to find our Jdwp threads via the same way I do executeAllTheads(). release/holdEvents http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_HoldEvents should be fine being left on the back burner until later. thanks, Aaron 2005-07-12 Aaron Luchko [EMAIL PROTECTED] * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java: New file. --- /dev/null 2005-06-09 16:29:11.371620296 -0400 +++ gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java 2005-07-12 14:07:25.0 -0400 @@ -0,0 +1,451 @@ +/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine + 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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.IVirtualMachine; +import gnu.classpath.jdwp.Jdwp; +import gnu.classpath.jdwp.JdwpConstants; +import gnu.classpath.jdwp.exception.JdwpException; +import gnu.classpath.jdwp.exception.NotImplementedException; +import gnu.classpath.jdwp.id.IdManager; +import gnu.classpath.jdwp.id.JdwpId; +import gnu.classpath.jdwp.id.ObjectId; +import gnu.classpath.jdwp.id.ReferenceTypeId; +import gnu.classpath.jdwp.util.JdwpString; +import gnu.classpath.jdwp.util.Signature; + +import java.io.DataOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Properties; + +/** + * A class representing the VirtualMachine Command Set. + * + * @author Aaron Luchko [EMAIL PROTECTED] + */ +public class
[cp-patches] Re: [RFA/JDWP} ObjectReferenceCommandSet.java
On Tue, 2005-07-12 at 14:15 -0400, Bryce McKinlay wrote: Aaron Luchko wrote: Here's the implementation for the ObjectReference CommandSet http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_ObjectReference ChangeLog 2005-07-08 Aaron Luchko [EMAIL PROTECTED] *gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java: New file. OK Thanks, Committed to trunk. Aaron ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: some more cleanup in JInternalFrame stuff
I did some more cleanup in JInternalFrame. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicInternalFrameUI.java (installDefaults): Create border based on defaults in current LookAndFeel. * javax/swing/plaf/basic/BasicLookAndFeel.java (initComponentDefaults): Included border for InternalFrame as LazyValue. /Roman Index: javax/swing/plaf/basic/BasicLookAndFeel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v retrieving revision 1.32 diff -u -r1.32 BasicLookAndFeel.java --- javax/swing/plaf/basic/BasicLookAndFeel.java 12 Jul 2005 18:58:00 - 1.32 +++ javax/swing/plaf/basic/BasicLookAndFeel.java 12 Jul 2005 19:09:50 - @@ -47,9 +47,12 @@ import java.util.Enumeration; import java.util.ResourceBundle; +import javax.swing.BorderFactory; import javax.swing.KeyStroke; import javax.swing.LookAndFeel; import javax.swing.UIDefaults; +import javax.swing.border.BevelBorder; +import javax.swing.border.Border; import javax.swing.plaf.BorderUIResource; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.DimensionUIResource; @@ -453,7 +456,24 @@ InternalFrame.activeTitleBackground, new ColorUIResource(0, 0, 128), InternalFrame.activeTitleForeground, new ColorUIResource(Color.white), InternalFrame.border, - new BorderUIResource.CompoundBorderUIResource(null, null), + new UIDefaults.LazyValue() + { + public Object createValue(UIDefaults table) + { + Color lineColor = new Color(238, 238, 238); + Border inner = BorderFactory.createLineBorder(lineColor, 1); + Color shadowInner = new Color(184, 207, 229); + Color shadowOuter = new Color(122, 138, 153); + Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, + Color.WHITE, + Color.WHITE, + shadowOuter, + shadowInner); + Border border = new BorderUIResource.CompoundBorderUIResource(outer, + inner); + return border; + } + }, InternalFrame.borderColor, new ColorUIResource(light), InternalFrame.borderDarkShadow, new ColorUIResource(Color.BLACK), InternalFrame.borderHighlight, new ColorUIResource(Color.WHITE), Index: javax/swing/plaf/basic/BasicInternalFrameUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,v retrieving revision 1.12 diff -u -r1.12 BasicInternalFrameUI.java --- javax/swing/plaf/basic/BasicInternalFrameUI.java 11 Jul 2005 11:57:23 - 1.12 +++ javax/swing/plaf/basic/BasicInternalFrameUI.java 12 Jul 2005 19:09:51 - @@ -1184,15 +1184,19 @@ // BasicLookAndFeel's defaults, but obviously they differ // from the colors that are actually used by the JDK. UIDefaults defaults = UIManager.getLookAndFeelDefaults(); - Color lineColor = new Color(238, 238, 238); - Border inner = BorderFactory.createLineBorder(lineColor, 1); - Color shadowInner = new Color(184, 207, 229); - Color shadowOuter = new Color(122, 138, 153); + Color borderColor = defaults.getColor(InternalFrame.borderColor); + Border inner = BorderFactory.createLineBorder(borderColor, 1); + Color borderDarkShadow = defaults.getColor + (InternalFrame.borderDarkShadow); + Color borderHighlight = defaults.getColor + (InternalFrame.borderHighlight); + Color borderShadow = defaults.getColor(InternalFrame.borderShadow); + Color borderLight = defaults.getColor(InternalFrame.borderLight); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, - Color.WHITE, - Color.WHITE, - shadowOuter, - shadowInner); + borderShadow, + borderHighlight, + borderDarkShadow, + borderShadow); Border border = new BorderUIResource.CompoundBorderUIResource(outer, inner); frame.setBorder(border); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Fixed formatting of BasicTreeUI
This little fix spans to commits. Sorry for that. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java I accidentally introduced revalidate calls for repaint calls. Reverted. 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java Fixed formatting of the copyright notice. /Roman Index: javax/swing/plaf/basic/BasicTreeUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- javax/swing/plaf/basic/BasicTreeUI.java 12 Jul 2005 18:58:00 - 1.27 +++ javax/swing/plaf/basic/BasicTreeUI.java 12 Jul 2005 19:15:58 - 1.28 @@ -1,37 +1,40 @@ -/* - * BasicTreeUI.java -- Copyright (C) 2002, 2004, 2005 Free Software Foundation, - * Inc. - * - * 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. - */ +/* BasicTreeUI.java -- + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. + +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 javax.swing.plaf.basic; @@ -1921,7 +1924,7 @@ { // nothing should be selected if user clicks outside of tree BasicTreeUI.this.tree.getSelectionModel().clearSelection(); -BasicTreeUI.this.tree.repaint(); +BasicTreeUI.this.tree.revalidate(); } else if (BasicTreeUI.this.tree.isVisible(path)) { @@ -2165,7 +2168,7 @@ */ public void treeExpanded(TreeExpansionEvent event) { -
[cp-patches] Re: [RFA/JDWP] VirtualMachineCommandSet.java
Aaron Luchko wrote: Ok this is a touch more complicated but not too bad, there's also a couple possibly minor issues. This implements the VirtualMachine CommandSet http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine The VERSION command is the first one that is a bit of an interpretation http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_Version All the fields are pretty direct except for the first one. description: Text information on the VM version Sun along with IBM and BEA (they all actually return the exact same response for this command) return Java Debug Wire Protocol (Reference Implementation) version 1.4?JVM Debug Interface version 1.3?JVM version 1.4.2_06 (Java HotSpot(TM) Client VM' mixed mode) IBM and BEA claim to be HotSpot(TM)? That is odd - sounds like a bug in Sun's JDWP implementation if so. Which seems pretty generic/non-standard so I just did Properties props = System.getProperties(); // The description field is pretty loosely defined String description = JVM version + props.getProperty(java.vm.name) + + props.getProperty(java.vm.version) + + props.getProperty(java.version); which for my rpm installed gcj gave, JVM version GNU libgcj 4.0.0 20050622 (Red Hat 4.0.0-13) 1.4.2 Looks good, but should the JDWP version be incorporated into this string as well? The next issue, the commands AllThreads and TopLevelThreadGroups http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_Version Rely on two things: 1. There can only be 1 top level thread group. 2. The aforesaid top level group can be attained via recursively going group.getParent(). If those assumptions are incorrect then things could get more complicated. It is correct that there can only be 1 top level threadgroup for user code (since a ThreadGroup cannot be created without a parent), but perhaps VMs could implement hidden threadgroups for system code? The name of the command, TopLevelThreadGroups seems to suggest this. There's also the theoretical concern if these are true of a user run program being able to find our Jdwp threads via the same way I do executeAllTheads(). Access to the thread lists is a secure operation - untrusted code will not be able to access these threads if the AccessController's security policy doesn't allow it. Likewise, it would be very silly for an application to rely on only certain threads existing, VMs make threads to do things behind the back of the application all the time. release/holdEvents http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_HoldEvents should be fine being left on the back burner until later. OK. It looks like to implement this, you'll need to be able to queue outgoing packets after all. 2005-07-12 Aaron Luchko [EMAIL PROTECTED] * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java: New file. You could add a brief description of what the file does to the ChangeLog entry, if you like. +// The description field is pretty loosely defined +String description = JVM version + props.getProperty(java.vm.name) + + + props.getProperty(java.vm.version) + + + props.getProperty(java.version); +int jdwpMajor = 1; // Get from jvm? +int jdwpMinor = 5; // Get from jvm? Should this version be 1.4? Also, since this is the implementation, the JDWP code itself probably know better than anywhere else what JDWP version is implemented. +String vmVersion = props.getProperty(java.version); // Get from jvm? The java.version property comes from the VM, at least in libgcj, so it should be considered the canonical source. + private void executeClassesBySignature(ByteBuffer bb, DataOutputStream os) +throws JdwpException, IOException + { +String sig = JdwpString.readString(bb); + +ArrayList allLoadedClasses, allMatchingClasses; + +// This will be a vector of all loaded Classes +allLoadedClasses = vm.getAllLoadedClasses(); This is another example of something that could probably be implemented a lot more efficiently in the VM rather than in Java. The problem is that the VM will have to enumerate the list of all loaded classes into an array/ArrayList/etc, which means quite a bit of memory usage and copying. If it must be done in Java then it might make sense to have the vm interface return an Iterator rather than a List or ArrayList. This way, a VM which maintains its own internal class lists anyway could implement an iterator around them instead of having to make a copy. + private void executeDispose(ByteBuffer bb, DataOutputStream os) +throws JdwpException + { +// TODO: resumeAllThreads isn't sufficient as a thread may have been +// suspended multiple times, we likely need a way to keep track of
[cp-patches] [FYI/JDWP] shutting down in PacketProcessor
I've committed this patch to the trunk. This makes a minor improvement in the shutdown sequence for jdwp by having the Jdwp object itself handle the shutdown from the top level instead of PacketProcessor telling the collection (and possibly the whole VM) to exit itself. Aaron ChangeLog 2005-07-12 Aaron Luchko [EMAIL PROTECTED] * gnu/classpath/jdwp/processor/PacketProcessor.java (run): Send shutdown to jdwp instead of connection. Index: gnu/classpath/jdwp/processor/PacketProcessor.java === RCS file: /cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/PacketProcessor.java,v retrieving revision 1.3 diff -u -p -r1.3 PacketProcessor.java --- gnu/classpath/jdwp/processor/PacketProcessor.java 4 Jul 2005 16:03:23 - 1.3 +++ gnu/classpath/jdwp/processor/PacketProcessor.java 12 Jul 2005 18:11:08 - @@ -40,6 +40,7 @@ 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.transport.JdwpCommandPacket; @@ -146,8 +147,8 @@ public class PacketProcessor { ex.printStackTrace(); } -// Time to shutdown, tell the _connection thread to stop reading -_connection.shutdown(); +// Time to shutdown, tell Jdwp to shutdown +Jdwp.getDefault().shutdown(); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Patch: formatting of copyrights
2005-07-12 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTree.java: Formatting copyright * javax/swing/tree/DefaultTreeCellRenderer.java: Formatting copyright * javax/swing/tree/DefaultTreeSelectionModel.java: Formatting copyright ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Patch: selection for JTree with icon
2005-07-12 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java (paintLeaf): fixed size of selection background to depend on if icon exists (paintNonLeaf): fixed size of selection background to depend on if icon exists Index: javax/swing/plaf/basic/BasicTreeUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v retrieving revision 1.29 diff -u -r1.29 BasicTreeUI.java --- javax/swing/plaf/basic/BasicTreeUI.java 12 Jul 2005 19:18:51 - 1.29 +++ javax/swing/plaf/basic/BasicTreeUI.java 12 Jul 2005 20:17:47 - @@ -2516,11 +2516,16 @@ if (tree.isVisible(curr)) if (selected) { -Component comp = tree.getCellRenderer() - .getTreeCellRendererComponent(tree, leaf, true, false, true, -0, false); -rendererPane.paintComponent(g, comp, tree, - getCellBounds(x, y, leaf)); +DefaultTreeCellRenderer dtcr = (DefaultTreeCellRenderer) + tree.getCellRenderer(); +Component comp = dtcr.getTreeCellRendererComponent(tree, leaf, + true, false, true, 0, false); + +Rectangle cb = getCellBounds(x, y, leaf); +Icon li = dtcr.getLeafIcon(); +if (li != null) + cb.width = ((int) cb.getWidth()) + li.getIconWidth() + 4; +rendererPane.paintComponent(g, comp, tree, cb); } else { @@ -2552,11 +2557,17 @@ if (tree.isVisible(curr)) if (selected) { -Component comp = tree.getCellRenderer() - .getTreeCellRendererComponent(tree, nonLeaf, true, expanded, -false, 0, false); -rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, - nonLeaf)); +DefaultTreeCellRenderer dtcr = (DefaultTreeCellRenderer) +tree.getCellRenderer(); +Component comp = dtcr.getTreeCellRendererComponent(tree, nonLeaf, + true, expanded, false, 0, false); + +Rectangle cb = getCellBounds(x, y, + nonLeaf); +Icon oi = dtcr.getOpenIcon(); +if (oi != null) + cb.width = ((int) cb.getWidth()) + oi.getIconWidth() + 4; +rendererPane.paintComponent(g, comp, tree, cb); } else { ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Patch for DefaultButtonModel relating to JToggleButtons
This patch fixes the problem discussed in the additional comments to bug 13683: ==additional comment #1== I have discovered another bug in this testcase. If you open a menu, you can see in the taskbar that a new window with the name . has been opened. And also, on the sun vm if you click on the checkbox you have this output in the console: JMenu is set to off but with classpath you get: JMenu is set to on Perhaps classpath first triggers a actionPerformed ActionEvent and only afterwards changes the selection of the checkbox? ==additional comment #2== Indeed. I think something is wrong with our JCheckBox. = For classes whose ButtonModel is a JToggleButton.ToggleButtonModel we fire action events after toggling the state of the button, not when the button becomes unpressed. Patch is attached. 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/DefaultButtonModel.java: (changeState): If the button is a JToggleButton fire action events when it changes between (selected/unselected) not when it changes from pressed to unpressed. Fire action events after firing ItemStateChanged events. Index: javax/swing/DefaultButtonModel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/DefaultButtonModel.java,v retrieving revision 1.20 diff -u -r1.20 DefaultButtonModel.java --- javax/swing/DefaultButtonModel.java 2 Jul 2005 20:32:46 - 1.20 +++ javax/swing/DefaultButtonModel.java 12 Jul 2005 20:12:40 - @@ -318,6 +318,7 @@ { int oldstate = stateMask; int newstate; +boolean toggle = (this instanceof JToggleButton.ToggleButtonModel); if (b) newstate = oldstate | stateflag; @@ -339,6 +340,12 @@ { fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, null, ItemEvent.SELECTED)); +// If the button is a toggle button then we fire action performed when +// the button changes state (selected/deselected), not when it changes +// from pressed to unpressed +if (toggle) + fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, + actionCommand)); if (group != null) group.setSelected(this, true); } @@ -347,12 +354,18 @@ { fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, null, ItemEvent.DESELECTED)); +// If the button is a toggle button then we fire action performed when +// the button changes state (selected/deselected), not when it changes +// from pressed to unpressed +if (toggle) + fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, + actionCommand)); if (group != null) group.setSelected(this, false); } else if (((oldstate ARMED) == ARMED (oldstate PRESSED) == PRESSED) - ((newstate ARMED) == ARMED (newstate PRESSED) == 0)) + ((newstate ARMED) == ARMED (newstate PRESSED) == 0) (!toggle)) fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, actionCommand)); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Patch: Demo fix
2005-07-12 Lillian Angel [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkTree): no need to make root visible, it is by default (mkTreeWorld): no need to make root visible, it is by default ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: buttons paramString fixes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, this fixes the part of Bug #13695 (https://savannah.gnu.org/bugs/?func=detailitemitem_id=13695) which complains about the paramString() method. 2005-07-13 Robert Schuster [EMAIL PROTECTED] * javax/swing/JToggleButton.java: (paramString): Returns value of same method in superclass now. * javax/swing/JButton.java: (paramString): Returns value of same method in superclass now, more verbose information added. * javax/swing/JCheckBox.java: (paramString): Dito. cu Robert -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFC1GAEG9cfwmwwEtoRAo+2AJ9QDx5JrEK5M7YHuT/UPgbiRVA/CQCgkqSw jBIfyfgD4h+lqBn6zCn+qwM= =so4q -END PGP SIGNATURE- Index: javax/swing//JButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JButton.java,v retrieving revision 1.15 diff -u -r1.15 JButton.java --- javax/swing//JButton.java 2 Jul 2005 20:32:47 - 1.15 +++ javax/swing//JButton.java 13 Jul 2005 00:18:42 - @@ -1,5 +1,5 @@ /* JButton.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -123,7 +123,14 @@ protected String paramString() { -return JButton; +String superParam = super.paramString(); + +// 41 is the maximum number of chars which may be needed. +StringBuffer sb = new StringBuffer(41); +sb.append(,defaultButton=).append(is_def); +sb.append(,defaultCapable=).append(def); + +return superParam + sb.toString(); } /** Index: javax/swing//JCheckBox.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JCheckBox.java,v retrieving revision 1.12 diff -u -r1.12 JCheckBox.java --- javax/swing//JCheckBox.java 2 Jul 2005 20:32:47 - 1.12 +++ javax/swing//JCheckBox.java 13 Jul 2005 00:18:42 - @@ -1,5 +1,5 @@ /* JCheckBox.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -127,7 +127,7 @@ protected String paramString() { -return JCheckBox; +return super.paramString() + ,borderPaintedFlat= + borderPaintedFlat; } public boolean isBorderPaintedFlat() Index: javax/swing//JToggleButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JToggleButton.java,v retrieving revision 1.19 diff -u -r1.19 JToggleButton.java --- javax/swing//JToggleButton.java 2 Jul 2005 20:32:49 - 1.19 +++ javax/swing//JToggleButton.java 13 Jul 2005 00:18:42 - @@ -287,7 +287,7 @@ */ protected String paramString() { -return JToggleButton; +return super.paramString(); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] buttons paramString fixes #2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, please forget about the first patch. This one is the same but fixes JRadioButton, too. 2005-07-13 Robert Schuster [EMAIL PROTECTED] * javax/swing/JToggleButton.java: (paramString): Returns value of same method in superclass now. * javax/swing/JRadioButton.java: (paramString): Dito. * javax/swing/JButton.java: (paramString): Returns value of same method in superclass now, more verbose information added. * javax/swing/JCheckBox.java: (paramString): Dito. cu Robert -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFC1GIHG9cfwmwwEtoRAghnAJ9C07AY7FJGkOHrTD1COTT8RV+NdgCfWDVM I0euWCKSk/g2XJ4aN6VsAv0= =hxDt -END PGP SIGNATURE- Index: javax/swing//JButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JButton.java,v retrieving revision 1.15 diff -u -r1.15 JButton.java --- javax/swing//JButton.java 2 Jul 2005 20:32:47 - 1.15 +++ javax/swing//JButton.java 13 Jul 2005 00:31:00 - @@ -1,5 +1,5 @@ /* JButton.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -123,7 +123,14 @@ protected String paramString() { -return JButton; +String superParam = super.paramString(); + +// 41 is the maximum number of chars which may be needed. +StringBuffer sb = new StringBuffer(41); +sb.append(,defaultButton=).append(is_def); +sb.append(,defaultCapable=).append(def); + +return superParam + sb.toString(); } /** Index: javax/swing//JCheckBox.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JCheckBox.java,v retrieving revision 1.12 diff -u -r1.12 JCheckBox.java --- javax/swing//JCheckBox.java 2 Jul 2005 20:32:47 - 1.12 +++ javax/swing//JCheckBox.java 13 Jul 2005 00:31:00 - @@ -1,5 +1,5 @@ /* JCheckBox.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -127,7 +127,7 @@ protected String paramString() { -return JCheckBox; +return super.paramString() + ,borderPaintedFlat= + borderPaintedFlat; } public boolean isBorderPaintedFlat() Index: javax/swing//JRadioButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JRadioButton.java,v retrieving revision 1.15 diff -u -r1.15 JRadioButton.java --- javax/swing//JRadioButton.java 2 Jul 2005 20:32:48 - 1.15 +++ javax/swing//JRadioButton.java 13 Jul 2005 00:31:00 - @@ -236,7 +236,7 @@ */ protected String paramString() { -return JRadioButton; +return super.paramString(); } /** Index: javax/swing//JToggleButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JToggleButton.java,v retrieving revision 1.19 diff -u -r1.19 JToggleButton.java --- javax/swing//JToggleButton.java 2 Jul 2005 20:32:49 - 1.19 +++ javax/swing//JToggleButton.java 13 Jul 2005 00:31:00 - @@ -287,7 +287,7 @@ */ protected String paramString() { -return JToggleButton; +return super.paramString(); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: String.equals optimisation
I stand corrected. -- Steve ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String.equals optimisation
Stephen Crawley wrote: [EMAIL PROTECTED] said: I'd be interested to hear of other reasons for Java's requirement to intern all literal strings and constants. Backwards compatibility. At this point we can only conjecture as to why Java was originally defined this way. My guess is that this decision was made in the early days when the language was being targeted at embedded computing and machines with not a lot of memory. Having the JVM do interning of literals could save enough memory to matter. Er, no. String literals in JDK 1.0 were *not* interned. That was changed in JDK 1.1. The world has moved on, and nobody thinks much about conserving string space these days. I don't believe saving space was the motivation, but consistency. Assume: static String x = a; static String y = a; Then you had (x==y) if x and y were defined in the same class, but (x!=y) in they were defined in different classes. People expect that (a==a). -- --Per Bothner [EMAIL PROTECTED] http://per.bothner.com/ ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
RE: String.equals optimisation
Archie Cobbs wrote: Simon Kitching wrote:. * Class.getName returns strings that have been interned. I don't think this is explicitly required by the java specs but is certainly true for Sun's JVM and seems likely to be done by any sensible JVM. I.e., is there something special about class names which means they should be treated differently from any other String randomly created and used in a Java application? (rhetorical question) Otherwise, why not intern all Strings? Etc. In any case, to provide two concrete counter-examples: $ cat zz.java public class zz { public static void main(String[] args) { zz z = new zz(); System.out.println(z.getClass().getName() == zz); } } $ javac zz.java $ java zz true $ jc -Xint zz false $ jamvm zz false $ ikvm zz true He did say any sensible JVM... gdr Regards, Jeroen ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String class: hack for ORP 1.0.9
On Tue, 2005-07-12 at 13:02 +1200, Simon Kitching wrote: I just wondered if it was time to remove this hack... Wow, that is a very old workaround. And indeed a nice optimization to have. A quick startup of eclipse (with just a little project) shows 4642 hits of String.toCharArray() of which 4200 have (count == value.length). Thanks for finding this. Committed as: Reported by Simon Kitching [EMAIL PROTECTED] * java/lang/String.java (toCharArray): Return value.clone() when count == value.length. Cheers, Mark diff -u -r1.67 String.java --- java/lang/String.java 11 Jul 2005 22:30:07 - 1.67 +++ java/lang/String.java 12 Jul 2005 08:48:23 - @@ -1499,10 +1499,9 @@ */ public char[] toCharArray() { -// XXX ORP 1.0.9 crashes on (char[]) clone() during bootstrap, so we -// omit this optimization for now. -// if (count == value.length) -// return (char[]) value.clone(); +if (count == value.length) + return (char[]) value.clone(); + char[] copy = new char[count]; VMSystem.arraycopy(value, offset, copy, 0, count); return copy; signature.asc Description: This is a digitally signed message part ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String class: hack for ORP 1.0.9
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. --dave [EMAIL PROTECTED] wrote on 07/12/2005 04:54:01 AM: On Tue, 2005-07-12 at 13:02 +1200, Simon Kitching wrote: I just wondered if it was time to remove this hack... Wow, that is a very old workaround. And indeed a nice optimization to have. A quick startup of eclipse (with just a little project) shows 4642 hits of String.toCharArray() of which 4200 have (count == value.length). Thanks for finding this. Committed as: Reported by Simon Kitching [EMAIL PROTECTED] * java/lang/String.java (toCharArray): Return value.clone() when count == value.length. Cheers, Mark diff -u -r1.67 String.java --- java/lang/String.java 11 Jul 2005 22:30:07 - 1.67 +++ java/lang/String.java 12 Jul 2005 08:48:23 - @@ -1499,10 +1499,9 @@ */ public char[] toCharArray() { -// XXX ORP 1.0.9 crashes on (char[]) clone() during bootstrap, so we -// omit this optimization for now. -// if (count == value.length) -// return (char[]) value.clone(); +if (count == value.length) + return (char[]) value.clone(); + char[] copy = new char[count]; VMSystem.arraycopy(value, offset, copy, 0, count); return copy; [attachment signature.asc deleted by David P Grove/Watson/IBM] ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String.equals optimisation
Simon Kitching wrote: * Class.getName returns strings that have been interned. I don't think this is explicitly required by the java specs but is certainly true for Sun's JVM and seems likely to be done by any sensible JVM. You definitely make some good arguments, but this one is not neccesarily true. In fact, I'd argue a JVM that interns every class' name (even if only on demand) is potentially wasting a bunch of heap space. I'm assuming that the Class object would contain a reference to the interned string, so there is only one copy of the string, ie somewhere Not a valid assumtion.. in JC no String is associated with Class objects. VMClass.getName() is native and the returned String is created on demand, based on the UTF-8 name stored internally in memory. In fact, one could argue that storing class names in any other way than in their native UTF-8 form is a big waste of memory. E.g., for loaded classes... If the VM can find it's UTF-8 name and create a String dynamically: Then also storing the class name persistently as a String is a 200% increase in memory (a char[] array is twice as big as UTF-8) Else: The VM must store the class name as a String, which is a 100% increase in memory vs. storing it as UTF-8 The extra space used for interning is therefore just a single extra reference (as a reference to the string is contained in both the Class object and the String class internal pool). Yes that is a little space wasted, but not a bunch. Right, the wasted space is not much.. at first I was forgetting that intern'd strings are stored with weak keys and will get flushed out after they're no longer referenced (just like normal Strings)... replace big waste of memory with waste of memory :-) -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String class: hack for ORP 1.0.9
Guess I'm showing my bias ;-) It is very easy to get the right thing to happen in Jikes RVM... In general, you are right about native methods being a barrier to JIT optimization (btw there was an interesting paper in VEE'05 last month by Stepanian et al on a system that can inline native methods and their JNI callbacks into JITed code). Arraycopy is just a very special case...it shows up as a bottleneck on enough benchmarks that many optimizing JITs will treat it as an intrinsic function (ie, there is a native method implementation in the VM for use by interpreted code, but the JITed code won't actually call it). In some slightly funky way of looking at the world, native methods like arraycopy are a special case where Java-in-Java and C-based VMs end up in pretty much the same place. It's a native method that the JIT really needs to grok to get good performance. In Java-in-Java that happens without much extra effort. In other VMs, you end up building up support for a set of performance critical intrinsics so that the JIT can completely understand their semantics and then implement them in a more optimal fashion than simply calling the backing native method. I should have made it more clear that I was talking about arraycopy in particular, not native methods in general. --dave Archie Cobbs [EMAIL PROTECTED] wrote on 07/12/2005 10:24:10 AM: 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. Not all VM's are high performance I guess :-) [I'm sure you know all this already but here goes..] E.g., on many VM's VMSystem.arraycopy() is a native method, and they can't optimize into that method. So all the normal type checking, array bounds checking, and array compatibility checking will be done by that native code in all cases, even though in this case we know it's not necessary. With array clone(), also typically a native method, none of that checking is ever needed. This is a good example of the advandages of a JVM written in Java (a coincidence? :-) There is no optimization barrier into native code like System.arraycopy(). -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String class: hack for ORP 1.0.9
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. Not all VM's are high performance I guess :-) [I'm sure you know all this already but here goes..] E.g., on many VM's VMSystem.arraycopy() is a native method, and they can't optimize into that method. So all the normal type checking, array bounds checking, and array compatibility checking will be done by that native code in all cases, even though in this case we know it's not necessary. With array clone(), also typically a native method, none of that checking is ever needed. This is a good example of the advandages of a JVM written in Java (a coincidence? :-) There is no optimization barrier into native code like System.arraycopy(). -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: String.equals optimisation
Hi, On 7/12/05, Archie Cobbs [EMAIL PROTECTED] wrote: Simon Kitching wrote: * Class.getName returns strings that have been interned. I don't think this is explicitly required by the java specs but is certainly true for Sun's JVM and seems likely to be done by any sensible JVM. You definitely make some good arguments, but this one is not neccesarily true. In fact, I'd argue a JVM that interns every class' name (even if only on demand) is potentially wasting a bunch of heap space. I'm assuming that the Class object would contain a reference to the interned string, so there is only one copy of the string, ie somewhere Not a valid assumtion.. in JC no String is associated with Class objects. VMClass.getName() is native and the returned String is created on demand, based on the UTF-8 name stored internally in memory. It might also be worthwhile to mention that the internal class name uses slash as a separator, instead of the dot returned by getName(), e.g. java/lang/String, rather than java.lang.String. Rob. ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Problem with JDNI (under IKVM)
Hi, my task is to use the Joram JMS (Java Messaging Service, provider JORAM) inmy .Net(C#) application, at first I used "jbimp" from .Net, but jbimp couldnever find the classpaths which I set, today I found the tool IKVM which uses GNU Classpath, I feel the IKVM is much better, but I still met some problems. I have a small test program "TestSend.java" which sends the messages to JMS Server, and it runs well : --- javac TestSend.java java TestSend --- the messages are sended. Then I compressed the TestSend to TestSend.jar and used "ikvmc" to convert it to TestSend.dll, the converse was successful, but there were serveral warnings about some classes such like javax.jms.Queue (all from javax.jms.*) missing ( which I already set it in system envirement variables, I tried to copy the jar files to the same ordner of TestSend.java/class too, but there were still the warnings). When I added the dll file as reference in my C# application, the program"died" at an unknow position, and I got no exceptions , it just stayed and did't go on. LaterI tried to run the java application with JVM "ikvm" to make surewhether the IKVM worked, Because I think if I could run it with IKVM in a command, then I could run itin my .Net application with the help of IKVM too, couldn't I? I did the following in a command: 1. compile TestSend.java again 2. run "java TestSend", and it worked. 3. run "ikvm TestSend", and it worked until about 30% and stoped withoutany response. Here it is the source code of the method "sending" in the java application which works through JNDI.: -- Hashtable jndiProps = new Hashtable(); public void sending()throws Exception { System.out.println("11"); jndiProps.put("java.naming.factory.initial", "fr.dyade.aaa.jndi2.client.NamingContextFactory"); jndiProps.put("java.naming.factory.host", "localhost"); jndiProps.put("java.naming.factory.port", "16400");System.out.println("22"); Context ictx = null;System.out.println("33"); try { ictx = new InitialContext(jndiProps); System.out.println("init"); } catch (NamingException e) { e.printStackTrace(); System.out.println(e.toString()); } System.out.println("44");// output was showed in the command, then ithanged Queue queue = (Queue) ictx.lookup("queue"); System.out.println(queue.toString()); // I didn't get this output System.out.println("442"); QueueConnectionFactory qcf = (QueueConnectionFactory) ictx.lookup("qcf");System.out.println("55"); ictx.close();System.out.println("66"); QueueConnection qc = qcf.createQueueConnection(); System.out.println("77"); QueueSession qs = qc.createQueueSession(true, 0); QueueSender qsend = qs.createSender(queue); TextMessage msg = qs.createTextMessage(); int i; for (i = 0; i 10; i++) { msg.setText("Test number " + i); qsend.send(msg); } System.out.println("88"); qs.commit(); System.out.println(i + " messages sent."); qc.close(); The program hangs by "ictx.lookup", is it a bug? Did anyone have the same problem? I really need some help to solve it. Thanks a lot! Le ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: [cp-patches] Patch: formatting of copyrights
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, the patch is missing. Not that I want to peer review it, but IMHO kaffe gcj need it. cu Robert Lillian Angel wrote: 2005-07-12 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTree.java: Formatting copyright * javax/swing/tree/DefaultTreeCellRenderer.java: Formatting copyright * javax/swing/tree/DefaultTreeSelectionModel.java: Formatting copyright ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFC1EaxG9cfwmwwEtoRAndZAKCQROl529pLltFz3jWO5E/aezgGMwCfcNLk tASlnj0DNxrisBqrKF9jax0= =JkvR -END PGP SIGNATURE- ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[commit-cp] classpath ./ChangeLog javax/swing/text/html/par...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Audrius Mekauskas [EMAIL PROTECTED] 05/07/12 07:15:41 Modified files: . : ChangeLog javax/swing/text/html/parser: ParserDelegator.java Log message: 2005-07-12 Audrius Meskauskas [EMAIL PROTECTED] * javax/swing/text/html/parser/ParserDelegator.java (gnuParser.getDTD): Added comment about 'super'. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4068tr2=1.4069r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/html/parser/ParserDelegator.java.diff?tr1=1.6tr2=1.7r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog java/lang/String.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 05/07/12 08:53:44 Modified files: . : ChangeLog java/lang : String.java Log message: Reported by Simon Kitching [EMAIL PROTECTED] * java/lang/String.java (toCharArray): Return value.clone() when count == value.length. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4069tr2=1.4070r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/lang/String.java.diff?tr1=1.67tr2=1.68r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog java/awt/MediaTracker.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 05/07/12 09:16:05 Modified files: . : ChangeLog java/awt : MediaTracker.java Log message: * java/awt/MediaTracker.java (checkAll): Set and check status of MediaEntry with checkImage() if prepareImage() returns false. (statusAll): Likewise. (checkID): Likewise. (statusID): Likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4071tr2=1.4072r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/MediaTracker.java.diff?tr1=1.17tr2=1.18r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog javax/swing/JApplet.java ...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/07/12 13:48:35 Modified files: . : ChangeLog javax/swing: JApplet.java JDialog.java JFrame.java JWindow.java Log message: 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JApplet.java, * javax/swing/JDialog.java, * javax/swing/JFrame.java, * javax/swing/JWindow.java: (addImpl): Add to the frame itself if we are in the init stage, otherwise add to the contentPane. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4072tr2=1.4073r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JApplet.java.diff?tr1=1.17tr2=1.18r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JDialog.java.diff?tr1=1.15tr2=1.16r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JFrame.java.diff?tr1=1.25tr2=1.26r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JWindow.java.diff?tr1=1.19tr2=1.20r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog examples/gnu/classpath/ex...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/07/12 15:23:11 Modified files: . : ChangeLog examples/gnu/classpath/examples/swing: Demo.java javax/swing/plaf/basic: BasicLookAndFeel.java BasicTreeUI.java javax/swing/tree: DefaultTreeCellRenderer.java Log message: 2005-07-11 Lillian Angel [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkTreeWorld): Implemented (mkTabbedPane): added in tab for TreeWorld * javax/swing/plaf/basic/BasicLookAndFeel.java Changed default color of text non selection background. * javax/swing/plaf/basic/BasicTreeUI.java Removed irrelevant comment * javax/swing/tree/DefaultTreeCellRenderer.java (getTreeCellRendererComponent): changed to use background's non selection default color instead CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4074tr2=1.4075r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java.diff?tr1=1.13tr2=1.14r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java.diff?tr1=1.29tr2=1.30r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.25tr2=1.26r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/tree/DefaultTreeCellRenderer.java.diff?tr1=1.9tr2=1.10r1=textr2=text ___ 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...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/07/12 16:57:03 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicInternalFrameTitlePane.java Log message: 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java Removed ad-hoc icons. Replaced them by BasicIconFactory.createEmptyFrameIcon just like in the JDK. (PropertyChangeHandler.propertyChange): Handle change events for closable, iconifiable and maximizable here. (createButtons): Recognize if the JInternalFrame is closable, iconifiable or maximizable. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4078tr2=1.4079r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.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 gnu/classpath/jdwp/proces...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/12 18:22:02 Modified files: . : ChangeLog Added files: gnu/classpath/jdwp/processor: ObjectReferenceCommandSet.java Log message: * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java: New file. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4079tr2=1.4080r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java?rev=1.1 ___ 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...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/07/12 18:58:01 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java BasicLookAndFeel.java javax/swing/plaf/metal: MetalLookAndFeel.java lib: Makefile.am Log message: 2005-07-12 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicLookAndFeel.java: Took out icon defaults. * javax/swing/plaf/basic/BasicTreeUI.java (installUI): set root to visible (getCellBounds): took out addition to width since there may not be an icon. * javax/swing/plaf/metal/MetalLookAndFeel.java: Added in icon defaults * lib/Makefile.am: Fixed so icons are installed for the JTree For icons to install properly: make sure you rebuild, reconfigure and delete the lib/resources file CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4080tr2=1.4081r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.26tr2=1.27r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java.diff?tr1=1.31tr2=1.32r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java.diff?tr1=1.25tr2=1.26r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/lib/Makefile.am.diff?tr1=1.93tr2=1.94r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog javax/swing/JTree.java ja...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/07/12 19:26:41 Modified files: . : ChangeLog javax/swing: JTree.java javax/swing/tree: DefaultTreeCellRenderer.java DefaultTreeSelectionModel.java Log message: 2005-07-12 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTree.java: Formatting copyright * javax/swing/tree/DefaultTreeCellRenderer.java: Formatting copyright * javax/swing/tree/DefaultTreeSelectionModel.java: Formatting copyright CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4085tr2=1.4086r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JTree.java.diff?tr1=1.29tr2=1.30r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/tree/DefaultTreeCellRenderer.java.diff?tr1=1.10tr2=1.11r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/tree/DefaultTreeSelectionModel.java.diff?tr1=1.17tr2=1.18r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog javax/swing/plaf/metal/Me...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/07/12 19:24:49 Modified files: . : ChangeLog javax/swing/plaf/metal: MetalTreeUI.java Log message: 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalTreeUI.java (createUI): Return a different instance of MetalTreeUI for each JTree. The TreeUI is stateful, so a shared instance would not work. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4084tr2=1.4085r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalTreeUI.java.diff?tr1=1.2tr2=1.3r1=textr2=text ___ 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...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/07/12 19:18:51 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-12 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java I accidentally introduced revalidate calls for repaint calls. Reverted. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4083tr2=1.4084r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.28tr2=1.29r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog gnu/classpath/jdwp/proces...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/12 19:29:46 Modified files: . : ChangeLog gnu/classpath/jdwp/processor: PacketProcessor.java Log message: * gnu/classpath/jdwp/processor/PacketProcessor.java (run): Send shutdown to jdwp instead of connection. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4086tr2=1.4087r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/classpath/jdwp/processor/PacketProcessor.java.diff?tr1=1.3tr2=1.4r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog javax/swing/DefaultButton...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/07/12 20:19:08 Modified files: . : ChangeLog javax/swing: DefaultButtonModel.java Log message: 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/DefaultButtonModel.java: (changeState): If the button is a JToggleButton fire action events when it changes between (selected/unselected) not when it changes from pressed to unpressed. Fire action events after firing ItemStateChanged events. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4087tr2=1.4088r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/DefaultButtonModel.java.diff?tr1=1.20tr2=1.21r1=textr2=text ___ 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...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/07/12 20:59:57 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicMenuItemUI.java Log message: 2005-07-12 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicMenuItemUI.java: (paintMenuItem): Replaced incorrect hilighting criteria. (paintText): Likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4090tr2=1.4091r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java.diff?tr1=1.13tr2=1.14r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog examples/gnu/classpath/ex...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/07/12 20:57:23 Modified files: . : ChangeLog examples/gnu/classpath/examples/swing: Demo.java Log message: 2005-07-12 Lillian Angel [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkTree): no need to make root visible, it is by default (mkTreeWorld): no need to make root visible, it is by default CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4089tr2=1.4090r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java.diff?tr1=1.14tr2=1.15r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog gnu/classpath/jdwp/proces...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/12 23:40:31 Modified files: . : ChangeLog Added files: gnu/classpath/jdwp/processor: FieldCommandSet.java InterfaceTypeCommandSet.java Log message: * gnu/classpath/jdwp/processor/FieldCommandSet.java: Implemented the Field CommandSet. * gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java: Implemented the InterfaceType CommandSet. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4091tr2=1.4092r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/classpath/jdwp/processor/FieldCommandSet.java?rev=1.1 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java?rev=1.1 ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ./ChangeLog javax/swing/JButton.java ...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Robert Schuster [EMAIL PROTECTED] 05/07/13 00:34:54 Modified files: . : ChangeLog javax/swing: JButton.java JCheckBox.java JRadioButton.java JToggleButton.java Log message: This fixes the part of Bug #13695 (https://savannah.gnu.org/bugs/?func=detailitemitem_id=13695) which complains about the paramString() method. Although the complained about a wrong implementation (read !spec conform) is invalid, I think it is useful to provide properdebugging information here. 2005-07-13 Robert Schuster [EMAIL PROTECTED] * javax/swing/JToggleButton.java: (paramString): Returns value of same method in superclass now. * javax/swing/JRadioButton.java: (paramString): Dito. * javax/swing/JButton.java: (paramString): Returns value of same method in superclass now, more verbose information added. * javax/swing/JCheckBox.java: (paramString): Dito. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4092tr2=1.4093r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JButton.java.diff?tr1=1.15tr2=1.16r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JCheckBox.java.diff?tr1=1.12tr2=1.13r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JRadioButton.java.diff?tr1=1.15tr2=1.16r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JToggleButton.java.diff?tr1=1.19tr2=1.20r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath