On Mon, 26 May 2025 17:18:06 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> The instructions for the `javax/swing/JFileChooser/HTMLFileName.java` test 
>> are still not as clear.
>> 
>> The file name in the instructions is rendered as HTML, which, I believe, is 
>> unexpected. It should be displayed as the plain text.
>> 
>> The instructions also say about file and directory which have HTML in their 
>> name; this was true in the initial version of the test in #24439 that 
>> created files and directories on the real file system. 
>> 
>> The final version of test uses a virtual file system that displays *three 
>> files*, there's no way to navigate.
>> 
>> I also clarified the instructions: look at how the file name of the first 
>> file is rendered in _the file pane_ and _the navigation combo box_ (**Look 
>> in** in Metal L&F).
>> 
>> In the `VirtualFileSystemView` class, I changed the name of the third file 
>> from `virtualFolder` to `virtualFile2.log`, and made the file array a field 
>> which ensures `getRoots` and `getFiles` return the same list.
>> 
>> 
>> In addition to this, I reduced the number of rows allocated for the 
>> instructions. Since the instructions are in HTML format, the number of lines 
>> of HTML code makes no sense for determining the size.
>
> Alexey Ivanov has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Correct the title of the test frames

test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 58:

> 56:                 The first file in the list has the following name:
> 57:                 <code>&lt;html&gt;&lt;h1 color=#ff00ff&gt;&lt;font
> 58:                 face="Comic Sans MS"&gt;Swing Rocks!</code>

I almost said this last time, but I think the instructions should use a 
different font name.
On linux this will always just fall back to Dialog because this font doesn't 
exist.
Better to just use "Serif".

test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 128:

> 126:         jfc.setControlButtonsAreShown(false);
> 127: 
> 128:         JFrame frame = new JFrame((!htmlEnabled) ? "HTML enabled" : 
> "HTML disabled");

I think this stems from a conflict in the name of the property (html.disable) 
and the variable (htmlEnabled)
I suggest to rename the variable to htmlDisabled and re-organise the 
constructor line to
JFrame frame = new JFrame((htmlDisabled) ? "HTML disabled" : "HTML enabled");

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25455#discussion_r2119505070
PR Review Comment: https://git.openjdk.org/jdk/pull/25455#discussion_r2119504775

Reply via email to