file API: which factory? IUmlModel vs. IModelFactory

8 years 8 months ago - 8 years 8 months ago #2284 by jmfavre
Hi,
I've just realized that there are two factories with similar interfaces
- org.modelio.api.model.IUmlModel
- org.modelio.metamodel.factory.IModelFactory

what is the difference?
It seems that the second one is merging all operations for all metamodels am I right?
Should we use IModelFactory with modelio 3?
How to get access to it?

I want to create stereotypes, tags, etc programmatically (in the local module as I guess that I can't do this in modules). If I'm not wrong this is only available from IModelFactory.

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

8 years 8 months ago #2286 by chm
Hi jmfavre,

in Modelio, we basically have two layer of code:
'org.modelio.api' is the public one, providing services for modules and scripts. That's the part we try to document a little more, and keep more or less stable from one version to another.

IModelFactory is part of our internal code (aka all other plugins), and should not be used outside our plugin implementations. (at least, you're not supposed to use it... :P )

It is possible to create mda elements (TagType, NoteType...) with the IModelFactory, using the generic 'createElement' method taking a metaclass name. Do not forget to attach them to your local module later!

Hope this helps,


chm

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

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