[cp-patches] FYI: Fixlet for BasicTreeUI
I noticed some jikes warnings in BasicTreeUI. The static fields in javax.swing.tree.TreeSelectionModel were accessed via an instance of this class. I changed this so it is accessed via the class itself. 2005-07-07 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java (MouseInputHandler.mouseClicked): Access static TreeSelectionModel fields via the class and not via an instance. /Roman Index: javax/swing/plaf/basic/BasicTreeUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v retrieving revision 1.19 diff -u -r1.19 BasicTreeUI.java --- javax/swing/plaf/basic/BasicTreeUI.java 7 Jul 2005 09:00:11 - 1.19 +++ javax/swing/plaf/basic/BasicTreeUI.java 7 Jul 2005 09:04:12 - @@ -1800,14 +1800,14 @@ if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() - .getSelectionMode() == treeSelectionModel + .getSelectionMode() == TreeSelectionModel .SINGLE_TREE_SELECTION) { BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() - .getSelectionMode() == treeSelectionModel + .getSelectionMode() == TreeSelectionModel .CONTIGUOUS_TREE_SELECTION) { // TODO @@ -1815,7 +1815,7 @@ else { BasicTreeUI.this.tree.getSelectionModel().setSelectionMode -(treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); +(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Reworked Swing FocusManager
I have finally gotten to fix the javax.swing.FocusManager. This class is officially obsoleted, and replaced by the new java.awt.KeyboardFocusManager stuff. We should support it nevertheless. (at least I have an app here that uses the old API). In order to achieve this we actually have to use the Swing FocusManager in AWT instead of the DefaultKeyboardFocusManager (javax.swing.FocusManager is a subclass of the DefaultKeyboardFocusManager). In order to not add dependencies into Swing in AWT, I created a subclass of javax.swing.FocusManager in gnu.java.awt (no, we cannot use FocusManager directly because it is abstract - thanks to the great design of the JDK), and let the KeyboardManager create its instance of the FocusManager based on the value of the new system property gnu.java.awt.FocusManager. So at least I did not have to hardcode the Swing dependency. And in case a VM vendor does not need/want Swing, this is easily changed to java.awt.DefaultFocusManager. 2005-07-07 Roman Kennke [EMAIL PROTECTED] * gnu/java/awt/FocusManager.java: New class. Provides a concrete implementation of javax.swing.FocusManager so that we can support the old-style FocusManager in Swing and AWT. * gnu/classpath/SystemProperties.java: Add new system property gnu.java.awt.FocusManager that sets the class that should be used as the default FocusManager in AWT and Swing. * java/awt/KeyboardFocusManager.java (setCurrentKeyboardFocusManager): Use createFocusManager instead of creating the instance directly. (createFocusManager): New method. Instantiate a KeyboardFocusManager that is set by the system property gnu.java.awt.FocusManager. * javax/swing.FocusManager.java (constructor): Call super() here. (getCurrentManager): Return the current AWT KeyboardFocusManager here. (setCurrentManager): Set the current AWT KeyboardFocusManager here. (processKeyEvent): Removed method. This is no longer in the API. (focusNextComponent): Removed method. This is no longer in the API. (focusPreviousComponent): Removed method. This is no longer in the API. /Roman ? lib/META-INF Index: gnu/classpath/SystemProperties.java === RCS file: /cvsroot/classpath/classpath/gnu/classpath/SystemProperties.java,v retrieving revision 1.8 diff -u -r1.8 SystemProperties.java --- gnu/classpath/SystemProperties.java 2 Jul 2005 20:32:10 - 1.8 +++ gnu/classpath/SystemProperties.java 7 Jul 2005 12:27:47 - @@ -106,6 +106,12 @@ if (defaultProperties.get(file.encoding) == null) defaultProperties.put(file.encoding, 8859_1); +// Default to the Swing FocusManager so that the old-style Swing API +// for FocusManager can be supported without hardcoding it in AWT. +if (defaultProperties.get(gnu.java.awt.FocusManager) == null) + defaultProperties.put(gnu.java.awt.FocusManager, +gnu.java.awt.FocusManager); + // XXX FIXME - Temp hack for old systems that set the wrong property if (defaultProperties.get(java.io.tmpdir) == null) defaultProperties.put(java.io.tmpdir, Index: gnu/java/awt/FocusManager.java === RCS file: gnu/java/awt/FocusManager.java diff -N gnu/java/awt/FocusManager.java --- /dev/null 1 Jan 1970 00:00:00 - +++ gnu/java/awt/FocusManager.java 7 Jul 2005 12:27:47 - @@ -0,0 +1,52 @@ +/* FocusManager.java -- Provide Swing FocusManager API compatibility + Copyright (C) 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
Re: [cp-patches] Re: Absolute URL parsing bug
I think this is the right fix. Tested with Mauve, no regressions. Fixes the testcase context = jar:file://www.example.com/test.jar!/foo/bar.txt, spec = jar:file://www.example.com/test.jar!/foo/test.txt which previously caused a NullPointerException. Andrew. 2005-07-07 Andrew Haley [EMAIL PROTECTED] * java/net/URL.java (URL): If the file part of a spec is absolute, ignore the file part of its context. Index: URL.java === RCS file: /cvs/gcc/gcc/libjava/java/net/URL.java,v retrieving revision 1.52 diff -p -2 -u -r1.52 URL.java --- URL.java30 Jun 2005 03:20:01 - 1.52 +++ URL.java7 Jul 2005 16:21:14 - @@ -409,8 +409,11 @@ public final class URL implements Serial host = context.host; port = context.port; - file = context.file; userInfo = context.userInfo; - if (file == null || file.length() == 0) - file = /; + if (spec.indexOf(:/, 1) 0) + { + file = context.file; + if (file == null || file.length() == 0) + file = /; + } authority = context.authority; } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Please Review: Patch for BasicPopupMenuUI.java
I submitted bug report #13658 yesterday. https://savannah.gnu.org/bugs/?func=detailitemitem_id=13658 This patch fixes the problem but needs review. Rather than calling popopWillBeMadeInvisible I could also just manually disable the mouseListener, but I didn't want to copy the code. Patch is attached. -Tony Index: javax/swing/plaf/basic/BasicPopupMenuUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java,v retrieving revision 1.11 diff -u -r1.11 BasicPopupMenuUI.java --- javax/swing/plaf/basic/BasicPopupMenuUI.java 2 Jul 2005 20:32:50 - 1.11 +++ javax/swing/plaf/basic/BasicPopupMenuUI.java 7 Jul 2005 18:38:43 - @@ -466,6 +466,9 @@ */ public void mouseExited(MouseEvent e) { + //we call popupMenuWillBecomeInvisible to remove the mouse listeners + //otherwise we can run into trouble when entering other components + popupMenuListener.popupMenuWillBecomeInvisible(new PopupMenuEvent(e)); handleEvent(e); } @@ -557,7 +560,6 @@ lastComponentEntered = null; tempComponent.dispatchEvent(exited); } - lastComponentEntered = null; } @@ -622,6 +624,8 @@ { if (e instanceof MouseEvent) { + if (((MouseEvent)e).isConsumed()) +return; MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent(me); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [RFA] update to eclipse formatter settings
I've found a couple issues with the style formatter included in .settings/org.eclipse.jdt.core.prefs I'm still investigating how to handle a few anomalies (it looks like there might be some bugs in some of the eclipse formatting code) but I've been able to fix one setting where a throws clause wouldn't automatically be put on a new line and would be indented by two instead of four when it was The guidelines I'm going by are here, Implements and extends on separate lines, throws too. Indent extends, implements, throws. Apply deep indentation for method arguments. http://www.gnu.org/software/classpath/docs/hacking.html#SEC6 As well eclipse automatically added a setting for enum_constants which shouldn't affect anything. Aaron ChangeLog 2005-07-05 Aaron Luchko [EMAIL PROTECTED] * .settings/org.eclipse.jdt.core.prefs: Fixed indent of 'throws' clause for eclipse formatter Index: org.eclipse.jdt.core.prefs === RCS file: /cvsroot/classpath/classpath/.settings/org.eclipse.jdt.core.prefs,v retrieving revision 1.2 diff -u -r1.2 org.eclipse.jdt.core.prefs --- org.eclipse.jdt.core.prefs 1 May 2005 22:05:52 - 1.2 +++ org.eclipse.jdt.core.prefs 7 Jul 2005 20:03:21 - @@ -1,4 +1,4 @@ -#Mon Apr 25 22:37:20 MDT 2005 +#Thu Jul 07 16:02:40 EDT 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 @@ -60,6 +60,7 @@ org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 @@ -68,8 +69,8 @@ org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=36 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=36 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 @@ -290,3 +291,4 @@ org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [RFA] update to eclipse formatter settings
On Thu, 2005-07-07 at 16:13 -0400, Aaron Luchko wrote: I've found a couple issues with the style formatter included in .settings/org.eclipse.jdt.core.prefs I'm still investigating how to handle a few anomalies (it looks like there might be some bugs in some of the eclipse formatting code) but I've been able to fix one setting where a throws clause wouldn't automatically be put on a new line and would be indented by two instead of four when it was The guidelines I'm going by are here, Implements and extends on separate lines, throws too. Indent extends, implements, throws. Apply deep indentation for method arguments. http://www.gnu.org/software/classpath/docs/hacking.html#SEC6 As well eclipse automatically added a setting for enum_constants which shouldn't affect anything. Aaron ChangeLog 2005-07-05 Aaron Luchko [EMAIL PROTECTED] * .settings/org.eclipse.jdt.core.prefs: Fixed indent of 'throws' clause for eclipse formatter Oops, generated the patch at the wrong level and gave the wrong date on the ChangeLog entry :) It's also worthwhile to note that in general these changes should be propagated to scripts/eclipse-gnu.xml, the standalone settings for the formatter. Unfortunately the eclipse functionality to do so seems to be broken at the moment so I'll have to update eclipse-gnu.xml at a later date. 2005-07-07 Aaron Luchko [EMAIL PROTECTED] * .settings/org.eclipse.jdt.core.prefs: Fixed indent of 'throws' clause for eclipse formatter Index: .settings/org.eclipse.jdt.core.prefs === RCS file: /cvsroot/classpath/classpath/.settings/org.eclipse.jdt.core.prefs,v retrieving revision 1.2 diff -u -p -r1.2 org.eclipse.jdt.core.prefs --- .settings/org.eclipse.jdt.core.prefs 1 May 2005 22:05:52 - 1.2 +++ .settings/org.eclipse.jdt.core.prefs 7 Jul 2005 20:55:41 - @@ -1,4 +1,4 @@ -#Mon Apr 25 22:37:20 MDT 2005 +#Thu Jul 07 16:02:40 EDT 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 @@ -60,6 +60,7 @@ org.eclipse.jdt.core.formatter.alignment org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 @@ -68,8 +69,8 @@ org.eclipse.jdt.core.formatter.alignment org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=36 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=36 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 @@ -290,3 +291,4 @@ org.eclipse.jdt.core.formatter.number_of org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Patch committed - JTable deselection
Holding control while clicking on an already selected cell deselects it. 2005-07-07 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTableUI.java: (MouseInputHandler.mousePressed): Added check for control being pressed and mouse clicked on already selected cell. In this case, deselect the cell. Patch attached. Index: javax/swing/plaf/basic/BasicTableUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v retrieving revision 1.8 diff -u -r1.8 BasicTableUI.java --- javax/swing/plaf/basic/BasicTableUI.java 2 Jul 2005 20:32:50 - 1.8 +++ javax/swing/plaf/basic/BasicTableUI.java 7 Jul 2005 20:51:53 - @@ -113,7 +113,8 @@ ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 hi_row != -1) { - if (controlPressed rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) + if (controlPressed rowModel.getSelectionMode() + != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); @@ -124,10 +125,12 @@ { int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); - ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); + ListSelectionModel colModel = table.getColumnModel(). +getSelectionModel(); if (lo_col != -1 hi_col != -1) { - if (controlPressed colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) + if (controlPressed colModel.getSelectionMode() != + ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); @@ -156,7 +159,19 @@ { begin = new Point(e.getX(), e.getY()); curr = new Point(e.getX(), e.getY()); - updateSelection(e.isControlDown()); + //if control is pressed and the cell is already selected, deselect it + if (e.isControlDown() table. + isCellSelected(table.rowAtPoint(begin),table.columnAtPoint(begin))) +{ + table.getSelectionModel(). +removeSelectionInterval(table.rowAtPoint(begin), +table.rowAtPoint(begin)); + table.getColumnModel().getSelectionModel(). +removeSelectionInterval(table.columnAtPoint(begin), +table.columnAtPoint(begin)); +} + else +updateSelection(e.isControlDown()); } public void mouseReleased(MouseEvent e) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: DefaultListSelectionModel multiple selection updated
Updated multiple selection in JLists. Now after a remove operation, the next add operation works in accordance with the reference implementations. Patch attached. 2005-07-07 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/DefaultListSelectionModel.java: (addSelectionInterval): Added check for leadSelectionIndex being unselected (ie - after a remove operation). -Tony Index: javax/swing/DefaultListSelectionModel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/DefaultListSelectionModel.java,v retrieving revision 1.18 diff -u -r1.18 DefaultListSelectionModel.java --- javax/swing/DefaultListSelectionModel.java 2 Jul 2005 20:32:47 - 1.18 +++ javax/swing/DefaultListSelectionModel.java 7 Jul 2005 20:42:52 - @@ -436,10 +436,12 @@ // The next if statements breaks down to if this selection is adjacent // to the previous selection and going in the same direction -if (((index0 - 1 == leadSelectionIndex (index1 = index0) - (leadSelectionIndex = anchorSelectionIndex)) - || (index0 + 1 == leadSelectionIndex (index1 = index0) - (leadSelectionIndex = anchorSelectionIndex))) +if ((isSelectedIndex(leadSelectionIndex)) + ((index0 - 1 == leadSelectionIndex + (index1 = index0) + (leadSelectionIndex = anchorSelectionIndex)) +|| (index0 + 1 == leadSelectionIndex (index1 = index0) + (leadSelectionIndex = anchorSelectionIndex))) (anchorSelectionIndex != -1 || leadSelectionIndex != -1)) { // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [RFA] broken links in hacking.texinfo
I found three broken links in the classpath hacking page http://www.gnu.org/software/classpath/docs/hacking.html All three were pointing to the page for the GNU Coding Standards The first two pointed to http://www.fsf.org/prep/standards_toc.html and the third http://www.gnu.org/prep/standards_23.html I couldn't find the GNU Coding Standards anywhere on the FSF page and they indicated it may be only on gnu.org now We have recently re-organized our web site. Content available at www.gnu.org was previously also available at www.fsf.org. I found the standards now at http://www.gnu.org/prep/standards/ so changed all the links to point here Aaron ChangeLog 2005-07-07 Aaron Luchko [EMAIL PROTECTED] * doc/hacking.texinfo: Fixed broken links to GNU Coding Standards to point to http://www.gnu.org/prep/standards/ Index: doc/hacking.texinfo === RCS file: /cvsroot/classpath/classpath/doc/hacking.texinfo,v retrieving revision 1.36 diff -u -p -r1.36 hacking.texinfo --- doc/hacking.texinfo 4 Jul 2005 14:31:01 - 1.36 +++ doc/hacking.texinfo 7 Jul 2005 21:04:16 - @@ -458,12 +458,12 @@ java.lang.StrictMath. @chapter Programming Standards For C source code, follow the [EMAIL PROTECTED]://www.fsf.org/prep/standards_toc.html,GNU Coding Standards}. [EMAIL PROTECTED]://www.gnu.org/prep/standards/,GNU Coding Standards}. The standards also specify various things like the install directory structure. These should be followed if possible. For Java source code, please follow the [EMAIL PROTECTED]://www.fsf.org/prep/standards_toc.html,GNU Coding [EMAIL PROTECTED]://www.gnu.org/prep/standards/,GNU Coding Standards}, as much as possible. There are a number of exceptions to the GNU Coding Standards that we make for GNU Classpath as documented in this guide. We will hopefully be providing developers with a code @@ -484,7 +484,7 @@ guidelines more tailored to GNU Classpat Here is a list of some specific rules used when hacking on GNU Classpath java source code. We try to follow the standard [EMAIL PROTECTED]://www.gnu.org/prep/standards_23.html,GNU Coding Standards} [EMAIL PROTECTED]://www.gnu.org/prep/standards/,GNU Coding Standards} for that. There are lots of tools that can automatically generate it (although most tools assume C source, not java source code) and it seems as good a standard as any. There are a couple of exceptions and ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Fix for #13636
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, this patch will prevent opening a JMenu's popup when it is disabled. However the behavior of the JDK for JMenu is not fully matched. I file bug reports for this. 2005-07-07 Robert Schuster [EMAIL PROTECTED] * javax/swing/JMenu.java (setSelected): Added isEnabled() to expression. cu Robert -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCzcgNG9cfwmwwEtoRAvWxAJ46j1iWrQ00UDVPd2SmSXl6AZsZaQCfQJi6 eRhpafuaTn38dhOq5+pF74A= =7rf0 -END PGP SIGNATURE- Index: javax/swing/JMenu.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v retrieving revision 1.17 diff -u -r1.17 JMenu.java --- javax/swing/JMenu.java 2 Jul 2005 20:32:47 - 1.17 +++ javax/swing/JMenu.java 8 Jul 2005 00:19:45 - @@ -339,17 +339,23 @@ */ public void setSelected(boolean selected) { -// if this menu selection is true, then activate this menu and -// display popup associated with this menu -if (selected) +// If menu is selected and enabled, activates the menu and +// displays associated popup. +if (selected isEnabled()) { super.setArmed(true); super.setSelected(true); + // FIXME: The reference implementation behaves different here. When + // calling setSelected(true) it will *not* open the popup but appear + // selected. This is even true when the menu is disabled. Our + // implementation will always open the popup (when enabled) and + // will not appear selected when disabled. + // 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. - if (this.isShowing()) + if (isShowing()) { fireMenuSelected(); @@ -893,4 +899,5 @@ // FIXME: Need to implement } } + } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: ResourceBundle optimisation
Hi Bryce, Bryce McKinlay wrote: Nicolas Geoffray wrote: My mistake, i gave you a patch against classpath-0.13. Here's a patch against the latest cvs. Nicolas Geoffray wrote: Hi everyone, I've been doing benchmarks beween my vm and another one launching Tomcat and noticed that the startup spent a long time trying to find Resouces with getBundle. The thing is, ResourceBundle uses a cache for the resources it founds, but i think it's not perfectly used. When getBundle is entered, it first tries to find the resource in the cache. If it's not found, it calls tryBundle. Then tryBundle tries to load ressources with different locales, but never searches in the cache, allthough it could. I made a patch for it and gained 2 minutes during startup of tomcat (using an ibook 500Mhz). It's attached. Hi Nicolas, I don't think this patch is correct. If an application requests the same bundle baseName, but with a different locale, the locale argument will be ignored and the first bundle placed in the cache will be returned. No, because in tryBundle, a new string is created with basename + locale. It is that new string that is put in the cache, not just the basename. For example, say you're looking for a resource MyResource with locale en_US. If it is found, then the result is cached with a key created from MyResource_en_US, not MyResource. Never the less, I'd be interested to know where the 2 minute speedup came from, and if there is anything we can do to improve ResourceBundle without breaking its semantics. Does Tomcat request the same bundle baseName for many different locales? It is when it loads struts. It is looking for a resource ApplicationProperties with all the locales classpath has. With the current implementation of ResourceBundle, looking for all resources takes a real long time. Here's an example : 1) You're in getBundle looking for resource ApplicationProperties with locale AA_aa 2) It's not in the cache, so you go into tryBundle 3) In tryBundle, you don't find ApplicationProperties_AA_aa 4) In tryBundle you find ApplicationProperties_AA so you return it 5) In getBundle you cache ApplicationProperties_AA_aa with the result (ApplicationProperties_AA is not cached) 6) In the next getBundle, you're looking for ApplicationProperties with locale AA... The patch improves the researches by caching ApplicationProperties_AA. Even better, in tryBundle when a result is found for a resource, we could cache all intermediary resources we were looking for. For example if we were looking for ApplicationProperties_AA_aa, and finally found a result for ApplicationProperties (with no locale), we could cache ApplicationProperties, ApplicationProperties_AA_aa, and ApplicationProperties_AA with that same result. I haven't done this greater optimisation, as i'm not sure of the correctness of the patch regarding the most specialized bundle in tryBundle. Regards Bryce Nicolas ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: ResourceBundle optimisation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 7 July 2005 10:33, Nicolas Geoffray wrote: Even better, in tryBundle when a result is found for a resource, we could cache all intermediary resources we were looking for. For example if we were looking for ApplicationProperties_AA_aa, and finally found a result for ApplicationProperties (with no locale), we could cache ApplicationProperties, ApplicationProperties_AA_aa, and ApplicationProperties_AA with that same result. Won't that break things when new (more specialised) resource bundles are added to the classpath at a later time? Then again, we probably also don't store URL of already loaded RBs to check if the file was updated so we can reload. - -- Thomas Zander -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCzP5XCojCW6H2z/QRAgFOAJ49gTky0QjwOdtPgY61uQyL65OOPgCePqiy vHETC5fADDn16JQyPIs3SoA= =iJJx -END PGP SIGNATURE- ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
JNI assertion failure
With Classpath 0.16, trying to run a very simple Swing demo under JCVM, I get a JNI assertion failure in a call to GetIntField(), because the object type and the fieldID are not compatible: gnu/java/awt/peer/gtk/[EMAIL PROTECTED] not instance of gnu/java/awt/peer/gtk/GtkGenericPeer Here is the relevant stack trace snippet: #4 0x282d6c1b in abort () from /lib/libc.so.5 #5 0x280ae91d in GetIntField (jenv=0x107ed6a0, obj=0x29795698, field=0x107527c8) at jni_native.c:82 #6 0x29f99d72 in set_state (env=0x107ed6a0, obj=0x29795698, table=0x10471440, state=0x109ea4c0) at native_state.c:217 #7 0x29f862d7 in Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2 (env=0x107ed6a0, obj=0x29795698, peer=0x2979569c) at gnu_java_awt_peer_gtk_GdkGraphics.c:154 #8 0x280d4289 in _jc_dynamic_invoke (func=0x29f86214, jcni=0, nparams=3, ptypes=0x2979562c \n\n\n\t, nwords=3, words=0x29795620, retval=0x107ed628) at arch/i386/arch_functions.c:336 #9 0x280aa802 in _jc_invoke_jni_a (env=0x107ed600, method=0x107f9d60, func=0x29f86214, obj=0x85e0308, params=0x29795754) at invoke.c:692 Could an AWT person take a look at the above trace and error? Thanks, -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
about classpath with pocket pc
Hi, have anyone compiled and used classpath on a pocket pc with windows mobile 2003? I'm very interested on the execution of java applications on this environment, and GNU classpath seems a perfect way to achieve it, but I don't know if ther're something advanced to this goal. thanks in advance Luis ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: about classpath with pocket pc
Cresques wrote: Hi, have anyone compiled and used classpath on a pocket pc with windows mobile 2003? I'm very interested on the execution of java applications on this environment, and GNU classpath seems a perfect way to achieve it, but I don't know if ther're something advanced to this goal. There was a post about a jvm yesterday http://lists.gnu.org/archive/html/classpath/2005-07/msg00033.html Wolfgang ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[commit-cp] classpath ./ChangeLog gnu/java/net/protocol/htt...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 05/07/07 06:29:30 Modified files: . : ChangeLog gnu/java/net/protocol/http: HTTPConnection.java HTTPURLConnection.java Log message: 2005-07-06 Chris Burdess [EMAIL PROTECTED] * gnu/java/net/protocol/http/HTTPConnection.java, gnu/java/net/protocol/http/HTTPURLConnection.java: Fix bug with multiple threads and persistent connections. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4010tr2=1.4011r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/http/HTTPConnection.java.diff?tr1=1.8tr2=1.9r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/http/HTTPURLConnection.java.diff?tr1=1.12tr2=1.13r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath/javax/swing/plaf/basic BasicTreeUI.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/07/07 09:00:12 Modified files: javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-07 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java: Reformatted source file to better match our coding standards. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.18tr2=1.19r1=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/07 09:06:18 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-07 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java (MouseInputHandler.mouseClicked): Access static TreeSelectionModel fields via the class and not via an instance. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4011tr2=1.4012r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.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 javax/swing/JProgressBar....
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: David Gilbert [EMAIL PROTECTED] 05/07/07 11:37:45 Modified files: . : ChangeLog javax/swing: JProgressBar.java Log message: 2005-07-07 David Gilbert [EMAIL PROTECTED] * javax/swing/JProgressBar.java (JProgressBar(int, int, int)): fix order of parameters, (JProgressBar()): reorder arguments in call to other constructor, (JProgressBar(int): likewise, (JProgressBar(int, int): likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4012tr2=1.4013r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JProgressBar.java.diff?tr1=1.11tr2=1.12r1=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/07 13:16:55 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTextUI.java Log message: 2005-07-07 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (DocumentHandler.insertUpdate): Update caret position when document changes. (DocumentHandler.removeUpdate): Update caret position when document changes. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4014tr2=1.4015r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java.diff?tr1=1.25tr2=1.26r1=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: Lillian Angel [EMAIL PROTECTED] 05/07/07 13:53:57 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-07 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java Formatted code to get rid of TABs (getPathForRow): took out redundant code. (getNextVisibleNode): took out redundant code. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4015tr2=1.4016r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.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: Lillian Angel [EMAIL PROTECTED] 05/07/07 14:16:11 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-07 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java Formatted code so else's are on new lines CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4016tr2=1.4017r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.21tr2=1.22r1=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: Lillian Angel [EMAIL PROTECTED] 05/07/07 20:30:23 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTreeUI.java Log message: 2005-07-07 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTreeUI.java (getRowCount): Implemented (getPreferredSize): Implemented (getMinimumSize): Implemented (getMaximumSize): Implemented (getCellBounds): checked if parameter is null (paintRecursive): added in a variable to keep track of the length of vertical line to be drawn. Now paints tree nicely. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4017tr2=1.4018r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.22tr2=1.23r1=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/07 20:55:51 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTableUI.java Log message: 2005-07-07 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTableUI.java: (MouseInputHandler.mousePressed): Added check for control being pressed and mouse clicked on already selected cell. In this case, deselect the cell. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4021tr2=1.4022r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java.diff?tr1=1.8tr2=1.9r1=textr2=text ___ Commit-classpath mailing list Commit-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/commit-classpath
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/07 20:53:18 Modified files: . : ChangeLog Log message: oops, fixed date :) CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4020tr2=1.4021r1=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/util/S...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Aaron Luchko [EMAIL PROTECTED]05/07/07 23:05:32 Modified files: . : ChangeLog gnu/classpath/jdwp/util: Signature.java Log message: * gnu/classpath/jdwp/util/Signature.java (computeFieldSignature): New Method. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4023tr2=1.4024r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/classpath/jdwp/util/Signature.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/JMenu.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Robert Schuster [EMAIL PROTECTED] 05/07/08 00:23:22 Modified files: . : ChangeLog javax/swing: JMenu.java Log message: Fixes #13636. 2005-07-07 Robert Schuster [EMAIL PROTECTED] * javax/swing/JMenu.java (setSelected): Added isEnabled() to expression. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4024tr2=1.4025r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JMenu.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