0

I am having trouble configurating Eclipse for MD 18.3 plugin development.

I have thoroughly followed the "MagicDraw 18.3 Developer Guide / Development in Eclipse" tutorial you can find inside MagicDraw\openapi section to set up Eclipse.

When launching MagicDraw with all plugins run configuration, it throws the following error and terminates:

!ENTRY org.eclipse.core.variables 4 120 2016-07-20 10:39:12.159 !MESSAGE Reference to undefined variable file_uri

caused by this line of the run configuration

-Dosgi.framework.extensions=reference:${file_uri:${workspace_loc:/MagicDraw/MAGIC_DRAW_INSTALL_DIRECTORY/lib/bundles}}/com.nomagic.magicdraw.osgi.fragment

However, \lib\bundles\com.nomagic.magicdraw.osgi.fragment_1.0.0.201601271815.jar is existing

I'm running the demo license, but that shouldn't influence the configuration. Any suggestions?

UPDATE

Solved this issue, by replacing reference:${file_uri:${workspace_loc:/MagicDraw/MAGIC_DRAW_INSTALL_DIRECTORY/lib/bundles}}/com.nomagic.magicdraw.osgi.fragment with the actual path and enabling com.nomagic.magicdraw.platform.feature in the bundles tab of the run configuration.

Next Problem: The provided example plugins won't load, throwing

java.lang.NullPointerException at com.nomagic.magicdraw.plugins.XMLPluginDescriptorLoader.loadPluginDescriptorData(XMLPluginDescriptorLoader.java:172)

and therefore

ERROR PLUGINS - Failed to create plugin: My Plug-in 2
java.lang.ClassNotFoundException: myplugin2.MyPlugin2

Same message for both, the example plugins and my own plugin. I have checked the plugin.xml files and also experimentally enabled the run configurations > bundles > workspace checkbox.

pad
  • 33
  • 6
  • Eclipse doesn't like `${file_uri`, what is telling you to use that? – greg-449 Jul 20 '16 at 10:00
  • It is part of the .launch configuration file, which I am told to use by the tutorial. – pad Jul 20 '16 at 10:07
  • Give us a link to where this is in the tutorial, I am not going to find it and read it all. – greg-449 Jul 20 '16 at 10:11
  • [development in Eclipse](http://docs.nomagic.com/display/MD184/Development+in+Eclipse) is for MD 18.4 beta but it is the same as for 18.3. When you follow the tutorial, the ambiguous .launch file is located inside the _MagicDraw with all plugins_ folder. – pad Jul 20 '16 at 12:14
  • Did a partial fix by replacing the reference by the actual path. MD starts now, but it is not able to create or open a project.. – pad Jul 20 '16 at 14:23
  • .. throwing ```java.lang.ExceptionInInitializerError at com.nomagic.uml2.impl.magicdraw.auxiliaryconstructs.mdmodels.ModelClassImpl.createModel(ModelClassImpl.java:85) ... ``` maybe this Question is going into another direction – pad Jul 20 '16 at 14:33
  • Are you aware that you can email support@nomagic.com? – Jim L. Jul 21 '16 at 02:25

2 Answers2

0

Try to edit this line:

- Dosgi.framework.extensions=com.nomagic.magicdraw.osgi.fragment
yoho_yoho
  • 1
  • 1
  • Did a partial fix by replacing the reference by the actual path. MD starts now, but it is not able to create or open a project.. – pad Jul 21 '16 at 16:12
0

Setting up a new clean Eclipse installation solved everything.

pad
  • 33
  • 6