Hello Alexander

  This is the new webrev  with the fixed comments in the  property files.
   http://cr.openjdk.java.net/~alexsch/7093156/webrev7.01/

The *.properties files are different in the JDK7 and JDK8 because for example the JDK8 version of basic.properties file contains 2 extra properties:

  74 FileChooser.filesListAccessibleName=Files List
  75 FileChooser.filesDetailsAccessibleName=Files Details

and JDK 7 version of the metal.properties file does not contain mnemonics definition.

There were extra lines in the JDK8 webrev because they contain extra windows CRLF characters. The JDK 7 webrev now does not contain them, so the webrev is shown without extra lines.

If those lines are the only difference between the JDK8 version of the fix
I approve

Thanks
alexp


  Thanks,
  Alexandr.


On 5/2/2012 4:30 PM, Alexander Scherbatiy wrote:
On 5/2/2012 3:05 PM, Pavel Porvatov wrote:
Hi Alexander,

bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7093156
webrev: http://cr.openjdk.java.net/~alexsch/7093156/webrev7.00/

This is a request from the NLS team to backport the issue 7093156 to JDK 7. The original JDK 8 patch is rejected when it is applied to JDK 8 because the property files are slightly different between JDK 7 and JDK 8.

So the UIDefaults class is just copied to the JDK 7 and property files are regenerated.
It seems there are mistakes in the backport. For example take a look at basic.properties files...

I see that the comments about mnemonics are not updated in the properties files (I updated them manually for the JDK 8 fix).

And there are properties like FileChooser.saveDialogTitleText that are translated to FileChooser.saveDialogTitle.textAndMnemonic. The property names with the TitleText suffix do not have a special handling and just are treated as properties with the Text suffix.
      So the requests below have the same results:
System.out.println(UIManager.get("FileChooser.saveDialogTitleText")); System.out.println(UIManager.get("FileChooser.saveDialogTitle.textAndMnemonic"));

We could treat the TitleText suffixes as a separated case or leave it as is.

   Do you mean these mistakes in the basic.properties or any others?


BTW: why some diffs looks differently? E.g. in jdk8 gtk.properties contains empty lines between FileChooser properties, but jdk7 doesn't....

I opened the latest JDK 8 webrev and JDK 7 and pressed the new link near the gtk.properties and the empty lines look the same:
      http://cr.openjdk.java.net/~alexsch/7093156/webrev.03/
      http://cr.openjdk.java.net/~alexsch/7093156/webrev7.00/

However in each file there are GTK specific properties which are separated by empty lines and FILE CHOOSER STRINGS that are not.

     The same was in the original files. For example:
      GTKColorChooserPanel.hueText=Hue:
      GTKColorChooserPanel.hueMnemonic=72

      GTKColorChooserPanel.redText=Red:
      GTKColorChooserPanel.redMnemonic=69

   These properties are converted to:
     GTKColorChooserPanel.hue.textAndMnemonic=&Hue:

     GTKColorChooserPanel.red.textAndMnemonic=R&ed:
   So empty lines are preserved in all cases.

  Thanks,
  Alexandr.



Regards, Pavel

 The properties from the following folders are updated:
   src/share/classes/com/sun/java/swing/plaf/gtk
   src/share/classes/com/sun/swing/internal/plaf

According to the request from the NLS team the properties, mnemonics and mnemonic indexes are unified from the xxxText, xxxMnemonic and xxxMnemonicIndex to xxx.titleAndMnemonic (different patterns with the different suffixes are checked).

The TextAndMnemonicHashMap class is added to the UIDefaults class that now parse requested keys and returns values from the unified properties.

Thanks,
Alexandr.







Reply via email to