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

Alex Macdonald aptmac at openjdk.java.net
Thu Aug 19 20:40:31 UTC 2021


On Wed, 18 Aug 2021 17:55:54 GMT, Marcus Hirt <hirt at openjdk.org> wrote:

>> Alex Macdonald has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>> 
>>  - update license headers
>>  - 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors
>
> 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

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

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


More information about the jmc-dev mailing list