Re: RFR: 8301302: Platform preferences API [v5]

2023-11-17 Thread Kevin Rushforth
On Wed, 6 Sep 2023 18:02:31 GMT, Kevin Rushforth wrote: >> +1 >> >> we could put the doc (in markdown format) in the doc-files/platform >> directory (or create any other subdirectory, see JDK-8309749) > > I think Michael meant that the javadoc-generated API docs in this file need > to be kept

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-08 Thread Andy Goryachev
On Fri, 8 Sep 2023 16:50:25 GMT, Michael Strauß wrote: >> if that's the case, isn't it possible to have the same key added at runtime? >> this scenario cannot be handled by the current code, as far as I can tell. > > I'm not sure if I understand what you mean that the same key can be added at

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-08 Thread Michael Strauß
On Fri, 8 Sep 2023 14:31:07 GMT, Andy Goryachev wrote: >> Looks like I spoke too soon. Mappings can actually be removed at runtime, >> one such example is `Windows.SPI.HighContrastColorScheme`, which is only >> available if `Windows.SPI.HighContrast` is `true`. >> >> This doesn't change the `C

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-08 Thread Andy Goryachev
On Fri, 8 Sep 2023 05:16:35 GMT, Michael Strauß wrote: >> The set of preferences that is reported by a platform is hard-coded in the >> native platform implementation, and depends on the operating system version. >> It might indeed be the case that an OS upgrade/downgrade could result in a >>

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-07 Thread Michael Strauß
On Tue, 5 Sep 2023 23:27:51 GMT, Michael Strauß wrote: >> is it actually possible to have keys removed at runtime? > > The set of preferences that is reported by a platform is hard-coded in the > native platform implementation, and depends on the operating system version. > It might indeed be t

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-06 Thread Kevin Rushforth
On Tue, 5 Sep 2023 23:35:04 GMT, Andy Goryachev wrote: >> I think we should indeed document _all_ possible preferences for the >> platform toolkit implementations we control. Of course, this means that we >> need to keep this list in sync with the actual implementation. > > +1 > > we could put

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-06 Thread Andy Goryachev
On Wed, 6 Sep 2023 00:01:29 GMT, Michael Strauß wrote: >> would it make sense to add this explanation to javadoc, even though it's not >> a public API? > > I've added the following sentence: > > Callers should assume that the returned map is immutable, while > implementations should > either r

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-06 Thread Andy Goryachev
On Wed, 6 Sep 2023 00:05:58 GMT, Michael Strauß wrote: >> one [possible] use case is when different versions of the native platform >> have different types (int32/int64 ?). >> or, if the property value is String with the semantics of an integer. >> >> Of course, the app dev can always request a

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 23:27:44 GMT, Andy Goryachev wrote: >> It is documented in the `Platform.Preferences` interface, which is >> implemented by this class: >> >> >> /** >> * Returns the value to which the specified key is mapped. >> * >> * @param the type of

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:56:56 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/test/java/test/com/sun/javafx/applica

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 23:18:22 GMT, Andy Goryachev wrote: >> No. This map is only used by `QuantumToolkit` to initialize the preferences. >> The implementation should not keep this map around, and an immutability >> guarantee might be seen as an invitation to do so. > > would it make sense to add

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 21:37:38 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/javafx/application/Platform

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 23:30:39 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line >> 466: >> >>> 464: * so applications should not assume that a particular preference >>> is always available. >>> 465: * >>> 466: * The followin

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 23:21:18 GMT, Andy Goryachev wrote: >> It doesn't handle _removals_ of keys in `current`, which is explained in the >> method documentation: >> >> "Returns a map that contains the _new or changed_ mappings of _current_ >> compared to _old_. >> A value has changed if _Objects

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 20:21:54 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/javafx/application/Platfor

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 23:07:03 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PlatformPreferences.java >> line 112: >> >>> 110: } >>> 111: >>> 112: throw new IllegalArgumentException( >> >> should this behavior be docume

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 20:16:45 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/javafx/application/Application.java >> line 35: >> >>> 33: import javafx.css.Stylesheet; >>> 34: import javafx.scene.Scene; >>> 35: import javafx.scene.paint.Color; >> >> strictly speaking, this fi

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 22:51:28 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/glass/ui/Application.java line >> 762: >> >>> 760: */ >>> 761: public Map getPlatformPreferences() { >>> 762: return Map.of(); >> >> Should javadoc explicitly proclaim that

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:30:30 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/com/sun/javafx/application/

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:26:50 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/com/sun/javafx/application/

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:21:39 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/com/sun/javafx/application/

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:18:04 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/com/sun/javafx/application/

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Michael Strauß
On Tue, 5 Sep 2023 19:11:20 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/com/sun/glass/ui/Applicatio

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 00:55:44 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 21:31:23 GMT, Kevin Rushforth wrote: >> All I actually want is a link to the platform keys, not to the Properties >> class per se. >> Perhaps something similar to what String.format() does. > > Hmm, maybe. In that case, the description seems the best place for that sort > o

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Kevin Rushforth
On Tue, 5 Sep 2023 21:12:09 GMT, Andy Goryachev wrote: >> Yes, I know that `{@code}` shows up in monospace font, while `{@link}` >> provides the link. It does that in the javadoc-generated API docs, too. >> >> What I meant by my comment is that since the method in question returns a >> `Prefer

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 21:06:38 GMT, Kevin Rushforth wrote: >> not in Eclipse. {@code} shows up in monospace font, while {@link} provides >> the link: >> >> > src="https://github.com/openjdk/jfx/assets/107069028/e7e39445-226a-48b2-8154-429e66683243";> > > Yes, I know that `{@code}` shows up in mon

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Kevin Rushforth
On Tue, 5 Sep 2023 20:44:19 GMT, Andy Goryachev wrote: >> I think there is no need to make this a link, since the return type of the >> method already provides the link. > > not in Eclipse. {@code} shows up in monospace font, while {@link} provides > the link: > > src="https://github.com/ope

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 20:19:11 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line >> 448: >> >>> 446: * by JavaFX when the operating system reports that a platform >>> preference has changed. >>> 447: * >>> 448: * @return the

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Kevin Rushforth
On Tue, 5 Sep 2023 19:41:33 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed application preferences implementation > > modules/javafx.graphics/src/main/java/javafx/application/Applicat

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Kevin Rushforth
On Tue, 5 Sep 2023 00:55:44 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-05 Thread Andy Goryachev
On Tue, 5 Sep 2023 00:55:44 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v5]

2023-09-04 Thread Michael Strauß
> Please read [this > document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) for > an introduction to the Platform Preferences API, and how it interacts with > the proposed style theme and stage appearance features. Michael Strauß has updated the pull request incrementally wi