lightbulb-o [Solved] Where can I find the modelio API

6 years 8 months ago #1767 by ebr
Hi Heng,

The best and simplest way to extend Modelio is by developping a Modelio Module which does not seems to be your case, right!?
Did you use the Ant Template or the MAven archetype for creating your java project?

Concerning your latest post, can share with us your code?

Regards,

EBR

Please Log in or Create an account to join the conversation.

6 years 8 months ago - 6 years 8 months ago #1769 by Heng
Hi ebr,
do I have to use Archetype to create my Maven project?

I dont want to develop a Module. I just want simply to access the Content in an opened Modelio Project, like Class Diagram and the attribute.

So far I have only created a Maven Project in eclipse without Archetype of Modelio, and imported modelio.jar modelapi.jar to the Build path.

(Some how I cant upload my Project)



And I start the Modelio,open a Project. In the Script of Modelio
The following variables are accessible:
- IModelingSession modelingSession : the opened session
- Collection<IElement> selectedElements : the selected elements list
- ISelection selection: The Eclipse selection

modelingSession.getModel().getRoot() gives access to the root package.

So I thought, that now I can access the Content of the Modelio project in my Maven
Project. Like the last Post, I have tried first get the session first. But apparently I cant catch the singleton instance of Modelio,and that causes Nullpointer Exception.

And I dont know, what exactly I should do now.

Excuse me for my inexperienced questions.

Best Regards

Please Log in or Create an account to join the conversation.

6 years 8 months ago - 6 years 8 months ago #1770 by ebr
Hi again Heng,

I guess it would be better by clarify a little your options for accessing to the content of a Modelio project.
  1. With your own Modelio.
  2. With a Modelio Module.
  3. With a Jython script.

The first of option is the most powerful, you have access to all information (more than "just" the Modelio API) but of course is also a lot of work to build a Eclipse RCP with all these plugins, dependencies, etc.

The second choice, which is my advice, will give you access to the Modelio API and, if I well understood, all you need. Your module would be able to load your XML file and create a diagram according to it.

And finally the third choice will also give you access to the Modelio API but it is a one shot strategy. I mean that you will be able to launch Modelio with a Jython script as parameter and that's all... If you need more information you will have to relaunch Modelio with another script, etc.

Does it help? Do you need more information about how interact with Modelio?

Regards,

EBR

Please Log in or Create an account to join the conversation.

6 years 8 months ago #1771 by Heng
Hi ebr,

Yes sure, I need more information about how interact with Modelio.
Is there a guide to show me how I can use such Module in Eclipse ?

Do I have to create my own Modelio Module?

Is that possible , that I can access the Content of Modelio in Eclipse. (I have to also use the Information from Modelio for other purposes in Eclipse)

Best Regards

Please Log in or Create an account to join the conversation.

6 years 8 months ago #1772 by ebr
Hi Heng,

Maybe could you clarify a bit what do you mean by "I have to also use the Information from Modelio for other purposes in Eclipse"? What would you do with these information "under Eclipse" that you would not do "under Modelio"!?

Please find some information about Modelio module and script here.

Regards,

EBR

Please Log in or Create an account to join the conversation.

6 years 8 months ago #1773 by Heng
Hi ebr,
so my Project use [url=http://http://open-services.net/]OSLC [/url] to demonstrate interoperability between Tools. For Example Papyrus and Modelio (Both are modelling Tools).

My project accesses the content of papyrus, and update the Information in RDF/XML format to the Server, all the Information is HTTP-accessable.

Other Side I get the information via HTTP, and now I want to rebuild the Content in Modelio with the information. And reversely too.

It will be easier for me to have the information in eclispe.

Please Log in or Create an account to join the conversation.

Moderators: tmaaabcdeebr
Time to create page: 0.046 seconds
^ Back to Top