Changes between Initial Version and Version 4 of Ticket #20456


Ignore:
Timestamp:
2021-02-21T17:41:34+01:00 (5 years ago)
Author:
Don-vip
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20456

    • Property Milestone 21.0121.02
    • Property Summary Classloader problem with loading look and feel from plugin (FlatLaf)[Patch] Classloader problem with loading look and feel from plugin (FlatLaf)
  • Ticket #20456 – Description

    initial v4  
    66
    77Both classloaders include the laf plugin jar (`flatlaf.jar` in my case).
    8 So it seems to work, but FlatLaf can not find the properties files in the plugin
    9 and JOSM specific colors and UI delegates are missing.
     8So it seems to work, but FlatLaf can not find the properties files in the plugin and JOSM specific colors and UI delegates are missing.
    109
    11 The necessary information to load plugin properties files
    12 is stored in a static variable in class `FlatLaf`.
    13 Because class `FlatLaf` is loaded into two classloaders,
    14 there are **two** instances of the static variable.
     10The necessary information to load plugin properties files is stored in a static variable in class `FlatLaf`.
     11Because class `FlatLaf` is loaded into two classloaders, there are **two** instances of the static variable.
    1512
    16 The static variable is set in `FlatLafPlugin` constructor
    17 by invoking `FlatLaf.registerCustomDefaultsSource()`.
     13The static variable is set in `FlatLafPlugin` constructor by invoking `FlatLaf.registerCustomDefaultsSource()`.
    1814This is done with a `PluginClassLoader`.
    1915
    20 Later when the laf is initialized with `UIManager.setLookAndFeel()`,
    21 this static variable is `null` because this is done in `DynamicURLClassLoader`.
     16Later when the laf is initialized with `UIManager.setLookAndFeel()`, this static variable is `null` because this is done in `DynamicURLClassLoader`.
    2217
    2318Tried to workaround this without success.
    2419
    25 The reason for the different classloaders is that
    26 `PluginHandler.getResourceClassLoaders()` is used
    27 in `MainApplication.setupUIManager()` to find/load the laf class from a plugin.
     20The reason for the different classloaders is that `PluginHandler.getResourceClassLoaders()` is used in `MainApplication.setupUIManager()` to find/load the laf class from a plugin.
    2821
    2922See: