Parent of context menu item

Hello,

We are currently working on a VP plug-in. Sofar everything is going rather well except we ran into a little snag.

What we try to achieve is what is currently implemented with the stereotypes on classes.
Imagine a class diagram which displays a class element that has a stereotype A. The context menu of that class element (right click the diagram element) shows that this stereotype is “active” on the element by showing a “check” next to stereotype A. The functionality of showing the check is implemented by setting the value of the Action-element (in the plugin.xml file) to “toggle”. Sofar so good, that works.

However, when I want to change the stereotype of that element to say stereotype B by selecting this stereotype, the context menu of that element shows a “check” at both stereotyps A and B. This is unwanted functionality :wink: So we would like to change this. The first problem would be that it is not entirely clear to me which technology you are using for the GUI of VP. Is it AWT, Swing or another because, going through the error log of VP I think I found that VP is constructed around the JIDE Common Layer (Professional Swing Components) library for the GUI of VP, is this correct?
Also going through the Open API, it is not quite clear which parameter of the method;

public void performAction(VPAction action, VPContext vpc, ActionEvent ae) 

represents the menuitem.

Not the complete story regarding the code sample above because the VPContext represents the diagram element, that much was clear. :)

Because the errorlog of VP show that specific library, I tried casting the other two parameters to several, which made sence to me classes and hopefully get some usefull information. However this was not the case. A bit like finding the famous needle :wink:

Hope to hear from you soon.

With kind regards.

Theo