Is there a way to print all the configuration options for griffon?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to print all the configuration options for griffon?

Marcelo
Hi,

I would like to know if there is a way to print all the configuration options for Griffon. For example, testFx is configured by a GriffonTestFXClassRule. Are there configuration options for it? Can I force the displayed stages to be "Always on Top" when I am debugging?

Something similar to how we print all the Java's System Properties, but for Griffon:

Properties p = System.getProperties();
Enumeration keys = p.keys();
while (keys.hasMoreElements()) {
    String key = (String)keys.nextElement();
    String value = (String)p.get(key);
    System.out.println(key + ": " + value);
}

Thanks!

Marcelo.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

aalmiray
Administrator
As far as I can tell Griffon uses a very limited set of System properties at runtime, these are mostly related to exception handling.

In griffon.core.ExceptionHandler you find

* griffon.full.stacktrace: whether to filter out stacktraces or not. Defaults to true.
* griffon.exception.output: print out stacktraces to console. Defaults to false.

In griffon.core.GriffonExceptionHandler you find

* griffon.sanitized.stacktraces: comma separated list of packages to filter out in from stacktraces.

In griffon.core.env.Environment you find

* griffon.env: defines the current environment. Defaults to dev.

Any other settings are read directly from the application's Configuration. None of the Griffon @Rule classes require additional System properties nor magic properties. Either additional configuration is supplied at the time of creation of the Rule or it comes from the application's configuration.

Filed https://github.com/griffon/griffon/issues/204

Cheers,
Andres
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

Marcelo
Hi Andres,

Is there a chance that all the griffon (framework and plugins) configuration could be also included in that documentation?. I think it will be great to have one place to go if a developer has to learn about the different configuration options.
Thanks!

Marcelo.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

aalmiray
Administrator
Hmm putting all plugin configuration options in a single place would be difficult, considering that each plugin has its own release cycle separate from each other and Griffon. At the very least every plugin repository provides a link to the plugin's guide.

Cheers,
Andres
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

Marcelo
Hi Andres,

I understand. The configuration for each plugin in its own page is enough.

I am having a hard time learning the different configuration options for the framework.
I tried to print all the configuration with the following code in the Ready hook, but the only keys I see are the ones defined in the configuration.

        application.getConfiguration().asFlatMap().forEach((key, value) -> {
            System.out.println("Key = " + key);
            System.out.println("Value = " + value.toString());
            System.out.println("");
        });

That prints:

Key = application | Value = {title=testApp, autoShutdown=true}
Key = application.title | Value = testApp
Key = application.autoShutdown | Value = true
Key = windowManager | Value = {startingWindow=**none**}
Key = windowManager.startingWindow | Value = **none**

Where can I learn about them?
Thanks,

Marcelo.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

aalmiray
Administrator
I see.

Section 8.1.2 discusses `WindowManager.startingWindow`. Section 8.1.1 discusses the WindoManager DSL. Other sections such as the MVC chapter and 8.2.2 show different options for the `mvcGroups` section of the configuration. But there's no mention of `application.title` nor `application.autoShutdown` in the guide. We'll fix this for the next release of course.

However there are not that many configuration options IIRC. This is by design as the behavior of core components can be overridden by supplying a matching binding for a particular type. You may for example provide a different implementation of the WindowManager that may or may not honor the WindowManager DSL.

Cheers,
Andres
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to print all the configuration options for griffon?

Marcelo
Hi Andres,

Thanks for the answer. I read the guide and I did notice what you mentioned. The fact that those two properties weren't discussed made me think there were other properties that were not discussed in the guide and I wanted to learn about them.

Marcelo.