From c.cerbo at gmail.com Mon Mar 1 03:52:00 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Mon, 1 Mar 2010 12:52:00 +0100 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <4B7EA7CA.8060701@sun.com> References: <4B7EA7CA.8060701@sun.com> Message-ID: <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> Hello Anthony, Hello Peter, what about my patch for the issue 6913179? Did you start the review? I report again the most relevant changes: 1. Dynamic link to libgthread-2.0.so.0 instead of libgthread-2.0.so 2. GTK multithread support (gdk_threads_enter() and gdk_threads_leave() as outlined by Damjan) 3. New Thread to don't block the EDT 4. Support for multiple file selection (bugs 6705345) Best regards, Costantino 2010/2/19 Anthony Petrov : > Hi Costantino, > > Here's the latest version of your fix: > > http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.3/ > > Thanks! > > >> Okay, but meanwhile we can open an issue for this feature in the Sun >> bug database, what do you think about? > > Just filed the following: > > 6927978 : Directory Selection standard dialog support > > (should become visible on the bugs.sun.com in a day or two). > > -- > best regards, > Anthony > From damjan.jov at gmail.com Tue Mar 2 00:14:30 2010 From: damjan.jov at gmail.com (Damjan Jovanovic) Date: Tue, 2 Mar 2010 10:14:30 +0200 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> Message-ID: <9e89675b1003020014i5d4fc30dhfa7c78725497f914@mail.gmail.com> Hi Costantino You still use C++ (//) comments, but other OpenJDK JNI code uses them too so I guess it's fine. But I cannot find any OpenJDK code that declares variables in the middle of a block - a C99 feature - while you do. So it may compile fine on Linux+GCC but what about other compilers and platforms? When last I heard, Microsoft's compilers (used for the Windows build) definitely didn't support C99, and what is the official policy for C99 code in OpenJDK anyway? I see this in some makefiles: corba/make/common/Defs-solaris.gmk:# -xc99=%none Do NOT allow for c99 extensions to be used. jdk/make/common/Defs-solaris.gmk:# Do not allow C99 language features like declarations in code etc. so I guess C99 is not allowed after all? Your error checking still seems lacking, for example: + jclass stringCls = (*env)->FindClass(env, "java/lang/String"); + GSList *iterator = NULL; + + jobjectArray array; + array = (*env)->NewObjectArray(env, fp_gtk_g_slist_length(list), stringCls, NULL); + int i = 0; + for (iterator = list; iterator; iterator = iterator->next) { + char* entry = (char*)iterator->data; + entry = strrchr(entry, '/') + 1; + str = (*env)->NewStringUTF(env, entry); + (*env)->SetObjectArrayElement(env, array, i, str); + i++; + } What if the FindClass or NewObjectArray fail for some reason? Do we need to worry about that - other JNI code I've seen is not particularly strict? Otherwise good work, thank you Damjan On Mon, Mar 1, 2010 at 1:52 PM, Costantino Cerbo wrote: > Hello Anthony, Hello Peter, > > what about my patch for the issue 6913179? > Did you start the review? > > I report again the most relevant changes: > ?1. Dynamic link to libgthread-2.0.so.0 instead of libgthread-2.0.so > ?2. GTK multithread support (gdk_threads_enter() and > gdk_threads_leave() as outlined by Damjan) > ?3. New Thread to don't block the EDT > ?4. Support for multiple file selection (bugs 6705345) > > Best regards, > Costantino > > 2010/2/19 Anthony Petrov : >> Hi Costantino, >> >> Here's the latest version of your fix: >> >> http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.3/ >> >> Thanks! >> >> >>> Okay, but meanwhile we can open an issue for this feature in the Sun >>> bug database, what do you think about? >> >> Just filed the following: >> >> 6927978 : Directory Selection standard dialog support >> >> (should become visible on the bugs.sun.com in a day or two). >> >> -- >> best regards, >> Anthony >> > From Anthony.Petrov at Sun.COM Tue Mar 2 05:37:48 2010 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Tue, 02 Mar 2010 16:37:48 +0300 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> Message-ID: <4B8D14AC.9090407@sun.com> Hi Costantino, src/solaris/classes/sun/awt/UNIXToolkit.java: the indentation is incorrect. src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java The copyright notice at the top should be dated 2010. That file hasn't existed in 1995 for sure. src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Generally the file uses incorrect indentation... > 26 return (*env)->CallBooleanMethod(env, obj, filenameFilterCallbackMethodID, > 27 filename); Perhaps that makes sense to explicitly cast the return value to gboolean to avoid any compilation warnings. Also, I second to Damjan regarding the placement of variable declarations. In C they have to be in the beginning of a function. The rest looks good. -- best regards, Anthony On 03/01/2010 02:52 PM, Costantino Cerbo wrote: > Hello Anthony, Hello Peter, > > what about my patch for the issue 6913179? > Did you start the review? > > I report again the most relevant changes: > 1. Dynamic link to libgthread-2.0.so.0 instead of libgthread-2.0.so > 2. GTK multithread support (gdk_threads_enter() and > gdk_threads_leave() as outlined by Damjan) > 3. New Thread to don't block the EDT > 4. Support for multiple file selection (bugs 6705345) > > Best regards, > Costantino > > 2010/2/19 Anthony Petrov : >> Hi Costantino, >> >> Here's the latest version of your fix: >> >> http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.3/ >> >> Thanks! >> >> >>> Okay, but meanwhile we can open an issue for this feature in the Sun >>> bug database, what do you think about? >> Just filed the following: >> >> 6927978 : Directory Selection standard dialog support >> >> (should become visible on the bugs.sun.com in a day or two). >> >> -- >> best regards, >> Anthony >> From Peter.Zhelezniakov at Sun.COM Tue Mar 2 06:58:16 2010 From: Peter.Zhelezniakov at Sun.COM (Peter Zhelezniakov) Date: Tue, 02 Mar 2010 17:58:16 +0300 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> Message-ID: <4B8D2788.3050403@Sun.com> Hi Costantino, Seems almost done! Changes to GTK code seem right thing to do indeed. I'd agree that we'd better stay away from any C++-isms such as // and declaring variables in the middle of a block. This code is built on a variety of platforms and we don't want to break older ones without a strong reason. Thanks! -- Peter | x33066 | location: SPB04 | timezone: GMT+03 From i30817 at gmail.com Sat Mar 6 07:48:02 2010 From: i30817 at gmail.com (Paulo Levi) Date: Sat, 6 Mar 2010 15:48:02 +0000 Subject: RFE: new function in Desktop class Message-ID: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> Hi. I'm using Desktop.open to open the default file explorer, by doing File.getParent() and opening that. However i'd like the file(s) that interest me to open selected in the file explorer, but as the open function is overloaded there doesn't seem to be a way to do that? I'm proposing to separate the file explorer part into a separate function call that can be called with a normal file, not only directories, so that the files can appear selected and visible, like any decent file explorer does. Can't think of a good name for the function since browse is already taken. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100306/0ca36948/attachment.html From c.cerbo at gmail.com Tue Mar 9 15:17:07 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Wed, 10 Mar 2010 00:17:07 +0100 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <4B8D2788.3050403@Sun.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> Message-ID: <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> Hi Peter, Anthony and Damjan, here is a new patch (the 4th one!) with these improvements: * The copyright in GtkFileDialogPeer is now correctly dated. * ANSI C conformity 1: // comments transformed to /* */ * ANSI C conformity 2: Variable declaration always at the beginning of a block * All compiler warnings removed * Error checking (in case of failure, JNU_ThrowInternalError(..) is used) * Multiple selection mode set only in an OPEN action (otherwise Gtk throws a warning when we are saving a file) As also Peter said, the job is almost done and I hope to see this patch soon in the OpenJDK! Best Regards, Costantino P.S.: About the indentation, I have no idea why it isn't right. I set it in my eclipse workspace according the Anthony's suggestions: Tab policy: Spaces only Indentation size: 4 Tab site: 4 Line width: 80 2010/3/2 Peter Zhelezniakov : > Hi Costantino, > > Seems almost done! Changes to GTK code seem right thing to do indeed. > > I'd agree that we'd better stay away from any C++-isms such as // and > declaring variables in the middle of a block. This code is built on a > variety of platforms and we don't want to break older ones without a strong > reason. > > Thanks! > -- > Peter ? ? ? ? ? ? ?| ?x33066 ?| ?location: SPB04 ?| ?timezone: GMT+03 > -------------- next part -------------- A non-text attachment was scrubbed... Name: b6913179.patch Type: application/octet-stream Size: 36601 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100310/0e005cc5/b6913179.patch From damjan.jov at gmail.com Wed Mar 10 05:05:45 2010 From: damjan.jov at gmail.com (Damjan Jovanovic) Date: Wed, 10 Mar 2010 15:05:45 +0200 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> Message-ID: <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> Hi Costantino +JNIEXPORT void * JNICALL +JNU_GetEnv(JavaVM *vm, jint version); + +JNIEXPORT void JNICALL +JNU_ThrowInternalError(JNIEnv *env, const char *msg); + +char * strrchr ( const char *, int ); You should probably include the real header files here, like string.h and jni_util.h, instead of declaring those functions yourself. +JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit +(JNIEnv * env, jobject jpeer) +{ + if (dialog != NULL) + { + fp_gtk_widget_hide (dialog); + fp_gtk_widget_destroy (dialog); + + fp_gtk_main_quit (); + dialog = NULL; + } +} Should we put the GDK lock statements around those 3 functions? But if we should, make sure they aren't taken recursively: when called from Java the GDK lock isn't taken and we must, but when called from the handle_response callback function, GTK already holds that lock and we must not. You've still got some C++ comments: $ grep '//' b6913179.patch + // no filter, accept all. + // We do not implement this method because we + // have delegated to FileDialog#setDirectory + // We do not implement this method because we + // have delegated to FileDialog#setFile + // We do not implement this method because we + // have delegated to FileDialog#setFilenameFilter + // The current GtkFileChooser is available from GTK+ 2.4 + // The current GtkFileChooser is available from GTK+ 2.4 + // Init the thread system to use GLib in a thread-safe mode + //According the GTK documentation, gdk_threads_init() should be + //called before gtk_init() or gtk_init_check() Also the patch doesn't even compile from me, fpulling the awt forest to the latest and trying again... But - lol - even the latest unpatched awt forest no longer compiles: # Running javac: /home/damjan/.local/opt/jdk6/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -client -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -Xbootclasspath/p:/openjdk7/awt/build/linux-i586/langtools/dist/bootstrap/lib/javac.jar -jar /openjdk7/awt/build/linux-i586/langtools/dist/bootstrap/lib/javac.jar -source 7 -target 7 -encoding ascii -Xbootclasspath:/openjdk7/awt/build/linux-i586/classes -sourcepath /openjdk7/awt/build/linux-i586/gensrc:../../../../src/solaris/classes:../../../../src/share/classes -d /openjdk7/awt/build/linux-i586/classes @/openjdk7/awt/build/linux-i586/tmp/com/javax.swing.plaf/.classes.list.filtered ../../../../src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java:291: cannot find symbol defaults.clearOverridesCache(c); ^ symbol: method clearOverridesCache(JComponent) location: class NimbusDefaults Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error make[5]: *** [.compile.classlist] Error 1 make[5]: Leaving directory `/openjdk7/awt/jdk/make/javax/swing/plaf' make[4]: *** [build] Error 1 ... make: *** [build_product_image] Error 2 Uhm, Sun? Otherwise good work Costantino, thank you and good luck Damjan On Wed, Mar 10, 2010 at 1:17 AM, Costantino Cerbo wrote: > Hi Peter, Anthony and Damjan, > > here is a new patch (the 4th one!) with these improvements: > ?* The copyright in GtkFileDialogPeer is now correctly dated. > ?* ANSI C conformity 1: // comments transformed to /* */ > ?* ANSI C conformity 2: Variable declaration always at the beginning of a block > ?* All compiler warnings removed > ?* Error checking (in case of failure, JNU_ThrowInternalError(..) is used) > ?* Multiple selection mode set only in an OPEN action (otherwise Gtk > throws a warning when we are saving a file) > > As also Peter said, the job is almost done and I hope to see this > patch soon in the OpenJDK! > > Best Regards, > Costantino > > P.S.: About the indentation, I have no idea why it isn't right. > I set it in my eclipse workspace according the Anthony's suggestions: > ?Tab policy: Spaces only > ?Indentation size: 4 > ?Tab site: 4 > ?Line width: 80 > > > > 2010/3/2 Peter Zhelezniakov : >> Hi Costantino, >> >> Seems almost done! Changes to GTK code seem right thing to do indeed. >> >> I'd agree that we'd better stay away from any C++-isms such as // and >> declaring variables in the middle of a block. This code is built on a >> variety of platforms and we don't want to break older ones without a strong >> reason. >> >> Thanks! >> -- >> Peter ? ? ? ? ? ? ?| ?x33066 ?| ?location: SPB04 ?| ?timezone: GMT+03 >> > From ahughes at redhat.com Wed Mar 10 05:14:33 2010 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Mar 2010 13:14:33 +0000 Subject: [PATCH FOR REVIEW]: Update fontconfig property files Message-ID: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> The current fontconfig property files in OpenJDK: jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties are outdated. They pertain to Fedora Core 6 (released October 24th, 2006 and not supported for several years) and Ubuntu 6.10 (released October 26th, 2006 and no longer supported since April 25th, 2008). The patch included in this webrev: http://cr.openjdk.java.net/~andrew/fonts/webrev.01 http://cr.openjdk.java.net/~andrew/fonts/webrev.01/webrev.zip was originally applied to IcedTea on 25-07-2007 and has been updated in sync with the appropriate distributions, the current version the result of an update for the next Debian release by Matthias Klose today. Is this ok to push to the awt tree? If so, can I have a bug ID to do so? Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From c.cerbo at gmail.com Wed Mar 10 06:18:54 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Wed, 10 Mar 2010 15:18:54 +0100 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> Message-ID: <6fbbec31003100618q3a2847f9va1460b64c8e4f2b6@mail.gmail.com> Hello Damjan, 2010/3/10 Damjan Jovanovic : > You should probably include the real header files here, like string.h > and jni_util.h, instead of declaring those functions yourself. You're right. I will do so. > Should we put the GDK lock statements around those 3 functions? But if > we should, make sure they aren't taken recursively: when called from > Java the GDK lock isn't taken and we must, but when called from the > handle_response callback function, GTK already holds that lock and we > must not. I don't know. I'll try later and let you know. > You've still got some C++ comments: > $ grep '//' b6913179.patch They are comments in Java classes ;-) > Also the patch doesn't even compile from me, fpulling the awt forest > to the latest and trying again... Yesterday I could compile without problems. When I go home later, I check out the last code in the repository and try again. Thanks for your comments and best regards, Costantino From c.cerbo at gmail.com Wed Mar 10 13:35:28 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Wed, 10 Mar 2010 22:35:28 +0100 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003100618q3a2847f9va1460b64c8e4f2b6@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> <6fbbec31003100618q3a2847f9va1460b64c8e4f2b6@mail.gmail.com> Message-ID: <6fbbec31003101335v4eec3e10lfb84ce83bf4f7e98@mail.gmail.com> Hallo, the only change in this new patch is the include of and and . The answers for Damjan: 1) Using gdk_threads_enter() and gdk_threads_leave() in Java_sun_awt_X11_GtkFileDialogPeer_quit(..) freezes the dialog on close. 2) This patch is tested with the last code in the OpenJDK repository and compiles correctly. I think, we all have done a good job and now it's time to put the patch in the OpenJDK. Best Regards, Costantino 2010/3/10 Costantino Cerbo : > Hello Damjan, > > 2010/3/10 Damjan Jovanovic : >> You should probably include the real header files here, like string.h >> and jni_util.h, instead of declaring those functions yourself. > > You're right. I will do so. > > >> Should we put the GDK lock statements around those 3 functions? But if >> we should, make sure they aren't taken recursively: when called from >> Java the GDK lock isn't taken and we must, but when called from the >> handle_response callback function, GTK already holds that lock and we >> must not. > > I don't know. I'll try later and let you know. > > >> You've still got some C++ comments: >> $ grep '//' b6913179.patch > > They are comments in Java classes ;-) > > >> Also the patch doesn't even compile from me, fpulling the awt forest >> to the latest and trying again... > > Yesterday I could compile without problems. > When I go home later, I check out the last code in the repository and try again. > > > Thanks for your comments and best regards, > Costantino > -------------- next part -------------- A non-text attachment was scrubbed... Name: b6913179.patch Type: text/x-patch Size: 36448 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100310/d0627854/b6913179.patch From damjan.jov at gmail.com Thu Mar 11 02:09:27 2010 From: damjan.jov at gmail.com (Damjan Jovanovic) Date: Thu, 11 Mar 2010 12:09:27 +0200 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003101335v4eec3e10lfb84ce83bf4f7e98@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> <6fbbec31003100618q3a2847f9va1460b64c8e4f2b6@mail.gmail.com> <6fbbec31003101335v4eec3e10lfb84ce83bf4f7e98@mail.gmail.com> Message-ID: <9e89675b1003110209s3051fe89r39dd539dcee31572@mail.gmail.com> On Wed, Mar 10, 2010 at 11:35 PM, Costantino Cerbo wrote: > Hallo, Hi > the only change in this new patch is the include of and and > . > > The answers for Damjan: > 1) Using gdk_threads_enter() and gdk_threads_leave() in > Java_sun_awt_X11_GtkFileDialogPeer_quit(..) freezes the dialog on > close. Sun, your latest awt tree still doesn't compile for me, I had to hack it to not call a method that doesn't exist so it does compile: diff -r d6d2de6ee2d1 src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java --- a/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java Fri Feb 19 15:13:37 2010 -0800 +++ b/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java Thu Mar 11 11:33:29 2010 +0200 @@ -288,7 +288,7 @@ "JComponent.sizeVariant" == eName) { JComponent c = (JComponent) ev.getSource(); - defaults.clearOverridesCache(c); + //defaults.clearOverridesCache(c); return true; } Now onto your patch. You probably didn't listen to my warning about not calling gdk_threads_enter when Java_sun_awt_X11_GtkFileDialogPeer_quit is called from handle_response (because GTK itself holds that GDK lock during the entire handle_response invocation, and that lock is not reentrant). Hence you got the freeze. My tests show the way I described does work, and the patch that uses it correctly and doesn't freeze is attached. > 2) This patch is tested with the last code in the OpenJDK repository > and compiles correctly. > > I think, we all have done a good job and now it's time to put the > patch in the OpenJDK. With my patch and some heavier testing, I managed to get an assertion failure: java: ../../src/xcb_io.c:176: process_responses: Assertion `!(req && current_request && !(((long) (req->sequence) - (long) (current_request)) <= 0))' failed. Aborted I couldn't reproduce it but I'll keep trying. There's probably still some place where we're not locking properly. > Best Regards, > Costantino Regards Damjan > 2010/3/10 Costantino Cerbo : >> Hello Damjan, >> >> 2010/3/10 Damjan Jovanovic : >>> You should probably include the real header files here, like string.h >>> and jni_util.h, instead of declaring those functions yourself. >> >> You're right. I will do so. >> >> >>> Should we put the GDK lock statements around those 3 functions? But if >>> we should, make sure they aren't taken recursively: when called from >>> Java the GDK lock isn't taken and we must, but when called from the >>> handle_response callback function, GTK already holds that lock and we >>> must not. >> >> I don't know. I'll try later and let you know. >> >> >>> You've still got some C++ comments: >>> $ grep '//' b6913179.patch >> >> They are comments in Java classes ;-) >> >> >>> Also the patch doesn't even compile from me, fpulling the awt forest >>> to the latest and trying again... >> >> Yesterday I could compile without problems. >> When I go home later, I check out the last code in the repository and try again. >> >> >> Thanks for your comments and best regards, >> Costantino >> > -------------- next part -------------- diff -r d6d2de6ee2d1 make/sun/xawt/FILES_c_unix.gmk --- a/make/sun/xawt/FILES_c_unix.gmk Fri Feb 19 15:13:37 2010 -0800 +++ b/make/sun/xawt/FILES_c_unix.gmk Thu Mar 11 11:49:23 2010 +0200 @@ -79,4 +79,5 @@ gtk2_interface.c \ swing_GTKEngine.c \ swing_GTKStyle.c \ - rect.c + rect.c \ + sun_awt_X11_GtkFileDialogPeer.c diff -r d6d2de6ee2d1 make/sun/xawt/FILES_export_unix.gmk --- a/make/sun/xawt/FILES_export_unix.gmk Fri Feb 19 15:13:37 2010 -0800 +++ b/make/sun/xawt/FILES_export_unix.gmk Thu Mar 11 11:49:23 2010 +0200 @@ -33,4 +33,5 @@ sun/awt/X11/XDesktopPeer.java \ sun/awt/X11/XToolkit.java \ sun/awt/X11/XComponentPeer.java \ - sun/awt/X11/XInputMethod.java + sun/awt/X11/XInputMethod.java \ + sun/awt/X11/GtkFileDialogPeer.java diff -r d6d2de6ee2d1 make/sun/xawt/mapfile-vers --- a/make/sun/xawt/mapfile-vers Fri Feb 19 15:13:37 2010 -0800 +++ b/make/sun/xawt/mapfile-vers Thu Mar 11 11:49:23 2010 +0200 @@ -172,6 +172,7 @@ Java_sun_awt_UNIXToolkit_load_1stock_1icon; Java_sun_awt_UNIXToolkit_load_1gtk_1icon; Java_sun_awt_UNIXToolkit_nativeSync; + Java_sun_awt_UNIXToolkit_gtkCheckVersionImpl; Java_java_awt_AWTEvent_initIDs; Java_java_awt_event_InputEvent_initIDs; Java_java_awt_event_KeyEvent_initIDs; @@ -396,6 +397,9 @@ Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue; Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName; + Java_sun_awt_X11_GtkFileDialogPeer_run; + Java_sun_awt_X11_GtkFileDialogPeer_quit; + Java_sun_print_CUPSPrinter_initIDs; Java_sun_print_CUPSPrinter_getCupsServer; Java_sun_print_CUPSPrinter_getCupsPort; diff -r d6d2de6ee2d1 src/solaris/classes/sun/awt/UNIXToolkit.java --- a/src/solaris/classes/sun/awt/UNIXToolkit.java Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/classes/sun/awt/UNIXToolkit.java Thu Mar 11 11:49:23 2010 +0200 @@ -314,4 +314,27 @@ } return new RenderingHints(KEY_TEXT_ANTIALIASING, aaHint); } + + private native boolean gtkCheckVersionImpl(int major, int minor, + int micro); + + /** + * Returns {@code true} if the GTK+ library is compatible with the given + * version. + * + * @param major + * The required major version. + * @param minor + * The required minor version. + * @param micro + * The required micro version. + * @return {@code true} if the GTK+ library is compatible with the given + * version. + */ + public boolean checkGtkVersion(int major, int minor, int micro) { + if(loadGTK()) { + return gtkCheckVersionImpl(major, minor, micro); + } + return false; + } } diff -r d6d2de6ee2d1 src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java Thu Mar 11 11:49:23 2010 +0200 @@ -0,0 +1,132 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package sun.awt.X11; + +import java.awt.Dialog; +import java.awt.FileDialog; +import java.awt.peer.FileDialogPeer; +import java.io.File; +import java.io.FilenameFilter; +import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; +import sun.awt.AWTAccessor; + +/** + * FileDialogPeer for the GtkFileChooser. + * + * @author Costantino Cerbo (c.cerbo at gmail.com) + */ +class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { + + private FileDialog fd; + + public GtkFileDialogPeer(FileDialog fd) { + super((Dialog) fd); + this.fd = fd; + } + + private native void run(String title, int mode, String dir, String file, + FilenameFilter filter, boolean isMultipleMode); + + private native void quit(); + + /** + * Called exclusively by the native C code. + */ + private void setFileInternal(String directory, String[] filenames) { + AWTAccessor.FileDialogAccessor accessor = AWTAccessor.getFileDialogAccessor(); + + if (filenames == null) { + accessor.setDirectory(fd, null); + accessor.setFile(fd, null); + accessor.setFiles(fd, null, null); + } else { + accessor.setDirectory(fd, directory); + accessor.setFile(fd, filenames[0]); + accessor.setFiles(fd, directory, filenames); + } + } + + /** + * Called exclusively by the native C code. + */ + private boolean filenameFilterCallback(String fullname) { + if (fd.getFilenameFilter() == null) { + // no filter, accept all. + return true; + } + + File filen = new File(fullname); + return fd.getFilenameFilter().accept(new File(filen.getParent()), + filen.getName()); + } + + @Override + public void setVisible(boolean b) { + XToolkit.awtLock(); + try { + if (b) { + Thread t = new Thread() { + public void run() { + GtkFileDialogPeer.this.run(fd.getTitle(), fd.getMode(), + fd.getDirectory(), fd.getFile(), + fd.getFilenameFilter(), fd.isMultipleMode()); + fd.setVisible(false); + } + }; + t.start(); + } else { + quit(); + fd.setVisible(false); + } + } finally { + XToolkit.awtUnlock(); + } + } + + @Override + public void dispose() { + quit(); + super.dispose(); + } + + @Override + public void setDirectory(String dir) { + // We do not implement this method because we + // have delegated to FileDialog#setDirectory + } + + @Override + public void setFile(String file) { + // We do not implement this method because we + // have delegated to FileDialog#setFile + } + + @Override + public void setFilenameFilter(FilenameFilter filter) { + // We do not implement this method because we + // have delegated to FileDialog#setFilenameFilter + } +} diff -r d6d2de6ee2d1 src/solaris/classes/sun/awt/X11/XToolkit.java --- a/src/solaris/classes/sun/awt/X11/XToolkit.java Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/classes/sun/awt/X11/XToolkit.java Thu Mar 11 11:49:23 2010 +0200 @@ -1041,7 +1041,9 @@ } public FileDialogPeer createFileDialog(FileDialog target) { - FileDialogPeer peer = new XFileDialogPeer(target); + // The current GtkFileChooser is available from GTK+ 2.4 + FileDialogPeer peer = checkGtkVersion(2, 4, 0) ? new GtkFileDialogPeer( + target) : new XFileDialogPeer(target); targetCreatedPeer(target, peer); return peer; } diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/awt_UNIXToolkit.c --- a/src/solaris/native/sun/awt/awt_UNIXToolkit.c Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/native/sun/awt/awt_UNIXToolkit.c Thu Mar 11 11:49:23 2010 +0200 @@ -260,3 +260,24 @@ } dlclose(hSplashLib); } + +/* + * Class: sun_awt_UNIXToolkit + * Method: gtkCheckVersionImpl + * Signature: (III)Ljava/lang/String; + */ +JNIEXPORT jboolean JNICALL +Java_sun_awt_UNIXToolkit_gtkCheckVersionImpl + (JNIEnv *env, jobject this, jint major, jint minor, jint micro) +{ + char *ret; + + ret = fp_gtk_check_version(major, minor, micro); + if (ret == NULL) + { + return TRUE; + } + + free(ret); + return FALSE; +} diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/gtk2_interface.c --- a/src/solaris/native/sun/awt/gtk2_interface.c Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/native/sun/awt/gtk2_interface.c Thu Mar 11 11:49:23 2010 +0200 @@ -32,6 +32,7 @@ #include "java_awt_Transparency.h" #define GTK2_LIB "libgtk-x11-2.0.so.0" +#define GTHREAD_LIB "libgthread-2.0.so.0" #define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0) #define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1) @@ -75,6 +76,7 @@ const gint DEFAULT = 1 << 10; static void *gtk2_libhandle = NULL; +static void *gthread_libhandle = NULL; static jmp_buf j; /* Widgets */ @@ -150,7 +152,6 @@ /************************* * Glib function pointers *************************/ -static void (*fp_g_free)(gpointer mem); static gboolean (*fp_g_main_context_iteration)(GMainContext *context, gboolean may_block); @@ -204,9 +205,6 @@ /************************ * Gtk function pointers ************************/ -static gchar* (*fp_gtk_check_version)(guint required_major, - guint required_minor, - guint required_micro); static gboolean (*fp_gtk_init_check)(int* argc, char** argv); /* Painting */ @@ -330,7 +328,6 @@ static void (*fp_gtk_menu_item_set_submenu)(GtkMenuItem *menu_item, GtkWidget *submenu); static void (*fp_gtk_widget_realize)(GtkWidget *widget); -static void (*fp_gtk_widget_destroy)(GtkWidget *widget); static GdkPixbuf* (*fp_gtk_widget_render_icon)(GtkWidget *widget, const gchar *stock_id, GtkIconSize size, const gchar *detail); static void (*fp_gtk_widget_set_name)(GtkWidget *widget, const gchar *name); @@ -388,6 +385,15 @@ return result; } +static void* dl_symbol_gthread(const char* name) +{ + void* result = dlsym(gthread_libhandle, name); + if (!result) + longjmp(j, NO_SYMBOL_EXCEPTION); + + return result; +} + gboolean gtk2_check_version() { if (gtk2_libhandle != NULL) { @@ -414,6 +420,33 @@ } } +/** + * Functions for sun_awt_X11_GtkFileDialogPeer.c + */ +void gtk2_file_chooser_load() +{ + fp_gtk_file_chooser_get_filename = dl_symbol( + "gtk_file_chooser_get_filename"); + fp_gtk_file_chooser_dialog_new = dl_symbol("gtk_file_chooser_dialog_new"); + fp_gtk_file_chooser_set_current_folder = dl_symbol( + "gtk_file_chooser_set_current_folder"); + fp_gtk_file_chooser_set_filename = dl_symbol( + "gtk_file_chooser_set_filename"); + fp_gtk_file_filter_add_custom = dl_symbol("gtk_file_filter_add_custom"); + fp_gtk_file_chooser_set_filter = dl_symbol("gtk_file_chooser_set_filter"); + fp_gtk_file_chooser_get_type = dl_symbol("gtk_file_chooser_get_type"); + fp_gtk_file_filter_new = dl_symbol("gtk_file_filter_new"); + fp_gtk_file_chooser_set_do_overwrite_confirmation = dl_symbol( + "gtk_file_chooser_set_do_overwrite_confirmation"); + fp_gtk_file_chooser_set_select_multiple = dl_symbol( + "gtk_file_chooser_set_select_multiple"); + fp_gtk_file_chooser_get_current_folder = dl_symbol( + "gtk_file_chooser_get_current_folder"); + fp_gtk_file_chooser_get_filenames = dl_symbol( + "gtk_file_chooser_get_filenames"); + fp_gtk_g_slist_length = dl_symbol("g_slist_length"); +} + gboolean gtk2_load() { gboolean result; @@ -423,7 +456,9 @@ char *gtk_modules_env; gtk2_libhandle = dlopen(GTK2_LIB, RTLD_LAZY | RTLD_LOCAL); - if (gtk2_libhandle == NULL) + gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL); + + if (gtk2_libhandle == NULL || gthread_libhandle == NULL) return FALSE; if (setjmp(j) == 0) @@ -597,6 +632,29 @@ fp_gtk_range_get_adjustment = dl_symbol("gtk_range_get_adjustment"); + fp_gtk_widget_hide = dl_symbol("gtk_widget_hide"); + fp_gtk_main_quit = dl_symbol("gtk_main_quit"); + fp_g_signal_connect_data = dl_symbol("g_signal_connect_data"); + fp_gtk_widget_show = dl_symbol("gtk_widget_show"); + fp_gtk_main = dl_symbol("gtk_main"); + + /** + * GLib thread system + */ + fp_g_thread_get_initialized = dl_symbol_gthread("g_thread_get_initialized"); + fp_g_thread_init = dl_symbol_gthread("g_thread_init"); + fp_gdk_threads_init = dl_symbol("gdk_threads_init"); + fp_gdk_threads_enter = dl_symbol("gdk_threads_enter"); + fp_gdk_threads_leave = dl_symbol("gdk_threads_leave"); + + /** + * Functions for sun_awt_X11_GtkFileDialogPeer.c + */ + if (fp_gtk_check_version(2, 4, 0) == NULL) { + // The current GtkFileChooser is available from GTK+ 2.4 + gtk2_file_chooser_load(); + } + /* Some functions may be missing in pre-2.4 GTK. We handle them specially here. */ @@ -626,6 +684,10 @@ { dlclose(gtk2_libhandle); gtk2_libhandle = NULL; + + dlclose(gthread_libhandle); + gthread_libhandle = NULL; + return FALSE; } @@ -678,6 +740,19 @@ */ handler = XSetErrorHandler(NULL); io_handler = XSetIOErrorHandler(NULL); + + if (fp_gtk_check_version(2, 2, 0) == NULL) + { + // Init the thread system to use GLib in a thread-safe mode + if (!fp_g_thread_get_initialized()) + { + fp_g_thread_init(NULL); + + //According the GTK documentation, gdk_threads_init() should be + //called before gtk_init() or gtk_init_check() + fp_gdk_threads_init(); + } + } result = (*fp_gtk_init_check)(NULL, NULL); XSetErrorHandler(handler); @@ -722,6 +797,7 @@ dlerror(); dlclose(gtk2_libhandle); + dlclose(gthread_libhandle); if ((gtk2_error = dlerror()) != NULL) { return FALSE; diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/gtk2_interface.h --- a/src/solaris/native/sun/awt/gtk2_interface.h Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/native/sun/awt/gtk2_interface.h Thu Mar 11 11:49:23 2010 +0200 @@ -28,6 +28,21 @@ #include #include +#define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip) +#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) +#define GTK_TYPE_FILE_CHOOSER (fp_gtk_file_chooser_get_type ()) +#define GTK_FILE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_CHOOSER, GtkFileChooser)) +#define fp_g_signal_connect(instance, detailed_signal, c_handler, data) \ + fp_g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) +#define G_CALLBACK(f) ((GCallback) (f)) +#define G_TYPE_FUNDAMENTAL_SHIFT (2) +#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) +#define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) +#define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) +#define GTK_STOCK_CANCEL "gtk-cancel" +#define GTK_STOCK_SAVE "gtk-save" +#define GTK_STOCK_OPEN "gtk-open" + typedef enum _WidgetType { BUTTON, /* GtkButton */ @@ -254,7 +269,13 @@ /* We define all structure pointers to be void* */ typedef void GError; typedef void GMainContext; -typedef void GSList; + +typedef struct _GSList GSList; +struct _GSList +{ + gpointer data; + GSList *next; +}; typedef void GdkColormap; typedef void GdkDrawable; @@ -556,6 +577,66 @@ guint ellipsize : 3; }; +typedef enum { + GTK_RESPONSE_NONE = -1, + GTK_RESPONSE_REJECT = -2, + GTK_RESPONSE_ACCEPT = -3, + GTK_RESPONSE_DELETE_EVENT = -4, + GTK_RESPONSE_OK = -5, + GTK_RESPONSE_CANCEL = -6, + GTK_RESPONSE_CLOSE = -7, + GTK_RESPONSE_YES = -8, + GTK_RESPONSE_NO = -9, + GTK_RESPONSE_APPLY = -10, + GTK_RESPONSE_HELP = -11 +} GtkResponseType; + +typedef struct _GtkWindow GtkWindow; + +typedef struct _GtkFileChooser GtkFileChooser; + +typedef enum { + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER +} GtkFileChooserAction; + +typedef struct _GtkFileFilter GtkFileFilter; + +typedef enum { + GTK_FILE_FILTER_FILENAME = 1 << 0, + GTK_FILE_FILTER_URI = 1 << 1, + GTK_FILE_FILTER_DISPLAY_NAME = 1 << 2, + GTK_FILE_FILTER_MIME_TYPE = 1 << 3 +} GtkFileFilterFlags; + +typedef struct { + GtkFileFilterFlags contains; + + const gchar *filename; + const gchar *uri; + const gchar *display_name; + const gchar *mime_type; +} GtkFileFilterInfo; + +typedef gboolean (*GtkFileFilterFunc)(const GtkFileFilterInfo *filter_info, + gpointer data); + +typedef void (*GDestroyNotify)(gpointer data); + +typedef void (*GCallback)(void); + +typedef struct _GClosure GClosure; + +typedef void (*GClosureNotify)(gpointer data, GClosure *closure); + +typedef enum { + G_CONNECT_AFTER = 1 << 0, G_CONNECT_SWAPPED = 1 << 1 +} GConnectFlags; + +typedef struct _GThreadFunctions GThreadFunctions; + /* * Converts java.lang.String object to UTF-8 character string. */ @@ -569,6 +650,13 @@ */ gboolean gtk2_check_version(); +/** + * Returns : + * NULL if the GTK+ library is compatible with the given version, or a string + * describing the version mismatch. + */ +gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor, + guint required_micro); /* * Load the gtk2 library. If the library is already loaded this method has no * effect and returns success. @@ -651,6 +739,7 @@ void gtk2_set_range_value(WidgetType widget_type, jdouble value, jdouble min, jdouble max, jdouble visible); +void (*fp_g_free)(gpointer mem); void (*fp_g_object_unref)(gpointer object); int (*fp_gdk_pixbuf_get_bits_per_sample)(const GdkPixbuf *pixbuf); guchar *(*fp_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf); @@ -660,5 +749,48 @@ int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf); int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf); GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error); +void (*fp_gtk_widget_destroy)(GtkWidget *widget); + + +/** + * Function Pointers for GtkFileChooser + */ +gchar* (*fp_gtk_file_chooser_get_filename)(GtkFileChooser *chooser); +void (*fp_gtk_widget_hide)(GtkWidget *widget); +void (*fp_gtk_main_quit)(void); +GtkWidget* (*fp_gtk_file_chooser_dialog_new)(const gchar *title, + GtkWindow *parent, GtkFileChooserAction action, + const gchar *first_button_text, ...); +gboolean (*fp_gtk_file_chooser_set_current_folder)(GtkFileChooser *chooser, + const gchar *filename); +gboolean (*fp_gtk_file_chooser_set_filename)(GtkFileChooser *chooser, + const char *filename); +void (*fp_gtk_file_filter_add_custom)(GtkFileFilter *filter, + GtkFileFilterFlags needed, GtkFileFilterFunc func, gpointer data, + GDestroyNotify notify); +void (*fp_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, + GtkFileFilter *filter); +GType (*fp_gtk_file_chooser_get_type)(void); +GtkFileFilter* (*fp_gtk_file_filter_new)(void); +void (*fp_gtk_file_chooser_set_do_overwrite_confirmation)( + GtkFileChooser *chooser, gboolean do_overwrite_confirmation); +void (*fp_gtk_file_chooser_set_select_multiple)( + GtkFileChooser *chooser, gboolean select_multiple); +gchar* (*fp_gtk_file_chooser_get_current_folder)(GtkFileChooser *chooser); +GSList* (*fp_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser); +guint (*fp_gtk_g_slist_length)(GSList *list); +gulong (*fp_g_signal_connect_data)(gpointer instance, + const gchar *detailed_signal, GCallback c_handler, gpointer data, + GClosureNotify destroy_data, GConnectFlags connect_flags); +void (*fp_gtk_widget_show)(GtkWidget *widget); +void (*fp_gtk_main)(void); +guint (*fp_gtk_main_level)(void); + + +gboolean (*fp_g_thread_get_initialized)(void); +void (*fp_g_thread_init)(GThreadFunctions *vtable); +void (*fp_gdk_threads_init)(void); +void (*fp_gdk_threads_enter)(void); +void (*fp_gdk_threads_leave)(void); #endif /* !_GTK2_INTERFACE_H */ diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Thu Mar 11 11:49:23 2010 +0200 @@ -0,0 +1,252 @@ +#include +#include +#include +#include +#include "gtk2_interface.h" +#include "sun_awt_X11_GtkFileDialogPeer.h" + +static JavaVM *jvm; +static GtkWidget *dialog = NULL; + +/* To cache some method IDs */ +static jmethodID filenameFilterCallbackMethodID = NULL; +static jmethodID setFileInternalMethodID = NULL; + +static gboolean filenameFilterCallback(const GtkFileFilterInfo * filter_info, + gpointer obj) +{ + JNIEnv *env; + jclass cx; + jstring filename; + + env = (JNIEnv *) JNU_GetEnv(jvm, JNI_VERSION_1_2); + + if (filenameFilterCallbackMethodID == NULL) + { + cx = (*env)->GetObjectClass(env, (jobject) obj); + if (cx == NULL) + { + JNU_ThrowInternalError(env, "Could not get file filter class"); + return 0; + } + + filenameFilterCallbackMethodID = (*env)->GetMethodID(env, cx, + "filenameFilterCallback", "(Ljava/lang/String;)Z"); + if (filenameFilterCallbackMethodID == NULL) + { + JNU_ThrowInternalError(env, + "Could not get filenameFilterCallback method id"); + return 0; + } + } + + filename = (*env)->NewStringUTF(env, filter_info->filename); + + return (*env)->CallBooleanMethod(env, obj, filenameFilterCallbackMethodID, + filename); +} + +static void unlocked_quit(void) +{ + if (dialog != NULL) + { + fp_gtk_widget_hide (dialog); + fp_gtk_widget_destroy (dialog); + + fp_gtk_main_quit (); + dialog = NULL; + } +} + +/* + * Class: sun_awt_X11_GtkFileDialogPeer + * Method: quit + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit +(JNIEnv * env, jobject jpeer) +{ + fp_gdk_threads_enter(); + unlocked_quit(); + fp_gdk_threads_leave(); +} + +/** + * Convert a GSList to an array of filenames (without the parent folder) + */ +static jobjectArray toFilenamesArray(JNIEnv *env, GSList* list) +{ + jstring str; + jclass stringCls; + GSList *iterator; + jobjectArray array; + int i; + char* entry; + + if (NULL == list) + { + return NULL; + } + + stringCls = (*env)->FindClass(env, "java/lang/String"); + if (stringCls == NULL) + { + JNU_ThrowInternalError(env, "Could not get java.lang.String class"); + return NULL; + } + + array = (*env)->NewObjectArray(env, fp_gtk_g_slist_length(list), stringCls, + NULL); + if (array == NULL) + { + JNU_ThrowInternalError(env, "Could not instantiate array files array"); + return NULL; + } + + i = 0; + for (iterator = list; iterator; iterator = iterator->next) + { + entry = (char*) iterator->data; + entry = strrchr(entry, '/') + 1; + str = (*env)->NewStringUTF(env, entry); + (*env)->SetObjectArrayElement(env, array, i, str); + i++; + } + + return array; +} + +static void handle_response(GtkWidget* aDialog, gint responseId, gpointer obj) +{ + JNIEnv *env; + char *current_folder; + GSList *filenames; + jclass cx; + jstring jcurrent_folder; + jobjectArray jfilenames; + + env = (JNIEnv *) JNU_GetEnv(jvm, JNI_VERSION_1_2); + current_folder = NULL; + filenames = NULL; + + if (responseId == GTK_RESPONSE_ACCEPT) + { + current_folder = fp_gtk_file_chooser_get_current_folder( + GTK_FILE_CHOOSER(dialog)); + filenames = fp_gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog)); + } + + if (setFileInternalMethodID == NULL) + { + cx = (*env)->GetObjectClass(env, (jobject) obj); + if (cx == NULL) + { + JNU_ThrowInternalError(env, "Could not get GTK peer class"); + return; + } + + setFileInternalMethodID = (*env)->GetMethodID(env, cx, + "setFileInternal", "(Ljava/lang/String;[Ljava/lang/String;)V"); + if (setFileInternalMethodID == NULL) + { + JNU_ThrowInternalError(env, + "Could not get setFileInternalMethodID method id"); + return; + } + } + + jcurrent_folder = (*env)->NewStringUTF(env, current_folder); + jfilenames = toFilenamesArray(env, filenames); + + (*env)->CallVoidMethod(env, obj, setFileInternalMethodID, jcurrent_folder, + jfilenames); + fp_g_free(current_folder); + + unlocked_quit(); +} + +/* + * Class: sun_awt_X11_GtkFileDialogPeer + * Method: run + * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z;)V + */ +JNIEXPORT void JNICALL +Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer, + jstring jtitle, jint mode, jstring jdir, jstring jfile, + jobject jfilter, jboolean multiple) +{ + GtkFileFilter *filter; + + if (jvm == NULL) + { + (*env)->GetJavaVM(env, &jvm); + } + + fp_gdk_threads_init(); + fp_gdk_threads_enter(); + + const char *title = (*env)->GetStringUTFChars(env, jtitle, 0); + + if (mode == 1) + { + /* Save action */ + dialog = fp_gtk_file_chooser_dialog_new(title, NULL, + GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + } + else + { + /* Default action OPEN */ + dialog = fp_gtk_file_chooser_dialog_new(title, NULL, + GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + + /* Set multiple selection mode, that is allowed only in OPEN action */ + if (multiple) + { + fp_gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), + multiple); + } + } + + (*env)->ReleaseStringUTFChars(env, jtitle, title); + + /* Set the directory */ + if (jdir != NULL) + { + const char *dir = (*env)->GetStringUTFChars(env, jdir, 0); + fp_gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dir); + (*env)->ReleaseStringUTFChars(env, jdir, dir); + } + + /* Set the filename */ + if (jfile != NULL) + { + const char *filename = (*env)->GetStringUTFChars(env, jfile, 0); + fp_gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), filename); + (*env)->ReleaseStringUTFChars(env, jfile, filename); + } + + /* Set the file filter */ + if (jfilter != NULL) + { + filter = fp_gtk_file_filter_new(); + fp_gtk_file_filter_add_custom(filter, GTK_FILE_FILTER_FILENAME, + filenameFilterCallback, jpeer, NULL); + fp_gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); + } + + /* Other Properties */ + if (fp_gtk_check_version(2, 8, 0) == NULL) + { + fp_gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER( + dialog), TRUE); + } + + fp_g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK( + handle_response), jpeer); + fp_gtk_widget_show(dialog); + + fp_gtk_main(); + fp_gdk_threads_leave(); +} diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h Thu Mar 11 11:49:23 2010 +0200 @@ -0,0 +1,31 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class sun_awt_X11_GtkFileDialogPeer */ + +#ifndef _Included_sun_awt_X11_GtkFileDialogPeer +#define _Included_sun_awt_X11_GtkFileDialogPeer +#ifdef __cplusplus +extern "C" { +#endif + + +/* + * Class: sun_awt_X11_GtkFileDialogPeer + * Method: run + * Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z;)V + */ +JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_run + (JNIEnv *, jobject, jstring, jint, jstring, jstring, jobject, jboolean); + +/* + * Class: sun_awt_X11_GtkFileDialogPeer + * Method: quit + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/swing_GTKEngine.c --- a/src/solaris/native/sun/awt/swing_GTKEngine.c Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/native/sun/awt/swing_GTKEngine.c Thu Mar 11 11:49:23 2010 +0200 @@ -38,8 +38,10 @@ jint widget_type, jint state, jint shadow_type, jstring detail, jint x, jint y, jint w, jint h, jint arrow_type) { + fp_gdk_threads_enter(); gtk2_paint_arrow(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, arrow_type, TRUE); + fp_gdk_threads_leave(); } /* @@ -54,8 +56,10 @@ jint x, jint y, jint w, jint h, jint synth_state, jint dir) { + fp_gdk_threads_enter(); gtk2_paint_box(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, synth_state, dir); + fp_gdk_threads_leave(); } /* @@ -70,8 +74,10 @@ jint x, jint y, jint w, jint h, jint gap_side, jint gap_x, jint gap_w) { + fp_gdk_threads_enter(); gtk2_paint_box_gap(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, gap_side, gap_x, gap_w); + fp_gdk_threads_leave(); } /* @@ -85,8 +91,10 @@ jint widget_type, jint synth_state, jstring detail, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_paint_check(widget_type, synth_state, getStrFor(env, detail), x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -100,8 +108,10 @@ jint widget_type, jint state, jstring detail, jint x, jint y, jint w, jint h, jint expander_style) { + fp_gdk_threads_enter(); gtk2_paint_expander(widget_type, state, getStrFor(env, detail), x, y, w, h, expander_style); + fp_gdk_threads_leave(); } /* @@ -115,8 +125,10 @@ jint widget_type, jint state, jint shadow_type, jstring detail, jint x, jint y, jint w, jint h, jint placement) { + fp_gdk_threads_enter(); gtk2_paint_extension(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, placement); + fp_gdk_threads_leave(); } /* @@ -130,8 +142,10 @@ jint widget_type, jint state, jint shadow_type, jstring detail, jint x, jint y, jint w, jint h, jboolean has_focus) { + fp_gdk_threads_enter(); gtk2_paint_flat_box(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, has_focus); + fp_gdk_threads_leave(); } /* @@ -145,8 +159,10 @@ jint widget_type, jint state, jstring detail, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_paint_focus(widget_type, state, getStrFor(env, detail), x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -160,8 +176,10 @@ jint widget_type, jint state, jint shadow_type, jstring detail, jint x, jint y, jint w, jint h, jint orientation) { + fp_gdk_threads_enter(); gtk2_paint_handle(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, orientation); + fp_gdk_threads_leave(); } /* @@ -175,8 +193,10 @@ jint widget_type, jint state, jstring detail, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_paint_hline(widget_type, state, getStrFor(env, detail), x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -190,8 +210,10 @@ jint widget_type, jint synth_state, jstring detail, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_paint_option(widget_type, synth_state, getStrFor(env, detail), x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -206,8 +228,10 @@ jint x, jint y, jint w, jint h, jint synth_state, jint dir) { + fp_gdk_threads_enter(); gtk2_paint_shadow(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, synth_state, dir); + fp_gdk_threads_leave(); } /* @@ -221,8 +245,10 @@ jint widget_type, jint state, jint shadow_type, jstring detail, jint x, jint y, jint w, jint h, jint orientation) { + fp_gdk_threads_enter(); gtk2_paint_slider(widget_type, state, shadow_type, getStrFor(env, detail), x, y, w, h, orientation); + fp_gdk_threads_leave(); } /* @@ -236,8 +262,10 @@ jint widget_type, jint state, jstring detail, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_paint_vline(widget_type, state, getStrFor(env, detail), x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -250,7 +278,9 @@ JNIEnv *env, jobject this, jint widget_type, jint state, jint x, jint y, jint w, jint h) { + fp_gdk_threads_enter(); gtk_paint_background(widget_type, state, x, y, w, h); + fp_gdk_threads_leave(); } /* @@ -262,7 +292,9 @@ Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting( JNIEnv *env, jobject this, jint w, jint h) { + fp_gdk_threads_enter(); gtk2_init_painting(w, h); + fp_gdk_threads_leave(); } /* @@ -276,7 +308,9 @@ { jint transparency; gint *buffer = (gint*) (*env)->GetPrimitiveArrayCritical(env, dest, 0); + fp_gdk_threads_enter(); transparency = gtk2_copy_image(buffer, width, height); + fp_gdk_threads_leave(); (*env)->ReleasePrimitiveArrayCritical(env, dest, buffer, 0); return transparency; } @@ -289,7 +323,9 @@ JNIEXPORT void JNICALL Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme( JNIEnv *env, jobject this) { + fp_gdk_threads_enter(); flush_gtk_event_loop(); + fp_gdk_threads_leave(); } /* @@ -300,7 +336,11 @@ JNIEXPORT jobject JNICALL Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting( JNIEnv *env, jobject this, jint property) { - return gtk2_get_setting(env, property); + jobject obj; + fp_gdk_threads_enter(); + obj = gtk2_get_setting(env, property); + fp_gdk_threads_leave(); + return obj; } /* @@ -313,5 +353,7 @@ JNIEnv *env, jobject this, jint widget_type, jdouble value, jdouble min, jdouble max, jdouble visible) { + fp_gdk_threads_enter(); gtk2_set_range_value(widget_type, value, min, max, visible); + fp_gdk_threads_leave(); } diff -r d6d2de6ee2d1 src/solaris/native/sun/awt/swing_GTKStyle.c --- a/src/solaris/native/sun/awt/swing_GTKStyle.c Fri Feb 19 15:13:37 2010 -0800 +++ b/src/solaris/native/sun/awt/swing_GTKStyle.c Thu Mar 11 11:49:23 2010 +0200 @@ -36,7 +36,11 @@ Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness( JNIEnv *env, jclass klass, jint widget_type) { - return gtk2_get_xthickness(env, widget_type); + jint ret; + fp_gdk_threads_enter(); + ret = gtk2_get_xthickness(env, widget_type); + fp_gdk_threads_leave(); + return ret; } /* @@ -48,7 +52,11 @@ Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness( JNIEnv *env, jclass klass, jint widget_type) { - return gtk2_get_ythickness(env, widget_type); + jint ret; + fp_gdk_threads_enter(); + ret = gtk2_get_ythickness(env, widget_type); + fp_gdk_threads_leave(); + return ret; } /* @@ -61,7 +69,11 @@ JNIEnv *env, jclass klass, jint widget_type, jint state_type, jint type_id) { - return gtk2_get_color_for_state(env, widget_type, state_type, type_id); + jint ret; + fp_gdk_threads_enter(); + ret = gtk2_get_color_for_state(env, widget_type, state_type, type_id); + fp_gdk_threads_leave(); + return ret; } /* @@ -73,7 +85,11 @@ Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue( JNIEnv *env, jclass klass, jint widget_type, jstring key) { - return gtk2_get_class_value(env, widget_type, key); + jobject ret; + fp_gdk_threads_enter(); + ret = gtk2_get_class_value(env, widget_type, key); + fp_gdk_threads_leave(); + return ret; } /* @@ -85,5 +101,9 @@ Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName( JNIEnv *env, jclass klass, jint widget_type) { - return gtk2_get_pango_font_name(env, widget_type); + jstring ret; + fp_gdk_threads_enter(); + ret = gtk2_get_pango_font_name(env, widget_type); + fp_gdk_threads_leave(); + return ret; } From Anthony.Petrov at Sun.COM Thu Mar 11 09:17:40 2010 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Thu, 11 Mar 2010 20:17:40 +0300 Subject: [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> Message-ID: <4B9925B4.9040702@sun.com> Hi Andrew, I'm CC'ing the 2d-dev mailing list since font-related code is under their maintenance. -- best regards, Anthony On 3/10/2010 4:14 PM Andrew John Hughes wrote: > The current fontconfig property files in OpenJDK: > > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties > > are outdated. They pertain to Fedora Core 6 (released October 24th, > 2006 and not supported for several years) and Ubuntu 6.10 (released > October 26th, 2006 and no longer supported since April 25th, 2008). > > The patch included in this webrev: > > http://cr.openjdk.java.net/~andrew/fonts/webrev.01 > http://cr.openjdk.java.net/~andrew/fonts/webrev.01/webrev.zip > > was originally applied to IcedTea on 25-07-2007 and has been updated > in sync with the appropriate distributions, the current version the > result of an update for the next Debian release by Matthias Klose > today. > > Is this ok to push to the awt tree? If so, can I have a bug ID to do so? > > Thanks, From ahughes at redhat.com Thu Mar 11 12:55:16 2010 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 11 Mar 2010 20:55:16 +0000 Subject: [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <1268340799.4621.16.camel@moonlight> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> Message-ID: <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> On 11 March 2010 20:53, Roman Kennke wrote: >> > The current fontconfig property files in OpenJDK: >> > >> > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties >> > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties >> > >> > are outdated. ?They pertain to Fedora Core 6 (released October 24th, >> > 2006 and not supported for several years) and Ubuntu 6.10 (released >> > October 26th, 2006 and no longer supported since April 25th, 2008). > > Are they actually still used? I was under the impression that fontconfig > is used to get the correct font locations. > doko updated them this week so I assume they still make some difference. doko? > /Roman > > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From Phil.Race at Sun.COM Thu Mar 11 13:16:45 2010 From: Phil.Race at Sun.COM (Phil Race) Date: Thu, 11 Mar 2010 13:16:45 -0800 Subject: [OpenJDK 2D-Dev] [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> Message-ID: <4B995DBD.3030408@sun.com> The changes look OK to me. Since we aren't using X11 to render these fonts there's no need to add mappings to the appropriate NIO encoders for those new language/script symbols. The fontconfig code is a JDK 7 feature and this is a JDK 6 change I believe. Also note that there's nothing wrong (even in JDK7) with providing a fontconfig file that's just right for your distro.. the fontconfig code is motivated more by the fact that the JDKs that are separate from a distro need some way to keep up with these sorts of changes. I think these files being updated were ones I hacked together in maybe 2007 to support what distros were current at the time we open sourced JDK. Its not required that they be what a distro actually uses. FWIW historically in JDK rather than just "update" the file, we append the specific version it was targeted at to the name, and make the new updated one the default for everything else. You might want to consider doing that here although if those distros are so far past EOSL it likely doesn't matter in this case. Solaris by contrast is supported for a long, long time. -phil. Andrew John Hughes wrote: > On 11 March 2010 20:53, Roman Kennke wrote: > >>>> The current fontconfig property files in OpenJDK: >>>> >>>> jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties >>>> jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties >>>> >>>> are outdated. They pertain to Fedora Core 6 (released October 24th, >>>> 2006 and not supported for several years) and Ubuntu 6.10 (released >>>> October 26th, 2006 and no longer supported since April 25th, 2008). >>>> >> Are they actually still used? I was under the impression that fontconfig >> is used to get the correct font locations. >> >> > > doko updated them this week so I assume they still make some difference. doko? > > >> /Roman >> >> >> >> > > > > From ahughes at redhat.com Thu Mar 11 14:44:43 2010 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 11 Mar 2010 22:44:43 +0000 Subject: [OpenJDK 2D-Dev] [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <4B995DBD.3030408@sun.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> <4B995DBD.3030408@sun.com> Message-ID: <17c6771e1003111444m760ba483q75e8d81c76540576@mail.gmail.com> On 11 March 2010 21:16, Phil Race wrote: > The changes look OK to me. Since we aren't using X11 to render > these fonts there's no need to add mappings to the appropriate NIO encoders > for those new language/script symbols. > > The fontconfig code is a JDK 7 feature and this is a JDK 6 change I believe. It is, though I didn't know about the fontconfig code so was assuming it needed to go in 7 first and then be backported. Indeed, the posted webrev was against the AWT JDK7 tree where they still exist. > Also note that there's nothing wrong (even in JDK7) with providing a > fontconfig file that's just right for your distro.. the fontconfig code is > motivated more by the fact that the JDKs that are separate from a distro > need some way to keep up with these sorts of changes. That does make sense. Not all of us are on Fedora or Ubuntu. > I think these files being updated were ones I hacked together in maybe 2007 > to support what distros were current at the time we open sourced JDK. > Its not required that they be what a distro actually uses. > FWIW historically in JDK rather than just "update" the file, we append > the specific version it was targeted at to the name, and make the new > updated one the default for everything else. You might want to consider > doing that here although if those distros are so far past EOSL it likely > doesn't matter in this case. Solaris by contrast is supported for a long, > long time. > I agree it doesn't matter for these. There wasn't even an OpenJDK/IcedTea package until Fedora 8 in any case. These files have been patched pretty much from the start and then updated intermittently. Can I have a bug ID to push this? I assume, given the list redirection, it wants to be in the 2d forest. Joe, is this also ok for 6? > -phil. > > Andrew John Hughes wrote: >> >> On 11 March 2010 20:53, Roman Kennke wrote: >> >>>>> >>>>> The current fontconfig property files in OpenJDK: >>>>> >>>>> >>>>> jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties >>>>> >>>>> jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties >>>>> >>>>> are outdated. ?They pertain to Fedora Core 6 (released October 24th, >>>>> 2006 and not supported for several years) and Ubuntu 6.10 (released >>>>> October 26th, 2006 and no longer supported since April 25th, 2008). >>>>> >>> >>> Are they actually still used? I was under the impression that fontconfig >>> is used to get the correct font locations. >>> >>> >> >> doko updated them this week so I assume they still make some difference. >> ?doko? >> >> >>> >>> /Roman >>> >>> >>> >>> >> >> >> >> > > Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From Phil.Race at Sun.COM Thu Mar 11 16:47:32 2010 From: Phil.Race at Sun.COM (Phil Race) Date: Thu, 11 Mar 2010 16:47:32 -0800 Subject: [OpenJDK 2D-Dev] [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <17c6771e1003111444m760ba483q75e8d81c76540576@mail.gmail.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> <4B995DBD.3030408@sun.com> <17c6771e1003111444m760ba483q75e8d81c76540576@mail.gmail.com> Message-ID: <4B998F24.6090705@sun.com> Andrew John Hughes wrote: > > . > > Can I have a bug ID to push this? I assume, given the list > redirection, it wants to be in the 2d forest. Joe, is this also ok > for 6? > > Bug ID is 6934327: Update linux fontconfigs for Ubuntu and Fedora. I am sure this is fine for 6 too .. -phil. From Joe.Darcy at Sun.COM Thu Mar 11 17:08:24 2010 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Thu, 11 Mar 2010 17:08:24 -0800 Subject: [OpenJDK 2D-Dev] [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <4B998F24.6090705@sun.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> <4B995DBD.3030408@sun.com> <17c6771e1003111444m760ba483q75e8d81c76540576@mail.gmail.com> <4B998F24.6090705@sun.com> Message-ID: <4B999408.2040600@sun.com> Phil Race wrote: > Andrew John Hughes wrote: >> >> . >> >> Can I have a bug ID to push this? I assume, given the list >> redirection, it wants to be in the 2d forest. Joe, is this also ok >> for 6? >> >> > Bug ID is 6934327: Update linux fontconfigs for Ubuntu and Fedora. > > I am sure this is fine for 6 too .. Given Phil's review, I'm happy to have this change in OpenJDK 6. Thanks, -Joe From ahughes at redhat.com Thu Mar 11 17:38:34 2010 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 12 Mar 2010 01:38:34 +0000 Subject: [OpenJDK 2D-Dev] [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <4B999408.2040600@sun.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> <1268340799.4621.16.camel@moonlight> <17c6771e1003111255k7db1a9d6n79288f49d64efe53@mail.gmail.com> <4B995DBD.3030408@sun.com> <17c6771e1003111444m760ba483q75e8d81c76540576@mail.gmail.com> <4B998F24.6090705@sun.com> <4B999408.2040600@sun.com> Message-ID: <17c6771e1003111738n2ab2cad1ycdf32b515975b923@mail.gmail.com> On 12 March 2010 01:08, Joe Darcy wrote: > Phil Race wrote: >> >> Andrew John Hughes wrote: >>> >>> . >>> >>> Can I have a bug ID to push this? I assume, given the list >>> redirection, it wants to be in the 2d forest. ?Joe, is this also ok >>> for 6? >>> >>> >> >> Bug ID is 6934327: Update linux fontconfigs for Ubuntu and Fedora. >> >> I am sure this is fine for 6 too .. > > Given Phil's review, I'm happy to have this change in OpenJDK 6. > > Thanks, > > -Joe > Both done: http://hg.openjdk.java.net/jdk7/2d/jdk/rev/d23dcd3e3ce4 http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/178f954e1fd1 -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From Roman.Kennke at Sun.COM Thu Mar 11 12:53:19 2010 From: Roman.Kennke at Sun.COM (Roman Kennke) Date: Thu, 11 Mar 2010 21:53:19 +0100 Subject: [PATCH FOR REVIEW]: Update fontconfig property files In-Reply-To: <4B9925B4.9040702@sun.com> References: <17c6771e1003100514o490a9abeyba9dffec7f6218da@mail.gmail.com> <4B9925B4.9040702@sun.com> Message-ID: <1268340799.4621.16.camel@moonlight> > > The current fontconfig property files in OpenJDK: > > > > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties > > jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties > > > > are outdated. They pertain to Fedora Core 6 (released October 24th, > > 2006 and not supported for several years) and Ubuntu 6.10 (released > > October 26th, 2006 and no longer supported since April 25th, 2008). Are they actually still used? I was under the impression that fontconfig is used to get the correct font locations. /Roman From Anthony.Petrov at Sun.COM Fri Mar 12 08:50:55 2010 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Fri, 12 Mar 2010 19:50:55 +0300 Subject: Review request: 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <9e89675b1003110209s3051fe89r39dd539dcee31572@mail.gmail.com> References: <4B7EA7CA.8060701@sun.com> <6fbbec31003010352v2dcc710ew9b3a0cbd6d9ebfd4@mail.gmail.com> <4B8D2788.3050403@Sun.com> <6fbbec31003091517n5c093358q1a5ab05ba8842ef3@mail.gmail.com> <9e89675b1003100505u130dc9b0m51ab83799a2775e@mail.gmail.com> <6fbbec31003100618q3a2847f9va1460b64c8e4f2b6@mail.gmail.com> <6fbbec31003101335v4eec3e10lfb84ce83bf4f7e98@mail.gmail.com> <9e89675b1003110209s3051fe89r39dd539dcee31572@mail.gmail.com> Message-ID: <4B9A70EF.8090306@sun.com> Thank you very much, Damjan! I published your latest patch at: http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.4/ However, it still contains incorrectly formatted lines which makes the code unreadable. You might want to explore the Sdiffs in the webrev to notice that (eg., UNIXToolkit.java, awt_UNIXToolkit.c, sun_awt_X11_GtkFileDialogPeer.c, etc.). Would you or Costantino please correct that? The fix looks fine in overall. Peter might provide some comments after reviewing that as well. PS. The nimbusL&F issue does not seem reproducible locally. Perhaps you're using an outdated repository, or your building environment has slightly changed. -- best regards, Anthony On 03/11/2010 01:09 PM, Damjan Jovanovic wrote: > On Wed, Mar 10, 2010 at 11:35 PM, Costantino Cerbo wrote: >> Hallo, > > Hi > >> the only change in this new patch is the include of and and >> . >> >> The answers for Damjan: >> 1) Using gdk_threads_enter() and gdk_threads_leave() in >> Java_sun_awt_X11_GtkFileDialogPeer_quit(..) freezes the dialog on >> close. > > Sun, your latest awt tree still doesn't compile for me, I had to hack > it to not call a method that doesn't exist so it does compile: > > diff -r d6d2de6ee2d1 > src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java > --- a/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java > Fri Feb 19 15:13:37 2010 -0800 > +++ b/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java > Thu Mar 11 11:33:29 2010 +0200 > @@ -288,7 +288,7 @@ > "JComponent.sizeVariant" == eName) { > > JComponent c = (JComponent) ev.getSource(); > - defaults.clearOverridesCache(c); > + //defaults.clearOverridesCache(c); > return true; > } > > Now onto your patch. > > You probably didn't listen to my warning about not calling > gdk_threads_enter when Java_sun_awt_X11_GtkFileDialogPeer_quit is > called from handle_response (because GTK itself holds that GDK lock > during the entire handle_response invocation, and that lock is not > reentrant). Hence you got the freeze. > > My tests show the way I described does work, and the patch that uses > it correctly and doesn't freeze is attached. > >> 2) This patch is tested with the last code in the OpenJDK repository >> and compiles correctly. >> >> I think, we all have done a good job and now it's time to put the >> patch in the OpenJDK. > > With my patch and some heavier testing, I managed to get an assertion failure: > > java: ../../src/xcb_io.c:176: process_responses: Assertion `!(req && > current_request && !(((long) (req->sequence) - (long) > (current_request)) <= 0))' failed. > Aborted > > I couldn't reproduce it but I'll keep trying. > > There's probably still some place where we're not locking properly. > >> Best Regards, >> Costantino > > Regards > Damjan > >> 2010/3/10 Costantino Cerbo : >>> Hello Damjan, >>> >>> 2010/3/10 Damjan Jovanovic : >>>> You should probably include the real header files here, like string.h >>>> and jni_util.h, instead of declaring those functions yourself. >>> You're right. I will do so. >>> >>> >>>> Should we put the GDK lock statements around those 3 functions? But if >>>> we should, make sure they aren't taken recursively: when called from >>>> Java the GDK lock isn't taken and we must, but when called from the >>>> handle_response callback function, GTK already holds that lock and we >>>> must not. >>> I don't know. I'll try later and let you know. >>> >>> >>>> You've still got some C++ comments: >>>> $ grep '//' b6913179.patch >>> They are comments in Java classes ;-) >>> >>> >>>> Also the patch doesn't even compile from me, fpulling the awt forest >>>> to the latest and trying again... >>> Yesterday I could compile without problems. >>> When I go home later, I check out the last code in the repository and try again. >>> >>> >>> Thanks for your comments and best regards, >>> Costantino >>> From lana.steuck at sun.com Fri Mar 19 14:22:49 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:22:49 +0000 Subject: hg: jdk7/awt: 5 new changesets Message-ID: <20100319212249.6A459442CB@hg.openjdk.java.net> Changeset: 3ddf90b39176 Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/rev/3ddf90b39176 Added tag jdk7-b85 for changeset cf26288a114b ! .hgtags Changeset: 4d7419e4b759 Author: ohair Date: 2010-03-06 15:00 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/rev/4d7419e4b759 6928700: Configure top repo for JPRT testing Reviewed-by: alanb, jjg ! make/jprt.properties + test/Makefile Changeset: f3664d6879ab Author: ohair Date: 2010-03-06 15:01 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/rev/f3664d6879ab Merge Changeset: 433a60a9c0bf Author: lana Date: 2010-03-09 15:28 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/rev/433a60a9c0bf Merge Changeset: 6b1069f53fbc Author: mikejwre Date: 2010-03-18 13:52 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/rev/6b1069f53fbc Added tag jdk7-b86 for changeset 433a60a9c0bf ! .hgtags From lana.steuck at sun.com Fri Mar 19 14:22:56 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:22:56 +0000 Subject: hg: jdk7/awt/corba: 2 new changesets Message-ID: <20100319212301.E934D442CC@hg.openjdk.java.net> Changeset: 6253e28826d1 Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/corba/rev/6253e28826d1 Added tag jdk7-b85 for changeset c67a9df7bc0c ! .hgtags Changeset: 09a41111a401 Author: mikejwre Date: 2010-03-18 13:52 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/corba/rev/09a41111a401 Added tag jdk7-b86 for changeset 6253e28826d1 ! .hgtags From lana.steuck at sun.com Fri Mar 19 14:27:38 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:27:38 +0000 Subject: hg: jdk7/awt/hotspot: 29 new changesets Message-ID: <20100319212917.D13EF442CE@hg.openjdk.java.net> Changeset: 745c853ee57f Author: johnc Date: 2010-01-29 14:51 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/745c853ee57f 6885297: java -XX:RefDiscoveryPolicy=2 or -XX:TLABWasteTargetPercent=0 cause VM crash Summary: Interval checking is now being performed on the values passed in for these two flags. The current acceptable range for RefDiscoveryPolicy is [0..1], and for TLABWasteTargetPercent it is [1..100]. Reviewed-by: apetrusenko, ysr ! src/share/vm/includeDB_core ! src/share/vm/memory/referenceProcessor.hpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/arguments.hpp Changeset: 6484c4ee11cb Author: ysr Date: 2010-02-01 17:29 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/6484c4ee11cb 6904516: More object array barrier fixes, following up on 6906727 Summary: Fixed missing pre-barrier calls for G1, modified C1 to call pre- and correct post-barrier interfaces, deleted obsolete interface, (temporarily) disabled redundant deferred barrier in BacktraceBuilder. Reviewed-by: coleenp, jmasa, kvn, never ! src/share/vm/c1/c1_Runtime1.cpp ! src/share/vm/classfile/javaClasses.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/memory/barrierSet.hpp ! src/share/vm/memory/barrierSet.inline.hpp ! src/share/vm/runtime/stubRoutines.cpp Changeset: deada8912c54 Author: johnc Date: 2010-02-02 18:39 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/deada8912c54 6914402: G1: assert(!is_young_card(cached_ptr),"shouldn't get a card in young region") Summary: Invalid assert. Filter cards evicted from the card count cache instead. Reviewed-by: apetrusenko, tonyp ! src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Changeset: 230fac611b50 Author: johnc Date: 2010-02-08 09:58 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/230fac611b50 Merge ! src/share/vm/c1/c1_Runtime1.cpp ! src/share/vm/includeDB_core Changeset: 455df1b81409 Author: kamg Date: 2010-02-08 13:49 -0500 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/455df1b81409 6587322: dtrace probe object__alloc doesn't fire in some situations on amd64 Summary: Fix misplaced probe point Reviewed-by: rasbold, phh Contributed-by: neojia at gmail.com ! src/cpu/x86/vm/templateTable_x86_64.cpp Changeset: 95d21201c29a Author: apangin Date: 2010-02-11 10:48 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/95d21201c29a Merge Changeset: 3f5b7efb9642 Author: never Date: 2010-02-05 11:07 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/3f5b7efb9642 6920293: OptimizeStringConcat causing core dumps Reviewed-by: kvn, twisti ! src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp ! src/share/vm/code/nmethod.cpp ! src/share/vm/opto/stringopts.cpp ! src/share/vm/runtime/sharedRuntime.cpp Changeset: 576e77447e3c Author: kvn Date: 2010-02-07 12:15 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/576e77447e3c 6923002: assert(false,"this call site should not be polymorphic") Summary: Clear the total count when a receiver information is cleared. Reviewed-by: never, jrose ! src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp ! src/cpu/sparc/vm/interp_masm_sparc.cpp ! src/cpu/sparc/vm/sharedRuntime_sparc.cpp ! src/cpu/x86/vm/c1_LIRAssembler_x86.cpp ! src/cpu/x86/vm/interp_masm_x86_32.cpp ! src/cpu/x86/vm/interp_masm_x86_64.cpp ! src/share/vm/ci/ciMethod.cpp ! src/share/vm/oops/methodDataOop.hpp ! src/share/vm/opto/doCall.cpp ! src/share/vm/opto/runtime.cpp ! src/share/vm/runtime/arguments.cpp Changeset: f516d5d7a019 Author: kvn Date: 2010-02-08 12:20 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/f516d5d7a019 6910605: C2: NullPointerException/ClassCaseException is thrown when C2 with DeoptimizeALot is used Summary: Set the reexecute bit for runtime calls _new_array_Java when they used for _multianewarray bytecode. Reviewed-by: never ! src/share/vm/code/pcDesc.cpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/parse3.cpp + test/compiler/6910605/Test.java Changeset: f70b0d9ab095 Author: kvn Date: 2010-02-09 01:31 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/f70b0d9ab095 6910618: C2: Error: assert(d->is_oop(),"JVM_ArrayCopy: dst not an oop") Summary: Mark in PcDesc call sites which return oop and save the result oop across objects reallocation during deoptimization. Reviewed-by: never ! src/share/vm/c1/c1_IR.hpp ! src/share/vm/code/debugInfoRec.cpp ! src/share/vm/code/debugInfoRec.hpp ! src/share/vm/code/nmethod.cpp ! src/share/vm/code/pcDesc.hpp ! src/share/vm/code/scopeDesc.cpp ! src/share/vm/code/scopeDesc.hpp ! src/share/vm/includeDB_core ! src/share/vm/opto/output.cpp ! src/share/vm/prims/jvmtiCodeBlobEvents.cpp ! src/share/vm/runtime/deoptimization.cpp + test/compiler/6910618/Test.java Changeset: 4ee1c645110e Author: kvn Date: 2010-02-09 10:21 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/4ee1c645110e 6924097: assert((_type == Type::MEMORY) == (_adr_type != 0),"adr_type for memory phis only") Summary: Use PhiNode::make_blank(r, n) method to construct the phi. Reviewed-by: never ! src/share/vm/opto/loopopts.cpp Changeset: e3a4305c6bc3 Author: kvn Date: 2010-02-12 08:54 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/e3a4305c6bc3 6925249: assert(last_sp < (intptr_t*) interpreter_frame_monitor_begin(),"bad tos") Summary: Fix assert since top deoptimized frame has last_sp == interpreter_frame_monitor_begin if there are no expressions. Reviewed-by: twisti ! src/cpu/x86/vm/frame_x86.inline.hpp ! src/share/vm/runtime/deoptimization.cpp ! src/share/vm/runtime/frame.cpp ! src/share/vm/runtime/vframeArray.cpp Changeset: c09ee209b65c Author: kvn Date: 2010-02-12 10:34 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/c09ee209b65c 6926048: Improve Zero performance Summary: Make Zero figure out result types in a similar way to C++ interpreter implementation. Reviewed-by: kvn Contributed-by: gbenson at redhat.com ! src/cpu/zero/vm/cppInterpreter_zero.cpp ! src/cpu/zero/vm/cppInterpreter_zero.hpp Changeset: 7b4415a18c8a Author: kvn Date: 2010-02-12 15:27 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/7b4415a18c8a Merge ! src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp ! src/cpu/x86/vm/c1_LIRAssembler_x86.cpp ! src/share/vm/includeDB_core ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/runtime.cpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/sharedRuntime.cpp Changeset: 38836cf1d8d2 Author: tonyp Date: 2010-02-05 11:05 -0500 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/38836cf1d8d2 6920977: G1: guarantee(k == probe->klass(),"klass should be in dictionary") fails Summary: the guarantee is too strict and the test will fail (incorrectly) if the class is not in the system dictionary but in the placeholders. Reviewed-by: acorn, phh ! src/share/vm/classfile/loaderConstraints.cpp ! src/share/vm/classfile/loaderConstraints.hpp ! src/share/vm/classfile/systemDictionary.cpp ! src/share/vm/includeDB_core Changeset: 9eee977dd1a9 Author: tonyp Date: 2010-02-08 14:23 -0500 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/9eee977dd1a9 6802453: G1: hr()->is_in_reserved(from),"Precondition." Summary: The operations of re-using a RSet component and expanding the same RSet component were not mutually exlusive, and this could lead to RSets getting corrupted and entries being dropped. Reviewed-by: iveresov, johnc ! src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Changeset: 8859772195c6 Author: johnc Date: 2010-02-09 13:56 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate. Summary: Update and display the timers associated with these flags for all safepoints. Reviewed-by: ysr, jcoomes ! src/share/vm/runtime/vmThread.cpp ! src/share/vm/services/runtimeService.cpp Changeset: 0414c1049f15 Author: iveresov Date: 2010-02-11 15:52 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/0414c1049f15 6923991: G1: improve scalability of RSet scanning Summary: Implemented block-based work stealing. Moved copying during the rset scanning phase to the main copying phase. Made the size of rset table depend on the region size. Reviewed-by: apetrusenko, tonyp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp ! src/share/vm/gc_implementation/g1/g1OopClosures.hpp ! src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp ! src/share/vm/gc_implementation/g1/g1RemSet.cpp ! src/share/vm/gc_implementation/g1/g1_globals.hpp ! src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp ! src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ! src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp ! src/share/vm/gc_implementation/g1/sparsePRT.cpp ! src/share/vm/gc_implementation/g1/sparsePRT.hpp ! src/share/vm/memory/cardTableModRefBS.hpp ! src/share/vm/utilities/globalDefinitions.hpp Changeset: 58add740c4ee Author: johnc Date: 2010-02-16 14:11 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/58add740c4ee Merge ! src/share/vm/includeDB_core Changeset: e7b1cc79bd25 Author: kvn Date: 2010-02-16 16:17 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/e7b1cc79bd25 6926697: "optimized" VM build failed: The type "AdapterHandlerTableIterator" is incomplete Summary: Define AdapterHandlerTableIterator class as non product instead of debug. Reviewed-by: never ! src/share/vm/runtime/sharedRuntime.cpp Changeset: 106f41e88c85 Author: never Date: 2010-02-16 20:07 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/106f41e88c85 6877221: Endless deoptimizations in OSR nmethod Reviewed-by: kvn ! src/share/vm/opto/parse1.cpp Changeset: b4b440360f1e Author: twisti Date: 2010-02-18 11:35 +0100 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/b4b440360f1e 6926782: CodeBuffer size too small after 6921352 Summary: After 6921352 the CodeBuffer size was too small. Reviewed-by: kvn, never ! src/share/vm/opto/callGenerator.cpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/compile.hpp ! src/share/vm/opto/output.cpp Changeset: 3b687c53c266 Author: twisti Date: 2010-02-18 06:54 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/3b687c53c266 6927165: Zero S/390 fixes Summary: Fixes two failures on 31-bit S/390. Reviewed-by: twisti Contributed-by: Gary Benson ! src/cpu/zero/vm/globals_zero.hpp ! src/os_cpu/linux_zero/vm/os_linux_zero.hpp Changeset: 72f1840531a4 Author: twisti Date: 2010-02-18 10:44 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/72f1840531a4 Merge Changeset: 1f341bb67b5b Author: trims Date: 2010-02-18 22:15 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/1f341bb67b5b Merge Changeset: 6c9796468b91 Author: trims Date: 2010-02-18 22:16 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/6c9796468b91 6927886: Bump the HS17 build number to 10 Summary: Update the HS17 build number to 10 Reviewed-by: jcoomes ! make/hotspot_version Changeset: 418bc80ce139 Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/418bc80ce139 Added tag jdk7-b85 for changeset 6c9796468b91 ! .hgtags Changeset: bf823ef06b4f Author: trims Date: 2010-03-08 15:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/bf823ef06b4f Added tag hs17-b10 for changeset 418bc80ce139 ! .hgtags Changeset: 4b58861a3570 Author: mikejwre Date: 2010-03-18 13:52 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/hotspot/rev/4b58861a3570 Added tag jdk7-b86 for changeset bf823ef06b4f ! .hgtags From lana.steuck at sun.com Fri Mar 19 14:35:48 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:35:48 +0000 Subject: hg: jdk7/awt/jaxp: 2 new changesets Message-ID: <20100319213548.ACFCE442D1@hg.openjdk.java.net> Changeset: 81c0f115bbe5 Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jaxp/rev/81c0f115bbe5 Added tag jdk7-b85 for changeset 6c0ccabb430d ! .hgtags Changeset: 8b493f1aa136 Author: mikejwre Date: 2010-03-18 13:52 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/jaxp/rev/8b493f1aa136 Added tag jdk7-b86 for changeset 81c0f115bbe5 ! .hgtags From lana.steuck at sun.com Fri Mar 19 14:35:56 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:35:56 +0000 Subject: hg: jdk7/awt/jaxws: 2 new changesets Message-ID: <20100319213557.3073E442D2@hg.openjdk.java.net> Changeset: 512b0e924a5a Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jaxws/rev/512b0e924a5a Added tag jdk7-b85 for changeset 8424512588ff ! .hgtags Changeset: 3febd6fab2ac Author: mikejwre Date: 2010-03-18 13:52 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/jaxws/rev/3febd6fab2ac Added tag jdk7-b86 for changeset 512b0e924a5a ! .hgtags From lana.steuck at sun.com Fri Mar 19 14:37:21 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 21:37:21 +0000 Subject: hg: jdk7/awt/jdk: 51 new changesets Message-ID: <20100319215407.2C3DC442DC@hg.openjdk.java.net> Changeset: 83c34a6b1458 Author: mchung Date: 2010-02-08 23:02 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/83c34a6b1458 6924497: HotSpotDiagnosticsMXBean.getDiagnosticOptions throws NPE Summary: Check if the element in the flags array is non-null to filter unsupported flags Reviewed-by: dcubed ! src/share/classes/sun/management/Flag.java ! src/share/native/sun/management/Flag.c Changeset: ec438f2b6886 Author: chegar Date: 2010-02-10 13:23 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/ec438f2b6886 6693244: Java Web Start app fails on 6u10 beta w/ AssertionError in AuthenticationInfo.requestCompleted Reviewed-by: michaelm ! src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java ! test/ProblemList.txt ! test/java/net/Authenticator/B4769350.java Changeset: 784e52734b8d Author: mchung Date: 2010-02-10 17:51 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/784e52734b8d 6915413: Module build: building of specified jdk components instead of all Summary: Define new SUBDIRS_* variables for specifying components for one group Reviewed-by: ohair ! make/Makefile ! make/com/Makefile ! make/com/sun/Makefile ! make/com/sun/demo/Makefile ! make/com/sun/demo/jvmti/Makefile ! make/com/sun/inputmethods/Makefile ! make/com/sun/java/Makefile ! make/com/sun/java/browser/Makefile ! make/com/sun/jmx/Makefile ! make/com/sun/jndi/Makefile ! make/com/sun/jndi/rmi/Makefile ! make/com/sun/nio/Makefile ! make/com/sun/org/Makefile ! make/com/sun/org/apache/Makefile ! make/com/sun/security/Makefile ! make/com/sun/tools/Makefile ! make/com/sun/tracing/Makefile ! make/common/Defs.gmk ! make/common/Sanity.gmk + make/common/Subdirs.gmk ! make/common/shared/Sanity.gmk ! make/java/Makefile ! make/java/hpi/Makefile ! make/java/java/Makefile ! make/java/java/genlocales.gmk ! make/java/main/Makefile ! make/java/nio/FILES_java.gmk ! make/java/nio/Makefile + make/java/nio/mxbean/Makefile ! make/java/redist/Makefile - make/java/text/FILES_java.gmk ! make/java/text/Makefile + make/java/text/base/FILES_java.gmk + make/java/text/base/Makefile + make/java/text/bidi/Makefile ! make/javax/Makefile ! make/javax/rmi/Makefile ! make/javax/sound/Makefile ! make/javax/swing/Makefile ! make/jpda/Makefile ! make/jpda/transport/Makefile ! make/mkdemo/Makefile ! make/mkdemo/applets/Makefile ! make/mkdemo/jfc/Makefile ! make/mkdemo/jni/Makefile ! make/mkdemo/jvmti/Makefile ! make/mkdemo/management/Makefile ! make/mkdemo/scripting/Makefile ! make/mksample/Makefile ! make/mksample/jmx/Makefile ! make/mksample/nio/Makefile ! make/mksample/scripting/Makefile ! make/mksample/webservices/Makefile ! make/org/Makefile ! make/org/ietf/Makefile ! make/sun/Makefile ! make/sun/cmm/Makefile ! make/sun/image/Makefile ! make/sun/management/Makefile ! make/sun/net/Makefile ! make/sun/net/spi/Makefile ! make/sun/net/spi/nameservice/Makefile ! make/sun/nio/Makefile ! make/sun/org/Makefile ! make/sun/org/mozilla/Makefile ! make/sun/rmi/Makefile ! make/sun/security/Makefile ! make/sun/tracing/Makefile ! make/tools/Makefile Changeset: d7d8807fca86 Author: weijun Date: 2010-02-12 10:24 +0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/d7d8807fca86 6925639: keytool -genkeypair -help missing dname option Reviewed-by: mullan ! src/share/classes/sun/security/tools/KeyTool.java Changeset: 74f493fae483 Author: mchung Date: 2010-02-12 11:33 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/74f493fae483 6925868: Eliminate pack200's dependency on logging Summary: Replace j.u.l.Logger with sun.util.logging.PlatformLogger Reviewed-by: alanb, forax ! src/share/classes/com/sun/java/util/jar/pack/PackageReader.java ! src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java ! src/share/classes/com/sun/java/util/jar/pack/Utils.java Changeset: 328c5d3974fe Author: mchung Date: 2010-02-15 10:18 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/328c5d3974fe Merge Changeset: 84792500750c Author: lana Date: 2010-02-17 10:24 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/84792500750c Merge Changeset: e83d9c0d5e95 Author: chegar Date: 2010-02-22 15:27 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e83d9c0d5e95 6912868: "java.net.useSystemProxies" behavior fails to check "use_same_proxy" in GNOME Reviewed-by: alanb, chegar Contributed-by: damjan.jov at gmail.com ! src/solaris/native/sun/net/spi/DefaultProxySelector.c + test/java/net/ProxySelector/SystemProxies.java Changeset: c96d6cb31723 Author: chegar Date: 2010-02-23 17:08 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/c96d6cb31723 6365587: Proxy-Connection header sent through tunnel Reviewed-by: michaelm ! src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Changeset: b396584a3e64 Author: lana Date: 2010-02-23 10:17 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/b396584a3e64 Merge - make/java/text/FILES_java.gmk Changeset: 03cd9e62961f Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/03cd9e62961f Added tag jdk7-b85 for changeset b396584a3e64 ! .hgtags Changeset: 840601ac5ab7 Author: rkennke Date: 2010-03-03 15:50 +0100 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/840601ac5ab7 6892485: Deadlock in SunGraphicsEnvironment / FontManager Summary: Synchronize on correct monitor in SunFontManager. Reviewed-by: igor, prr ! src/share/classes/sun/font/SunFontManager.java Changeset: 1d7db2d5c4c5 Author: minqi Date: 2010-03-08 11:35 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/1d7db2d5c4c5 6918065: Crash in Java2D blit loop (IntArgbToIntArgbPreSrcOverMaskBlit) in 64bit mode Reviewed-by: igor, bae ! src/share/classes/java/awt/AlphaComposite.java + test/java/awt/AlphaComposite/TestAlphaCompositeForNaN.java Changeset: 494f5e4f24da Author: lana Date: 2010-03-09 15:26 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/494f5e4f24da Merge Changeset: e64331144648 Author: rupashka Date: 2010-02-10 15:15 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e64331144648 6848475: JSlider does not display the correct value of its BoundedRangeModel Reviewed-by: peterz ! src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java + test/javax/swing/JSlider/6848475/bug6848475.java Changeset: f81c8041ccf4 Author: peytoia Date: 2010-02-11 15:58 +0900 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/f81c8041ccf4 6909002: Remove indicim.jar and thaiim.jar from JRE and move to samples if needed Reviewed-by: okutsu ! make/com/sun/Makefile Changeset: e2b58a45a426 Author: peytoia Date: 2010-02-12 14:38 +0900 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e2b58a45a426 6921289: (tz) Support tzdata2010b Reviewed-by: okutsu ! make/sun/javazic/tzdata/VERSION ! make/sun/javazic/tzdata/antarctica ! make/sun/javazic/tzdata/asia ! make/sun/javazic/tzdata/australasia ! make/sun/javazic/tzdata/europe ! make/sun/javazic/tzdata/northamerica ! make/sun/javazic/tzdata/zone.tab ! src/share/classes/sun/util/resources/TimeZoneNames.java ! src/share/classes/sun/util/resources/TimeZoneNames_de.java ! src/share/classes/sun/util/resources/TimeZoneNames_es.java ! src/share/classes/sun/util/resources/TimeZoneNames_fr.java ! src/share/classes/sun/util/resources/TimeZoneNames_it.java ! src/share/classes/sun/util/resources/TimeZoneNames_ja.java ! src/share/classes/sun/util/resources/TimeZoneNames_ko.java ! src/share/classes/sun/util/resources/TimeZoneNames_sv.java ! src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java ! src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java Changeset: e8340332745e Author: malenkov Date: 2010-02-18 17:46 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e8340332745e 4498236: RFE: Provide a toString method for PropertyChangeEvent and other classes Reviewed-by: peterz ! src/share/classes/java/beans/BeanDescriptor.java ! src/share/classes/java/beans/EventSetDescriptor.java ! src/share/classes/java/beans/FeatureDescriptor.java ! src/share/classes/java/beans/IndexedPropertyChangeEvent.java ! src/share/classes/java/beans/IndexedPropertyDescriptor.java ! src/share/classes/java/beans/MethodDescriptor.java ! src/share/classes/java/beans/PropertyChangeEvent.java ! src/share/classes/java/beans/PropertyDescriptor.java + test/java/beans/Introspector/Test4498236.java Changeset: 5c03237838e1 Author: rupashka Date: 2010-02-27 14:26 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/5c03237838e1 6913758: Specification for SynthViewportUI.paintBorder(...) should mention that this method is never called Reviewed-by: peterz ! src/share/classes/javax/swing/plaf/synth/SynthViewportUI.java Changeset: 96205ed1b196 Author: rupashka Date: 2010-02-27 14:47 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/96205ed1b196 6918447: SynthToolBarUI.setBorderToXXXX() methods don't correspond inherited spec. They do nothing. Reviewed-by: peterz ! src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java Changeset: 621e921a14cd Author: rupashka Date: 2010-02-27 15:09 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/621e921a14cd 6918861: SynthSliderUI.uninstallDefaults() is not called when UI is uninstalled Reviewed-by: malenkov ! src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java ! src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java + test/javax/swing/JSlider/6918861/bug6918861.java Changeset: 28741de0bb4a Author: rupashka Date: 2010-02-27 16:03 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/28741de0bb4a 6923305: SynthSliderUI paints the slider track when the slider's "paintTrack" property is set to false Reviewed-by: alexp ! src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java + test/javax/swing/JSlider/6923305/bug6923305.java Changeset: 2bf137beb9bd Author: rupashka Date: 2010-02-27 16:14 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/2bf137beb9bd 6929298: The SynthSliderUI#calculateTickRect method should be removed Reviewed-by: peterz ! src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java Changeset: d6b3a07c8752 Author: rupashka Date: 2010-03-03 17:57 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/d6b3a07c8752 6924059: SynthScrollBarUI.configureScrollBarColors() should have spec different from the overridden method Reviewed-by: peterz ! src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java + test/javax/swing/JScrollBar/6924059/bug6924059.java Changeset: 30c520bd148f Author: rupashka Date: 2010-03-03 20:08 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/30c520bd148f 6913768: With default SynthLookAndFeel instance installed new JTable creation leads to throwing NPE Reviewed-by: peterz ! src/share/classes/javax/swing/JTable.java ! src/share/classes/javax/swing/plaf/synth/SynthTableUI.java + test/javax/swing/JTable/6913768/bug6913768.java Changeset: f13fc955be62 Author: rupashka Date: 2010-03-03 20:53 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/f13fc955be62 6917744: JScrollPane Page Up/Down keys do not handle correctly html tables with different cells contents Reviewed-by: peterz, alexp ! src/share/classes/javax/swing/text/DefaultEditorKit.java + test/javax/swing/JEditorPane/6917744/bug6917744.java + test/javax/swing/JEditorPane/6917744/test.html Changeset: 0622086d82ac Author: malenkov Date: 2010-03-04 21:17 +0300 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/0622086d82ac 6921644: XMLEncoder generates invalid XML Reviewed-by: peterz ! src/share/classes/java/beans/XMLEncoder.java + test/java/beans/XMLEncoder/Test5023550.java + test/java/beans/XMLEncoder/Test5023557.java + test/java/beans/XMLEncoder/Test6921644.java Changeset: 79a509ac8f35 Author: lana Date: 2010-03-01 18:30 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/79a509ac8f35 Merge ! make/com/sun/Makefile - make/java/text/FILES_java.gmk Changeset: 90248595ec35 Author: lana Date: 2010-03-04 13:07 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/90248595ec35 Merge Changeset: 2fe4e72288ce Author: lana Date: 2010-03-09 15:28 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/2fe4e72288ce Merge Changeset: 38fbb2353a6a Author: alanb Date: 2010-02-23 17:56 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/38fbb2353a6a 6925977: (file) test/java/nio/file/Path/CheckPermissions.java fails if test.src on read-only file system Reviewed-by: chegar ! test/java/nio/file/Path/CheckPermissions.java Changeset: 00abf8c232be Author: alanb Date: 2010-02-23 17:58 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/00abf8c232be 6925932: (file) Path.endsWith can throw ArrayIndexOutOfBoundsException (unx) Reviewed-by: chegar ! src/solaris/classes/sun/nio/fs/UnixPath.java ! test/java/nio/file/Path/PathOps.java Changeset: be5db597f3be Author: alanb Date: 2010-02-23 18:19 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/be5db597f3be 6928960: make modules fails to build class analyzer Reviewed-by: mchung ! make/modules/tools/Makefile Changeset: e94b296b53b4 Author: alanb Date: 2010-02-23 18:21 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e94b296b53b4 6926800: TEST_BUG: java/nio/file/Files/walk_file_tree.sh fails with newer versions of find(1) Reviewed-by: forax ! test/java/nio/file/Files/PrintFileTree.java ! test/java/nio/file/Files/walk_file_tree.sh Changeset: e842e99b514a Author: darcy Date: 2010-02-24 10:48 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/e842e99b514a 6929382: Various core classes in util and elsewhere are missing @param tags Reviewed-by: dholmes, martin ! src/share/classes/java/lang/Iterable.java ! src/share/classes/java/util/Collection.java ! src/share/classes/java/util/Iterator.java ! src/share/classes/java/util/List.java Changeset: 9929203a8b98 Author: xuelei Date: 2010-02-25 13:32 +0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/9929203a8b98 6916202: More cases of invalid ldap filters accepted and processed Reviewed-by: vinnie, weijun ! src/share/classes/com/sun/jndi/ldap/Filter.java + test/com/sun/jndi/ldap/InvalidLdapFilters.java Changeset: 77beb60b39c6 Author: alanb Date: 2010-02-27 18:18 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/77beb60b39c6 6929532: (file) WatchService should avoid queuing new modify events when lots of files are changing Reviewed-by: alanb Contributed-by: sebastian.sickelmann at gmx.de ! src/share/classes/sun/nio/fs/AbstractWatchKey.java + test/java/nio/file/WatchService/LotsOfEvents.java - test/java/nio/file/WatchService/OverflowEventIsLoner.java Changeset: b77e94f5a601 Author: alanb Date: 2010-02-27 19:15 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/b77e94f5a601 6929259: Remove double spaces from Dual-pivot quicksort Reviewed-by: alanb Contributed-by: vladimir.yaroslavskiy at sun.com ! src/share/classes/java/util/DualPivotQuicksort.java Changeset: 529d2da0aee2 Author: alanb Date: 2010-02-27 19:26 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/529d2da0aee2 6815768: File.getxxxSpace() methods fail for very large file systems under 32bit Java Reviewed-by: ohair ! src/solaris/native/java/io/UnixFileSystem_md.c Changeset: f7a6eae6e1eb Author: alanb Date: 2010-02-27 19:29 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/f7a6eae6e1eb 6921374: java.lang.String::hashCode() should check for count == 0 to avoid repeated stores hash = 0 Reviewed-by: darcy, ohair ! src/share/classes/java/lang/String.java Changeset: 78d91c4223cb Author: vinnie Date: 2010-03-01 17:54 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/78d91c4223cb 6921001: api/java_security/IdentityScope/IdentityScopeTests.html#getSystemScope fails starting from b78 JDK7 Reviewed-by: mullan ! src/share/classes/java/security/IdentityScope.java ! src/share/lib/security/java.security + test/java/security/IdentityScope/NoDefaultSystemScope.java Changeset: 893034df4ec2 Author: vinnie Date: 2010-03-01 18:00 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/893034df4ec2 Merge - test/java/nio/file/WatchService/OverflowEventIsLoner.java Changeset: cddb43b12d28 Author: alanb Date: 2010-03-03 16:09 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/cddb43b12d28 6931216: TEST_BUG: test/java/nio/file/WatchService/LotsOfEvents.java failed with NPE Reviewed-by: chegar ! test/java/nio/file/WatchService/LotsOfEvents.java Changeset: 507159d8d143 Author: ohair Date: 2010-03-03 11:29 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/507159d8d143 6931763: sanity checks broken with latest cygwin, newer egrep -i option problems Reviewed-by: jjg ! make/common/shared/Sanity.gmk Changeset: 61c298558549 Author: weijun Date: 2010-03-04 10:37 +0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/61c298558549 6844909: support allow_weak_crypto in krb5.conf Reviewed-by: valeriep ! src/share/classes/sun/security/krb5/internal/crypto/EType.java + test/sun/security/krb5/etype/WeakCrypto.java + test/sun/security/krb5/etype/weakcrypto.conf Changeset: 0f383673ce31 Author: weijun Date: 2010-03-04 10:38 +0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/0f383673ce31 6923681: Jarsigner crashes during timestamping Reviewed-by: vinnie ! src/share/classes/sun/security/tools/TimestampedSigner.java Changeset: 5e15b70e6d27 Author: weijun Date: 2010-03-04 10:38 +0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/5e15b70e6d27 6880321: sun.security.provider.JavaKeyStore abuse of OOM Exception handling Reviewed-by: xuelei ! src/share/classes/sun/security/provider/JavaKeyStore.java Changeset: c2d29e5695c2 Author: lana Date: 2010-03-04 13:40 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/c2d29e5695c2 Merge Changeset: 58b44ac0b10d Author: ohair Date: 2010-03-06 14:59 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/58b44ac0b10d 6915983: testing problems, adjusting list of tests, needs some investigation Reviewed-by: alanb ! test/Makefile ! test/ProblemList.txt Changeset: eae6e9ab2606 Author: lana Date: 2010-03-09 15:29 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/eae6e9ab2606 Merge - test/java/nio/file/WatchService/OverflowEventIsLoner.java Changeset: 2cafbbe9825e Author: mikejwre Date: 2010-03-18 13:53 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/jdk/rev/2cafbbe9825e Added tag jdk7-b86 for changeset eae6e9ab2606 ! .hgtags From lana.steuck at sun.com Fri Mar 19 15:05:42 2010 From: lana.steuck at sun.com (lana.steuck at sun.com) Date: Fri, 19 Mar 2010 22:05:42 +0000 Subject: hg: jdk7/awt/langtools: 30 new changesets Message-ID: <20100319220707.9B687442E3@hg.openjdk.java.net> Changeset: 7d9e3a15d2b3 Author: jjg Date: 2010-02-15 16:09 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/7d9e3a15d2b3 6926555: 6921979 breaks TreePosTest Reviewed-by: darcy ! test/tools/javac/treepostests/TreePosTest.java Changeset: af18e3956985 Author: darcy Date: 2010-02-15 18:20 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/af18e3956985 6634138: Source generated in last round not compiled Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java ! test/tools/javac/T6403466.java + test/tools/javac/processing/6634138/Dummy.java + test/tools/javac/processing/6634138/ExerciseDependency.java + test/tools/javac/processing/6634138/T6634138.java Changeset: fe17a9dbef03 Author: darcy Date: 2010-02-15 20:06 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/fe17a9dbef03 6926699: Annotation processing regression tests should typically return SourceVersion.latest Reviewed-by: jjg ! test/tools/javac/6341866/Anno.java ! test/tools/javac/T6406771.java ! test/tools/javac/T6411379.java ! test/tools/javac/T6423583.java ! test/tools/javac/T6855236.java ! test/tools/javac/api/6421111/T6421111.java ! test/tools/javac/api/6468404/T6468404.java ! test/tools/javac/api/T6412669.java ! test/tools/javac/enum/6424358/T6424358.java ! test/tools/javac/processing/6348499/A.java ! test/tools/javac/processing/6414633/A.java ! test/tools/javac/processing/6430209/T6430209.java ! test/tools/javac/processing/6430209/b6341534.java ! test/tools/javac/processing/T6439826.java ! test/tools/javac/processing/model/element/TypeParamBounds.java ! test/tools/javac/processing/model/type/MirroredTypeEx/OverEager.java ! test/tools/javac/processing/model/type/NoTypes.java ! test/tools/javac/processing/model/util/GetTypeElemBadArg.java ! test/tools/javac/processing/model/util/OverridesSpecEx.java Changeset: 631a273dac0f Author: darcy Date: 2010-02-15 20:17 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/631a273dac0f 6926703: apt tests should run with assertions enabled Reviewed-by: jjg ! src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java Changeset: 16b9b7f45933 Author: darcy Date: 2010-02-17 14:30 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/16b9b7f45933 6927061: Refactor apt implemenation to use code from JSR 269 Reviewed-by: jjg ! src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java ! src/share/classes/com/sun/tools/apt/comp/Apt.java ! src/share/classes/com/sun/tools/apt/main/Main.java ! src/share/classes/com/sun/tools/javac/file/Paths.java ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java ! src/share/classes/com/sun/tools/javadoc/DocletInvoker.java Changeset: 67f0e05098fa Author: lana Date: 2010-02-17 10:25 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/67f0e05098fa Merge Changeset: 0fce6b64c258 Author: lana Date: 2010-02-17 16:29 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/0fce6b64c258 Merge Changeset: a3be81d385ee Author: jjg Date: 2010-02-18 15:41 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/a3be81d385ee 6927797: langtools/test/tools/javac/EarlyAssert.java fails when run with assertions enabled (-ea) Reviewed-by: darcy ! test/tools/javac/EarlyAssert.java + test/tools/javac/EarlyAssertWrapper.java Changeset: f25efdb55c99 Author: andrew Date: 2010-02-22 21:37 +0000 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/f25efdb55c99 6928623: Behaviour of VERBOSE=true on langtools build Summary: VERBOSE=true causes -diagnostics to be passed to ant rather than -debug Reviewed-by: jjg ! make/Makefile Changeset: 136bfc679462 Author: lana Date: 2010-02-23 10:17 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/136bfc679462 Merge Changeset: b816baf594e3 Author: mikejwre Date: 2010-03-04 13:50 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/b816baf594e3 Added tag jdk7-b85 for changeset 136bfc679462 ! .hgtags Changeset: 6eca0895a644 Author: jjg Date: 2010-02-23 18:43 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/6eca0895a644 6511613: javac unexpectedly doesn't fail in some cases if an annotation processor specified Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/main/JavaCompiler.java ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java ! src/share/classes/com/sun/tools/javac/util/Log.java + test/tools/javac/processing/6511613/DummyProcessor.java + test/tools/javac/processing/6511613/clss41701.java Changeset: 87eb6edd4f21 Author: jjg Date: 2010-02-25 09:42 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/87eb6edd4f21 4880220: Add a warning when accessing a static method via an reference Reviewed-by: darcy ! make/build.properties ! src/share/classes/com/sun/tools/javac/code/Lint.java ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/comp/Check.java ! src/share/classes/com/sun/tools/javac/resources/compiler.properties + test/tools/javac/4880220/T4880220.empty.out + test/tools/javac/4880220/T4880220.error.out + test/tools/javac/4880220/T4880220.java + test/tools/javac/4880220/T4880220.warn.out Changeset: 85242c273d31 Author: darcy Date: 2010-02-25 11:04 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/85242c273d31 6929645: Address various findbugs warnings in langtools Reviewed-by: jjg ! src/share/classes/com/sun/tools/apt/comp/Apt.java ! src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java ! src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java ! src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Changeset: dbcba45123cd Author: jjg Date: 2010-02-25 12:26 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/dbcba45123cd 6929544: langtools source code uses statics qualified by instance variables Reviewed-by: darcy ! make/build.properties ! src/share/classes/com/sun/tools/apt/main/CommandLine.java ! src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java ! src/share/classes/com/sun/tools/doclets/standard/Standard.java ! src/share/classes/com/sun/tools/javac/Launcher.java ! src/share/classes/com/sun/tools/javac/api/JavacTool.java ! src/share/classes/com/sun/tools/javac/code/Types.java ! src/share/classes/com/sun/tools/javac/jvm/Gen.java ! src/share/classes/com/sun/tools/javac/jvm/Items.java ! src/share/classes/com/sun/tools/javac/main/CommandLine.java ! src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Changeset: af75fd6155de Author: jjg Date: 2010-02-25 13:32 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/af75fd6155de 6893943: exit code from javah with no args is 0 Reviewed-by: darcy ! src/share/classes/com/sun/tools/javah/JavahTask.java + test/tools/javah/T6893943.java Changeset: b030706da5b4 Author: jjg Date: 2010-02-26 08:42 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/b030706da5b4 6881645: Unchecked method call on a method declared inside anonymous inner causes javac to crash Reviewed-by: mcimadamore ! src/share/classes/com/sun/tools/javac/code/Symbol.java + test/tools/javac/T6881645.java Changeset: 72833a8a6086 Author: jjg Date: 2010-02-26 15:26 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/72833a8a6086 6930076: "null" can incorrectly appear in error message compiler.err.error.reading.file Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/file/JavacFileManager.java ! src/share/classes/com/sun/tools/javac/file/Paths.java ! src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Changeset: 7b69c7083a97 Author: jjg Date: 2010-02-26 15:30 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/7b69c7083a97 6930032: fix findbugs errors in com.sun.tools.javac.comp Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/comp/Enter.java ! src/share/classes/com/sun/tools/javac/comp/TransTypes.java Changeset: 7c23bbbe0dbd Author: darcy Date: 2010-03-02 14:06 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/7c23bbbe0dbd 6931130: Remove unused AnnotationCollector code from JavacProcessingEnvironment Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java Changeset: 6e1e2738c530 Author: jjg Date: 2010-03-02 16:40 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/6e1e2738c530 6931482: minor findbugs fixes Reviewed-by: darcy ! src/share/classes/com/sun/tools/classfile/ConstantPool.java ! src/share/classes/com/sun/tools/javadoc/DocEnv.java ! src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java Changeset: 235135d61974 Author: jjg Date: 2010-03-02 16:43 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/235135d61974 6931127: strange test class files Reviewed-by: darcy ! test/tools/javac/annotations/neg/Constant.java ! test/tools/javac/generics/Casting.java ! test/tools/javac/generics/Casting3.java ! test/tools/javac/generics/Casting4.java ! test/tools/javac/generics/InnerInterface1.java ! test/tools/javac/generics/InnerInterface2.java ! test/tools/javac/generics/Multibound1.java ! test/tools/javac/generics/MultipleInheritance.java ! test/tools/javac/generics/NameOrder.java ! test/tools/javac/generics/PermuteBound.java ! test/tools/javac/generics/PrimitiveVariant.java Changeset: fc7132746501 Author: darcy Date: 2010-03-03 16:05 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/fc7132746501 6449781: TypeElement.getQualifiedName for anonymous classes returns null instead of an empty name Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java + test/tools/javac/processing/model/element/TestAnonClassNames.java + test/tools/javac/processing/model/element/TestAnonSourceNames.java Changeset: 7f5db2e8b423 Author: jjg Date: 2010-03-03 17:22 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/7f5db2e8b423 6931927: position issues with synthesized anonymous class Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java + test/tools/javac/tree/TestAnnotatedAnonClass.java + test/tools/javac/tree/TreePosTest.java - test/tools/javac/treepostests/TreePosTest.java Changeset: 117c95448ab9 Author: jjg Date: 2010-03-03 19:34 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/117c95448ab9 6931126: jtreg tests not Windows friendly Reviewed-by: darcy ! test/tools/javac/ThrowsIntersection_1.java ! test/tools/javac/ThrowsIntersection_2.java ! test/tools/javac/ThrowsIntersection_3.java ! test/tools/javac/ThrowsIntersection_4.java ! test/tools/javac/generics/NameOrder.java Changeset: c55733ceed61 Author: lana Date: 2010-03-04 13:40 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/c55733ceed61 Merge Changeset: a23282f17d0b Author: jjg Date: 2010-03-05 16:12 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/a23282f17d0b 6930108: IllegalArgumentException in AbstractDiagnosticFormatter for tools/javac/api/TestJavacTaskScanner.jav Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java ! test/tools/javac/api/TestJavacTaskScanner.java + test/tools/javac/api/TestResolveError.java Changeset: a4f3b97c8028 Author: jjg Date: 2010-03-05 16:13 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/a4f3b97c8028 Merge Changeset: ef07347428f2 Author: lana Date: 2010-03-09 15:29 -0800 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/ef07347428f2 Merge - test/tools/javac/treepostests/TreePosTest.java Changeset: 409db93d19c0 Author: mikejwre Date: 2010-03-18 13:53 -0700 URL: http://hg.openjdk.java.net/jdk7/awt/langtools/rev/409db93d19c0 Added tag jdk7-b86 for changeset ef07347428f2 ! .hgtags From Denis.Fokin at Sun.COM Mon Mar 22 00:42:14 2010 From: Denis.Fokin at Sun.COM (Denis Fokin) Date: Mon, 22 Mar 2010 10:42:14 +0300 Subject: RFE: new function in Desktop class In-Reply-To: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> References: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> Message-ID: <4BA71F56.2020008@sun.com> Hi Paulo, do you have a reference implementation or some kind of prototype? Thank you, Denis. On 3/6/10 6:48 PM, Paulo Levi wrote: > Hi. I'm using Desktop.open to open the default file explorer, by doing > File.getParent() and opening that. > > However i'd like the file(s) that interest me to open selected in the > file explorer, but as the open function is overloaded there doesn't > seem to be a way to do that? > > I'm proposing to separate the file explorer part into a separate > function call that can be called with a normal file, not only > directories, so that the files can appear selected and visible, like > any decent file explorer does. > > Can't think of a good name for the function since browse is already taken. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100322/b4096c5b/attachment.html From i30817 at gmail.com Tue Mar 23 03:54:38 2010 From: i30817 at gmail.com (Paulo Levi) Date: Tue, 23 Mar 2010 10:54:38 +0000 Subject: RFE: new function in Desktop class In-Reply-To: <4BA71F56.2020008@sun.com> References: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> <4BA71F56.2020008@sun.com> Message-ID: <212322091003230354n225d7b1exb3a610e4127260cb@mail.gmail.com> Nope. I don't have a computer that would be able to build the jdk. But it seems like it would be a function that already exists, at least partially and privately. I've meanwhile thought of a good name. public void explore(File f)? What do you think? On Mon, Mar 22, 2010 at 7:42 AM, Denis Fokin wrote: > Hi Paulo, > > do you have a reference implementation or some kind of prototype? > > Thank you, > Denis. > > On 3/6/10 6:48 PM, Paulo Levi wrote: > > Hi. I'm using Desktop.open to open the default file explorer, by doing > File.getParent() and opening that. > > However i'd like the file(s) that interest me to open selected in the file > explorer, but as the open function is overloaded there doesn't seem to be a > way to do that? > > I'm proposing to separate the file explorer part into a separate function > call that can be called with a normal file, not only directories, so that > the files can appear selected and visible, like any decent file explorer > does. > > Can't think of a good name for the function since browse is already taken. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100323/65790bb2/attachment.html From i30817 at gmail.com Tue Mar 23 04:05:13 2010 From: i30817 at gmail.com (Paulo Levi) Date: Tue, 23 Mar 2010 11:05:13 +0000 Subject: RFE: new function in Desktop class In-Reply-To: <212322091003230354n225d7b1exb3a610e4127260cb@mail.gmail.com> References: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> <4BA71F56.2020008@sun.com> <212322091003230354n225d7b1exb3a610e4127260cb@mail.gmail.com> Message-ID: <212322091003230405m6469d294mc4d763237c32d0@mail.gmail.com> Possibly public void explore(File ... f) or even public void explore(File f, File ... fs) If you'd like multiple files selected. The second signature here has complexities in the implementation, but as the code is *never* going to be hot (no one sane would open explorer windows in a loop, i don't think it matters, and it avoids a zero length file array. Or you can use the first and do nothing or throw a exception on that case. On Tue, Mar 23, 2010 at 10:54 AM, Paulo Levi wrote: > Nope. I don't have a computer that would be able to build the jdk. But it > seems like it would be a function that already exists, at least partially > and privately. I've meanwhile thought of a good name. > public void explore(File f)? > > What do you think? > > > On Mon, Mar 22, 2010 at 7:42 AM, Denis Fokin wrote: > >> Hi Paulo, >> >> do you have a reference implementation or some kind of prototype? >> >> Thank you, >> Denis. >> >> On 3/6/10 6:48 PM, Paulo Levi wrote: >> >> Hi. I'm using Desktop.open to open the default file explorer, by doing >> File.getParent() and opening that. >> >> However i'd like the file(s) that interest me to open selected in the file >> explorer, but as the open function is overloaded there doesn't seem to be a >> way to do that? >> >> I'm proposing to separate the file explorer part into a separate function >> call that can be called with a normal file, not only directories, so that >> the files can appear selected and visible, like any decent file explorer >> does. >> >> Can't think of a good name for the function since browse is already taken. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100323/f7233bb3/attachment.html From Denis.Fokin at Sun.COM Mon Mar 29 02:07:22 2010 From: Denis.Fokin at Sun.COM (Denis Fokin) Date: Mon, 29 Mar 2010 13:07:22 +0400 Subject: RFE: new function in Desktop class In-Reply-To: <212322091003230405m6469d294mc4d763237c32d0@mail.gmail.com> References: <212322091003060748g56fefd50t82df1220183f5bc6@mail.gmail.com> <4BA71F56.2020008@sun.com> <212322091003230354n225d7b1exb3a610e4127260cb@mail.gmail.com> <212322091003230405m6469d294mc4d763237c32d0@mail.gmail.com> Message-ID: <4BB06DCA.3090601@sun.com> Hi Paulo, a prototype seems more important here. If you have courage to work on this more deeply, it is great! Thank you, Denis. On 3/23/10 2:05 PM, Paulo Levi wrote: > Possibly > public void explore(File ... f) > or even > public void explore(File f, File ... fs) > If you'd like multiple files selected. > The second signature here has complexities in the implementation, but > as the code is *never* going to be hot (no one sane would open > explorer windows in a loop, i don't think it matters, and it avoids a > zero length file array. Or you can use the first and do nothing or > throw a exception on that case. > > > On Tue, Mar 23, 2010 at 10:54 AM, Paulo Levi > wrote: > > Nope. I don't have a computer that would be able to build the jdk. > But it seems like it would be a function that already exists, at > least partially and privately. I've meanwhile thought of a good name. > public void explore(File f)? > > What do you think? > > > On Mon, Mar 22, 2010 at 7:42 AM, Denis Fokin > wrote: > > Hi Paulo, > > do you have a reference implementation or some kind of prototype? > > Thank you, > Denis. > > On 3/6/10 6:48 PM, Paulo Levi wrote: >> Hi. I'm using Desktop.open to open the default file explorer, >> by doing File.getParent() and opening that. >> >> However i'd like the file(s) that interest me to open >> selected in the file explorer, but as the open function is >> overloaded there doesn't seem to be a way to do that? >> >> I'm proposing to separate the file explorer part into a >> separate function call that can be called with a normal file, >> not only directories, so that the files can appear selected >> and visible, like any decent file explorer does. >> >> Can't think of a good name for the function since browse is >> already taken. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100329/b4615e4a/attachment.html From c.cerbo at gmail.com Mon Mar 29 12:23:42 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Mon, 29 Mar 2010 21:23:42 +0200 Subject: Feedback 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) Message-ID: <6fbbec31003291223q1892c08ar9731ee583251d1fd@mail.gmail.com> Hello together, What about the patch for the bug 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros)? I think, it's time to see this effort in the OpenJDK! We started working on in on December 2009! Let me know if there are problems, Costantino From Anthony.Petrov at Sun.COM Tue Mar 30 02:35:42 2010 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Tue, 30 Mar 2010 13:35:42 +0400 Subject: Feedback 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <6fbbec31003291223q1892c08ar9731ee583251d1fd@mail.gmail.com> References: <6fbbec31003291223q1892c08ar9731ee583251d1fd@mail.gmail.com> Message-ID: <4BB1C5EE.8020500@sun.com> Hi Costantino, Some time ago I asked either you or Damjan to correct the indentation of several lines in the patch [1]. Once that is done, I would be happy to push the fix in the repository. [1] http://mail.openjdk.java.net/pipermail/awt-dev/2010-March/001210.html -- best regards, Anthony On 3/29/2010 11:23 PM Costantino Cerbo wrote: > Hello together, > > What about the patch for the bug 6913179 (The java.awt.FileDialog > should use native GTK file chooser on linux distros)? > > I think, it's time to see this effort in the OpenJDK! We started > working on in on December 2009! > > Let me know if there are problems, > Costantino From c.cerbo at gmail.com Tue Mar 30 09:06:01 2010 From: c.cerbo at gmail.com (Costantino Cerbo) Date: Tue, 30 Mar 2010 18:06:01 +0200 Subject: Feedback 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros) In-Reply-To: <4BB1C5EE.8020500@sun.com> References: <6fbbec31003291223q1892c08ar9731ee583251d1fd@mail.gmail.com> <4BB1C5EE.8020500@sun.com> Message-ID: <6fbbec31003300906w4ed7f5e8jbbeb9fb54df39fdd@mail.gmail.com> Hello Anthony, For the next weeks I'm in holiday abroad (Easter) and without my laptop. Could you please correct the indentation? I don't think to ask to much ;-) If you or some of your colleagues use Eclipse, please send us (or post on the OpenJDK site) the eclipse-formatter.xml file. Or has Netbeans too a similar configuration file? I use both IDEs. So we can avoid this kind of problems in the future. Thanks, Costantino 2010/3/30 Anthony Petrov : > Hi Costantino, > > Some time ago I asked either you or Damjan to correct the indentation of > several lines in the patch [1]. Once that is done, I would be happy to push > the fix in the repository. > > [1] http://mail.openjdk.java.net/pipermail/awt-dev/2010-March/001210.html > > -- > best regards, > Anthony > > On 3/29/2010 11:23 PM Costantino Cerbo wrote: >> >> Hello together, >> >> What about the patch for the bug 6913179 (The java.awt.FileDialog >> should use native GTK file chooser on linux distros)? >> >> I think, it's time to see this effort in the OpenJDK! We started >> working on in on December 2009! >> >> Let me know if there are problems, >> Costantino >