To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.

How can I show all my plugins here

hi, i met some problems while developing the plugin. When I selected "view"(i don't know the name of it, the icon that looks like an eye), then there is a Drop-down box(By default, it is displayed as the one of "select visualization..."). How could I display all my plugins in the drop-down box? Or could you please provide me with the source code of the drop-down box so I can study it?

Comments

  • Hi,

    This drop-down box contains all visualizer plug-ins for the selected resource, that is, all plug-ins that:
    1. have the "@Visualizer" annotation and
    2. accept the selected resource as input.
    If use ResourceClass as the name the class of the selected resource, then the following plug-in should be listed in this drop-down box:

    @Plugin(name = "Visualize Resource", level = PluginLevel.Regular, returnLabels = { "Visualized Resource" }, returnTypes = { JComponent.class }, parameterLabels = { "Resource" }, userAccessible = true)
    @Visualizer
    public class VisualizeResourcePlugin {

        @PluginVariant(requiredParameterLabels = { 0 })
    public static JComponent visualize(UIPluginContext context, ResourceClass resource) {
            // Return a JComponent visualizing the resource.
        }
    }

    Kind regards,
    Eric.
  • I got it! thanks!
Sign In or Register to comment.