Debug in Eclipse with SysML

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Debug in Eclipse with SysML

Postby boris_h » Wed Jan 04, 2017 9:47 am

Hallo,

I am tyring to debug a plugin from eclipse with the SysML plugin loaded hwoever it fails to load. Among the messages in Eclipse i got the following one: Can not start SysML v18.4 SP1 Reason: Required plugin "com.nomagic.requirements" not found.
I have added the following jars to the classpath:

  • requirements.jar
  • requirements_api.jar
  • sysml.jar
  • sysml_api.jar
but this doesn't seem to work.
We are using a floating license and SysML is checked as feature and also shown as "installed" within the "Resource/Plugin Manager"

I am unable to create SysML projects (template is visible but I cannot enter a project name as the text field is greyed out) and I am also unable to open SysML diagrams in existing models (like an ibd).

What am I missing?

Kind regards.
boris_h
Forum Beginner
Forum Beginner
 
Posts: 39
Posts Rating:1
Joined: Tue May 17, 2016 8:26 am

Re: Debug in Eclipse with SysML

Postby Rolandas » Fri Jan 06, 2017 4:31 am

You also need: Document Modeling plugin, as SysML plugin depends on it too.
mbr.jar
mbr_api.jar

and one thing, you need to make sure that those 2 plugins start (are initialized) before SysML plugin. You can find what plugin, depends from what in there directory in MagicDraw, plugin.xml file.

Regards,
No Magic Support Team
Rolandas
Customer Support
Customer Support
 
Posts: 115
Posts Rating:3
Joined: Mon Jul 30, 2012 3:59 am

Re: Debug in Eclipse with SysML

Postby boris_h » Fri Jan 06, 2017 6:00 am

Hello,

I am still unable to get it running. This seems to be somwhat of a dependency hell.
If have added mbr.jar as well as mbr_api.jar as well as a load of other stuff that was referenced in all the plugin.xml files.

How do I specify the order in which plugins are started? It is not the export order, is it? It seems as if mbr is started after requirements. (Both fail to start from classes that are missing).
boris_h
Forum Beginner
Forum Beginner
 
Posts: 39
Posts Rating:1
Joined: Tue May 17, 2016 8:26 am

Re: Debug in Eclipse with SysML

Postby Rolandas » Fri Jan 06, 2017 6:22 am

Hello,

You should try adding dependencies in your project. That SysML depends on Requirement and so on. As i'm not working with Eclipse.

Regards,
No Magic Support Team
Rolandas
Customer Support
Customer Support
 
Posts: 115
Posts Rating:3
Joined: Mon Jul 30, 2012 3:59 am

Re: Debug in Eclipse with SysML

Postby boris_h » Tue Jan 10, 2017 6:17 am

Rolandas wrote:Hello,

[...]As i'm not working with Eclipse.[...]


Hello,

What would you recomend then? InelliJ?

Kind regads.
boris_h
Forum Beginner
Forum Beginner
 
Posts: 39
Posts Rating:1
Joined: Tue May 17, 2016 8:26 am

Re: Debug in Eclipse with SysML

Postby Rolandas » Tue Jan 10, 2017 6:56 am

Hello,

Any tool will be ok, you just need to set the dependencies for loading one jar first, then another in order.

I think you need:
http://help.eclipse.org/neon/index.jsp? ... d-path.htm
In the Build class path order list, you can click the Up and Down buttons to move the selected path entry up or down in the build path order for this new project.

Regards,
No Magic Support Team
Rolandas
Customer Support
Customer Support
 
Posts: 115
Posts Rating:3
Joined: Mon Jul 30, 2012 3:59 am

Re: Debug in Eclipse with SysML

Postby boris_h » Tue Jan 10, 2017 9:45 am

The SysML plugin still fails to start because the following class cannot be found: com.nomagic.reports.requirement.RequirementProvider. I am unable to find it.

What I don't understand: When using the default eclipse project as provided with MD running MD from within Eclipse works just fine and the SysML plugin is loaded (presumably from the paths specified vie the md.plugins.dir variable). Why does the plugin loading get messed up by adding a jar file to the build path? I don't understand the machanism behind it.

Edit: I found it in webreport_api.jar and got it working, finally. However my question on how the mechanism behind this works is still valid.

Thanks.
boris_h
Forum Beginner
Forum Beginner
 
Posts: 39
Posts Rating:1
Joined: Tue May 17, 2016 8:26 am

Re: Debug in Eclipse with SysML

Postby Rolandas » Wed Jan 11, 2017 1:51 am

Hello,

When you add a jar file in build path, it needs to have the needed dependencies. As MD has it predefined to run from Eclipse, but when you add new jar you need to ensure the order and dependencies of it.

Regards,
No Magic Support Team
Rolandas
Customer Support
Customer Support
 
Posts: 115
Posts Rating:3
Joined: Mon Jul 30, 2012 3:59 am


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 1 guest