file How to access the root package in modelio 3.3

4 years 4 months ago #3604 by pan
Hi asefth,

sorry for my code. It was a mix of python and Java :whistle:

I'll try to make clear the steps to create a module. Maybe you already know some steps but I prefer to give each steps so it can help other users.

1 - Create a module
It is the starting point. It allows to understand how to package a module and which tools to use.

2 - Understand the main concepts of a Module and the integration with Modelio
It explains the main concepts for developing a module. It presents a complete example for creating a module with detailed steps (More complete than a simple tutorial).

3 - Description of the API
It explains how to access different parts of Modelio (model, diagrams, audit, log, ...).
In the Accessing the Modelio API services section, it is possible that the code is not up-to-date with Modelio 3.3. I think it should be updated.

4 - [url=Modelio 3.3 - Metamodel documentation]Metamodel 3.3 documentation[/url] and [url=JavaDoc documentation of the API]Modelio 3.3 Javadoc documentation of the API[/url]
It is documentation for advanced users. It is up-to-date. If some calls used in previous steps are deprecated, you can find the updated calls on these documentations.

Hope this helps,
BR

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

4 years 4 months ago - 4 years 4 months ago #3605 by asefth
Hi pan,

Thanks for this summary about the right stuff to use.

I already had a good overview but sure that it will help new people.

The reference guideline seems to be the Modelio Metamodel .

Ok, but let's take my very simple but now fixed trouble:

A Modelio project may have several work models.
Let's create a project called myProject
Let's create 2 work models:
myProject (default name = name of the project)
myNiceModel


The Modelio Metamodel (Project) is clear:

Workspace inside which a Model is built.
A project in Modelio corresponds to the UML Model concept.

A Project in Modelio has a root Package, and in addition a specific configuration, detailing deployed MDACs, MDAC parameter values, and so on.

A Project does not belong to any other element.


Maybe I'm wrong but I don't see here any explicit concept considering
1 Project associated with 1..* "work models".

Let's have a look at the API: we go at getRoots()
BECAUSE we already know that there may be several roots (remembering getRoots() read in a tutorial).
We see that:

List<MObject> getModelRoots()
Get all the roots of the editable model

So we must consider that the ONLY ONE editable model related to ONLY ONE project may have ONE or MORE "sub-models", each with its own root.

We may say that a "work model" (in GUI) is related to a "sub-model" in THE editable model.
(hope I'm clear)

Is there a best way for reading the reference documentation in order to always catch the right concepts involved in Modelio and focus on a straightforward dev?


BTW: how to simply rename project and "work models" through GUI? (as programmatically is now fine)

Thanks
Regards

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

4 years 4 months ago #3607 by asefth
Hi,
do you have a up-to-date version of "2 - Understand the main concepts of a Module and the integration with Modelio"?
Or an other up-to-date example?

I'm presently having (again) the same frustrating experience because this guide should be straightforward through this exhaustive and nice JUnit example. But what I code is not in line with what I see,(certainly due to the Maven archetype, ect...)

Thanks
Regards

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

4 years 4 months ago #3611 by pan
Hi asfeth,

We have to review this documentation because some parts are not up-to-date. Some sample codes should be rewritten and some concepts need to be clearer.
We started this review and this should be updated shortly. We will take you informed when the documentation will be up-to-date.

To answer to this question :

BTW: how to simply rename project and "work models" through GUI? (as programmatically is now fine)

It is not possible to rename a "work model". A work around can be to create a new "work model", move the elements from the "work model" you wanted to rename to this new "work model" and finally delete the "work model" you don't need anymore.

BR

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

4 years 4 months ago #3613 by pan
Hi,

We've updated the documentation for Modelio 3.3.*.

- The Module developer's guide for Modelio 3.3
- The Module developer's API guide for Modelio 3.3

We've added a page about Modelio projects concepts which can help to make clearer the differences between the projects, the workspace, the work models, ...

Hope this helps,
BR

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

4 years 4 months ago #3628 by asefth
Hi

Thanks for the quick update.

Pls find some quick feedback
(I'll read again this we and update it in case there is stupid stuff):

First, in the developer wiki, is it possible to highlight recent changes to get directly to it?


1/ Module developer's guide for Modelio 3.3

I went through all the JUnit example

Let's assume this is a tutorial for newcomers to Modelio and not for Modelio and Java experts.
I experienced several hindering steps that are not good to get confident and rewarded by simple litle successes.

In brief (quick draft feedback):

> Pls detail the setup you used to get the presented files.

> class JUnitSession
The comments are not the same as those I got (with my Eclipse setup: Luna SR2)
It's trivial, but it catches attention in order to check if it is important or not.

> Tell us explicitely all what you do because sometimes it is needed to create a class, and sometimes it is automated.
e.g. Tell "create the class CreateTestCase" and CreateTestCaseWizardDialog

> Show the beginning of the code of CreateTestCaseWizardDialog in the first page you mention this class.
It only appears in tha page after "Processing commands: model transformation".

> The module.xml modification is a little bit verbose (source tab).
But it's ok.

Most important: Can you put the code of this example online?
It would answer to most of my comments.

My opinion regarding this tutorial, as soon one is able to to it straightfully on any real module project is that it's in fact so repetitive that it should be automated. And encapsulated.
Always transactions to change the model, always typing project details (commands, GUI, SWT stuff, icon...) in module.xml.
The only thing that changes each time is my core code (e.g. "sterotype all class of the selected package" or "make all selected class on a diagram with a blue background" use that icon, in brief all we manually insert).
Also, manipulating Java code by hand is always dangerous, especially when you are in a hurry.All mistakes are possible.
The answer to this could be a module by itself.
What do you think about the way to shorten this process?
(i.e. make some tooling that only exposes the relevant part of the code (my application/module code) and encapsulate the module dev coding?
A specific module or a simpler way to use Modelio?


3/ Modelio projects concepts
Sincerely, I read it but it stays a little bit fuzzy in my mind.
A class diagram would be useful here.
And, to definitly keep in mind the hierarchy at this root(s) level, it would be fine to add here your example code:
getModel().getModelRoots().get(0).getModel()
The model-project | its roots | one of its roots | the work model of the selected root (I hope I'm right!)

Regards

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

Moderators: tmachmaab
Time to create page: 0.044 seconds
^ Back to Top