RFR: 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors [v4]

Jie Kang jkang at openjdk.java.net
Thu Aug 19 20:48:29 UTC 2021


On Thu, 19 Aug 2021 20:37:24 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> application/org.openjdk.jmc.rjmx.ui/META-INF/MANIFEST.MF line 19:
>> 
>>> 17:    org.openjdk.jmc.console.ui.mbeanbrowser.uitest,
>>> 18:    org.openjdk.jmc.test.jemmy",
>>> 19:  org.openjdk.jmc.rjmx.ui.celleditors;x-friends:="org.openjdk.jmc.console.ui.mbeanbrowser,org.openjdk.jmc.flightrecorder.ui",
>> 
>> It would be very nice if this dependency from rjmx.ui to flightrecorder.ui was not needed.
>
> I took another look into this, and I'm not quite sure where it makes sense to fix this.
> 
> This dependency happened because `FilterEditor` (currently in jmc.ui.misc) requires celleditors. `FilterEditor` is also only used in flightrecorder.ui.
> 
> rjmx.ui has a dependency on jmc.ui. If celleditors moves into rjmx.ui like this and the issue suggests, then FitlerEditor needs to move because it would rely on a cyclic dependency back onto rjmx.ui.
> 
> In this case, to have no introduced dependencies `FilterEditor` would need to move to a package that both imports rjmx.ui, and is imported by flightrecorder.ui.. which isn't any I believe. FilterEditor could be moved into something like jmc.console and add that dependency on flightrecorder.ui, but I'm not sure there's a happy path here.
> 
> In a different approach, celleditors could be consolidated into jmc.ui.celleditors instead and keep FilterEditor in jmc.ui.misc. This would require a rjmx.subscription.internal rjmx.services be made available to jmc.ui.celleditors, and a jmc.rjmx dependency added onto jmc.ui. I have a branch here that gives that a try: https://github.com/aptmac/jmc/commit/90c54f202ab19ad2dbf4fdc198feaf6dd1e6d2d3

Would you be able to do a quick text diagram of the dependency chain? Like 

a->b->c
d->c
...


Is there a parent `org.openjdk.jmc.ui` where any shared classes for `rjmx.ui` and `flightrecorder.ui` can go?

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

PR: https://git.openjdk.java.net/jmc/pull/271


More information about the jmc-dev mailing list