Fitting two plugins in the same JPanel #4464
Replies: 1 comment
-
Each plugin is meant to be a stand-alone unit. Each component provider (the display part) is meant to be dockable anywhere in the tool window or in a new window. Also, the lifecycle of plugins is managed by the framework. If you create them yourself, as you have shown above, then you will end up with multiple instances of the plugin in the tool. The result of doing this is untested. It is not clear how you intend to use the code above. If you are simply trying to change the arrangement of plugins in the exiting Ghidra tool, then we do not support your use case above. If you are trying to create a new plugin that uses the functionality of the plugins mentioned above, in a new and independent manner, then you will have the best chance of success at copying the parts you need and adding all of that code to your own plugin. In this setup, there will be only one plugin that manages all the code you provide and that which was taken from the exiting plugins. The graph viewer code is relatively simple and should be easy to take and modify as you need. Contrastingly, the Byte Viewer code is one of the most complicated packages in the system. Copy and modifying that code will require a great deal of mastery. |
Beta Was this translation helpful? Give feedback.
-
Quickly to preface, I have this partially implemented, it just isn't really checking the whole box I want it to.
So I want to place the ByteViewer in the same pane as a graph viewer as shown here:
The problem I'm running into is that when I call the plugin for the ByteViewer it is overriding my main plugin, and also apparently creating several other unintended ByteViewers in the toolbad. I've provided the code for my main plugin constructor, the provider I'm calling the above panel in (Its a graph provider), and the function that its being placed in at.
So from what I've been able to mess around with this is the best I was able to get it up and running with, aside from just remaking all the classes I need and putting them in my own package. Since the graph and byte viewer are so different in their implementation I think that remaking the classes might be the way I need to do it, but I was just curious if I had overlooked something.
Beta Was this translation helpful? Give feedback.
All reactions