Package com.nomagic.magicdraw.mof
Class MofPlugin
java.lang.Object
com.nomagic.magicdraw.plugins.Plugin
com.nomagic.magicdraw.mof.MofPlugin
Plugin provides MOF (EMOF and CMOF) export/import functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()MagicDraw calls this method before exiting the application.static voidexportMof(Project project, Set<Package> packages, MofType mof, File mofFile, boolean runValidation, boolean silent, ProgressStatus progressStatus) Exports given project to MOF XMI.static voidexportMof(Project project, Set<Package> packages, MofType mof, File mofFile, boolean runValidation, ProgressStatus progressStatus) Exports given project to MOF XMI.static voidimportMof(File mofFile, MofDescriptor mof, File umlFile, ProgressStatus progressStatus, boolean removeTemp) Imports given MOF to new project.voidinit()Plugin initialization method.booleanMagicDraw calls this method to identify if this plugin is supported.Methods inherited from class com.nomagic.magicdraw.plugins.Plugin
getDescriptor
-
Constructor Details
-
MofPlugin
public MofPlugin()
-
-
Method Details
-
init
public void init()Description copied from class:PluginPlugin initialization method. Every plugin must override this method and do any action related to plugin initialization. For example registers actions configurators to MagicDraw application. This method is called by MagicDraw application during MagicDraw startup. -
close
public boolean close()Description copied from class:PluginMagicDraw calls this method before exiting the application. If at least one plugin returns 'false', MagicDraw application will not exit. Override this method and do any exit specific action(your plugin state saving for example). -
isSupported
public boolean isSupported()Description copied from class:PluginMagicDraw calls this method to identify if this plugin is supported. Plugin is initialized and started only if this method returnstrue. Override this method to check specific conditions for the plugin supportability.- Specified by:
isSupportedin classPlugin- Returns:
- true, if plugin is supported; false, if plugin is not supported
-
exportMof
@OpenApi public static void exportMof(Project project, Set<Package> packages, MofType mof, File mofFile, boolean runValidation, boolean silent, ProgressStatus progressStatus) throws Exception Exports given project to MOF XMI.- Parameters:
project- project to export.packages- project packages to export.mof- mof type.mofFile- output file.runValidation- run model validation when exporting.silent- silent (wihtout user interruption) exportprogressStatus- progress status.- Throws:
Exception
-
exportMof
@OpenApi public static void exportMof(Project project, Set<Package> packages, MofType mof, File mofFile, boolean runValidation, ProgressStatus progressStatus) throws Exception Exports given project to MOF XMI.- Parameters:
project- project to export.packages- project packages to export.mof- mof type.mofFile- output file.runValidation- run model validation when exporting.progressStatus- progress status.- Throws:
Exception
-
importMof
@OpenApi public static void importMof(File mofFile, MofDescriptor mof, File umlFile, ProgressStatus progressStatus, boolean removeTemp) throws Exception Imports given MOF to new project.- Parameters:
mofFile- MOF file to import.mof- MOF type.umlFile- Transformed file.progressStatus- progress status.- Throws:
Exception
-