lock [Solved] Plugin Usage

8 years 6 days ago #690 by fpo
Indeed, both of these command are heavily model-related, so I think you should REALLY do that in a module instead. Modules are only executed when a project is opened, meaning you have actual access to a modelling session and model, both things a plugin cannot guarantee (unless registering to listen to sessions lifecycles, which is also possible, but again: boilerplate code that is already written for you in a module).
The topic has been locked.
8 years 6 days ago #691 by mersa
@fpo

thank you, that definitely helps a lot.
I tried to avoid using the module concept since i already have a complete and working eclipse plugin (and working with modules was quite unfamilar to me). But obviously working a little bit with the code won't do the job.

I will try to keep with your proposals. Than kyou so far :)
The topic has been locked.
8 years 5 days ago - 8 years 5 days ago #695 by mersa
Hey,

Aside of a weird error at runtime that brought me to developing a plugin, some basic questions concerning the modelio project file occured.

Is it right, that all model-related data is stored in the ofpx file? And what kind of file is that? Is there any way to work with that file? Unfortunately the source of the xmi plugin doesn't give me any hints related to these questions.
Another one is, exporting a project as xmi and reimporting it into another empty project will show the model in the model explorer, but dubble-klick on the project will open an empty editor. Is this a conscious behaviour?
The topic has been locked.
8 years 5 days ago - 8 years 5 days ago #697 by chm

mersa wrote: Is it right, that all model-related data is stored in the ofpx file? And what kind of file is that? Is there any way to work with that file? Unfortunately the source of the xmi plugin doesn't give me any hints related to these questions.


The ofpx file doesn't contain all model-related data, we also have a few files in the project space, like Rich Notes for example. We also have plans to replace completely this file in a near future... More on that in a few months i guess!

For now, it is homemade C++ solution, you can have more info about it on this thread .

Basically, it seems to me like a bad idea to do anything with Modelio's persistance storage, you should probably be able to do what you want with model level tools like XMI, or the EXML import/export.
The topic has been locked.
8 years 5 days ago - 8 years 5 days ago #698 by mersa
touching the ofpx file arised from desperation. I agree that this is really a bad idea.

when checking out a model from my repository, i get an xmiresource. So what i do need now is an empty modelio project and the ability transform it into an iumlModel and vice versa for the check in procedure.
Unfortunately i can't find a "method" that provides xmi functionality, which is hard to believe for me. DO you have any better idea the writing an
iumlModel <--> xmi transformation by myself?
I try to avoid this for days, even more since this functionality is already implemented in the xmi plugin provided in modelio. But i have no clue how to get any access.


By the way, any idea about this xmi/model reimport thing?
Edit: ähm, just to save me extra work, according to the thread you posted, i need to deal with the diagram creation by myself, e.g. with a module, right?
The topic has been locked.
8 years 5 days ago - 8 years 5 days ago #699 by ebr
Hi mersa,

First of all the future version of Modelio (planned for this summer) would provide XMI services for the modules.

If you need these XMI services before this date, you have to change several things:
  • The plugin.xml file available in the xmi.internal plugin. You have to change the list of the exposed packages by the xmi.internal plugin in order to use them in your client (plugin or module ...). If you want to know which packages are needed for providing export/import services, take a look at the validationAction methods of the SwtWizardExport or SwtWizardImport classes.
  • The addPluginsClassLoaders method in the MdacLoader class (in the mdainfra plugin). By changing this method you will be able to add xmi.internal classes (exposed by the xmi.internal plugin) in the module class loader.

Hoping it is clear and it helps.

Regards,

EBR

PS: XMI services handle the import/export of model elements not diagram elements.
The topic has been locked.
Moderators: tmachmaab
Time to create page: 0.046 seconds
^ Back to Top