Access model through Eclipse plug-in

Hello,
I wrote a plug-in for VP-UML and had it working successfully. It uses the openapi classes to expose model and diagram details. I’d like to use SDE-EC instead of VP-UML, and am trying to port my plug-in to Eclipse. Admittedly, I am pretty new to plug-in development. I’m starting with the very simple ‘Hello World’ plug-in as a starting point. This means that my Eclipse action class implements IWorkbenchWindowActionDelegate, whereas my VP-UML action class implements VPActionController. I’m pretty sure that this is dictated by the extension point declared by VP-UML. Anyway, I don’t get very far with the new approach, as I can’t get a real object from the com.vp.plugin.ApplicationManager.instance() method.
Is there some detailed documentation on how to go about this correctly?
Thanks very much -

Brian.

Hi Brian,

Could you send me your plugin, and let me know where did you put the plugins folder at? We would like to test your plugin and find out the problem for you.

You can send to my email address:
jick@visual-paradigm.com

Best regards,
Jick

Hi Jick,
I tried sending this as an email, but it was bounced. No matter, here’s the content of the message:
Thanks for the help with this plugin issue. I made an effort to provide a minimal example for you and perform a sanity check of my approach. I found a post elsewhere that indicated that I should be able to deploy my VP-UML plugin without modification as a plugin in SDE rather than writing a plugin specifically
for Eclipse. So I downloaded one of the sample plugins provided by VP (http://www.visual-paradigm.com/edocs.jsp?url=content/product/extend/samplePlugin/vp_menuitem_plugin.zip&resourceType=document&resourceDetail=pluginUserGuide). I first deployed it in VP-UML, which worked as expected. I then deployed
it in /sde/plugins as suggested by the other post I read. What I expected to see was a new menu item in Eclipse called 'Sample Menu 1.'
After ensuring that SDE was loaded in my Eclipse session, I saw no new menu items at all, and this corresponds to the behavior I see with my custom plugin… it works in VP-UML, but not in SDE.
Thanks again for the help :wink:
Brian.

Hi Jick,
Just for completeness, I should say that I’m running in Eclipse 3.2.1.
I had a look in vp.log, which I’ve seen you ask others to do and found this:

[Sun Nov 19 15:46:58 MST 2006] [message] [ Sun Nov 19 15:46:58 MST 2006]: Start Smart Development Environment Professional Edition for Eclipse [SDE PE-EC]: 3.3 (sp3_20061111)
[Sun Nov 19 15:47:02 MST 2006] [message] Installation properties: C:\eclipse\sde.vpsuite_installation.properties
[Sun Nov 19 15:47:04 MST 2006] [error] cannot call load_setCodeSignature(…) here

Ever seen this error before?

Regards -

Brian.

Hi Brian,

Sorry for my late reply.

Plugin in SDE can only add items to the popup menu that appear when right-clicking on the diagram. The menus and toolbars of the IDE cannot not be changed. Sorry about this.

Best regards,
Jick

Hi Jick,
No worries :wink: Even bad news can be useful. I guess I’ll try to use the context-sensitive menus, or maybe a hot-key-triggered action.

Thanks again -

Brian.

Hi Brian,

Thanks for your post. Oh by the way, may I know what your plug-in does? If what you want is beneficial to most users, we can perhaps support you need.

Best regards,
Jick

Hi Jick,
I really appreciate your helpfullness so far, and am impressed with the offer to help even more. Thanks very much.
I’m doubtful that my plugin will be that helpful to a larger audience, though. I’m a blind developer, and have gotten to the point where not being able to read and write diagrams is a serious problem. I decided to try to adapt a
UML tool - VP is the top choice so far - to allow me to join the world of UML. There is likely to be a small group of blind developers interested in such a thing, but not many.
All the plugin does at the moment is present diagrams and diagram elements in a series of list-boxes. I have just the beginnings of some code that allows diagram elements to be edited and saved to the diagram as well. This alternative UI is all java. It’s pretty exploratory in nature at the moment. I’m still trying to decide how best to skin this cat.
Do you know if anything like this has been tried before? I’ve read about other plugins being written to dump diagrams into databases and reload them, which has some similar functionality.

Thanks again -

Brian.

Hi Brian,

Sorry for the late reply. Besides plugin, have you tried the Import/Export feature? I thought you knew what XML is. The XML exported from our tools are well structured. You can find all the information of models easily. Although I am not 100% clear about your need, I think XML export/import can be an alternative for you.

To export XML, select Files > Export > XML… from the main menu

Best regards,
Jick

Hi Jick,
I actually started this effort by trying to work with XMI. A couple of problems with this approach. First, it doesn’t allow me to colaborate with sighted peers when working with a model. I’d like to be able to make changes that they can see, and have them make changes that I can see/hear, all in real time. Also, working with the XML doesn’t allow me to use the features of VP during the editing session. I’d have to make edits and then import before trying something like a code gen. Ultimately, I want to have the plugin provide spoken feedback as I browse the diagrams, thus doing away with this set of list boxes. As I said, this is just an exploratory effort for the moment. If I can reasonably determine that thhis approach will work with SDE for Eclipse, I’ll buy a copy :wink:

Regards,

Brian.