Class BaseEmfOptionsGroup
- java.lang.Object
-
- com.nomagic.magicdraw.core.options.OptionsGroup
-
- com.nomagic.magicdraw.core.options.AbstractPropertyOptionsGroup
-
- com.nomagic.magicdraw.core.options.VersionedOptionsGroup
-
- com.nomagic.magicdraw.emfuml2xmi.envoptions.BaseEmfOptionsGroup
-
- All Implemented Interfaces:
BaseOptions
,java.lang.Cloneable
- Direct Known Subclasses:
EmfOptionsGroup
@OpenApi public abstract class BaseEmfOptionsGroup extends com.nomagic.magicdraw.core.options.VersionedOptionsGroup implements BaseOptions
Eclipse UML2 XMI export/import environment options.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
APPLY_ALL_PROFILES_TO_ROOT_MODEL
Apply profiles to root model option.private static java.lang.String
ASK_TO_OVERWRITE_EXPORTED_FILES
private static java.lang.String
DISPLAY_WARNINGS_IN_MESSAGE_WINDOW
private static java.lang.String
EMF_AUTO_EXPORT_OPTIONS_CHOICE
static java.lang.String
EMF_OPTIONS_GROUP_ID
private static javax.swing.Icon
ICON
private java.lang.String
mFormat
protected static java.lang.String
MOVE_STEREOTYPE_TO_NESTING_PROFILE
private PropertyResourceProvider
mResourceProvider
static java.lang.String
OPTION_ASK_BEFORE_EXPORT
Auto-export to Eclipse UML2 XMI option.static java.lang.String
OPTION_EXPORT_ALWAYS
Auto-export to Eclipse UML2 XMI option.static java.lang.String
OPTION_NEVER
Auto-export to Eclipse UML2 XMI option.private static java.lang.String
PRESERVE_IDS
static java.lang.String
PRESERVE_IDS_DO_NOT
Preserve ID option.static java.lang.String
PRESERVE_IDS_ON_EXPORT
Preserve ID option.static java.lang.String
PRESERVE_IDS_ON_IMPORT
Preserve ID option.static java.lang.String
PRESERVE_IDS_ON_IMPORT_EXPORT
Preserve ID option.private static java.lang.String
SHOW_MAPPING_WARNING
private static java.lang.String
SHOW_STEREOTYPE_FROM_SAME_PROFILE_WARNING
private static java.lang.String
SHOW_STEREOTYPE_PROPERTY_TYPE_CHANGE_WARNING
private static java.lang.String
USE_KEYWORD_AS_STEREOTYPE_NAME
-
Fields inherited from class com.nomagic.magicdraw.core.options.VersionedOptionsGroup
CURRENT_EXPORTER_VERSION
-
Fields inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
ICON_ENVIRONMENT_OPTIONS
-
-
Constructor Summary
Constructors Constructor Description BaseEmfOptionsGroup(java.lang.String id, java.lang.String format)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addBooleanProperty(java.lang.String id, java.lang.String group)
protected void
addBooleanProperty(java.lang.String id, java.lang.String group, boolean value)
protected void
addChoiceProperty(java.lang.String id, java.lang.String[] choice, java.lang.String selected, java.lang.String group)
void
addProperty(Property property)
Adds property to this group.protected com.nomagic.magicdraw.emfuml2xmi.envoptions.BaseEmfOptionsGroup.BaseEmfOptionsPropertyResourceProvider
createPropertyResourceProvider()
java.lang.String
getAutoExportOption()
Get auto-export to Eclipse UML2 XMI option.com.nomagic.ui.banners.Banner
getBanner()
static BaseEmfOptionsGroup
getBaseEMFOptions(java.lang.String optionsGroupID)
protected BooleanProperty
getBooleanProperty(java.lang.String id)
protected boolean
getBooleanPropertyValue(java.lang.String id)
protected ChoiceProperty
getChoice(java.lang.String id)
javax.swing.Icon
getGroupIcon()
Returns icon to display with options.java.lang.String
getName()
Gets human-readable name of options.java.lang.String
getPreserveIDs()
Get preserve IDs option.protected static java.lang.String
getPropertyGroupName(boolean exportb, boolean importb)
private PropertyResourceProvider
getResourceProvider()
boolean
isApplyAllProfilesToRootModel()
Checks if to apply all profiles to root Model on export.boolean
isAskBeforeExport()
boolean
isAskToOverwriteExportedFiles()
Chekcks if ask to overwrite exported files.boolean
isAutoExport()
private boolean
isAutoExportChoice(java.lang.String value)
private boolean
isChoiceValue(java.lang.String choice, java.lang.String value)
boolean
isDisplayWarnings()
Checks if to show warnings in Message Window on export/import.boolean
isMoveStereotypeToNestingProfile()
Checks if move stereotype to nesting profile if stereotype is not directly contained by profile.boolean
isPreserveExportedIDs()
private boolean
isPreserveIdChoice(java.lang.String value)
boolean
isPreserveImportedIDs()
boolean
isShowMappinWarning()
Checks if show warnings about (datatypes, metaclasses) mappings.boolean
isShowStereotypeFromSameWarning()
Checks if show warnings about not applied stereotypes (from the same profile).boolean
isShowStereotypePropertyTypeChangeWarning()
Check if show warnings about stereotype property type change.boolean
isUseKeywordAsStereotypeName()
Checks if stereotype keyword is used as stereotype name on import.void
loadOptions(Style style, boolean pluginsLoaded)
static BaseEmfOptionsGroup
registerOptions(BaseEmfOptionsGroup options)
void
setApplyAllProfilesToRootModel(boolean apply)
Set if to apply all profiles to root Model on export.void
setAskToOverwriteExportedFiles(boolean ask)
Set if ask to overwrite exported files.void
setAutoExportOption(java.lang.String choice)
Set auto-export to Eclipse UML2 XMI on project save option.protected void
setBooleanPropertyValue(java.lang.String id, boolean value)
void
setDefaultValues()
Sets default values for the properties contained in this group.void
setDisplayWarnings(boolean display)
Set if to show warnings in Message Window on export/import.void
setMoveStereotypeToNestingProfile(boolean move)
Set if move stereotype to nesting profile if stereotype is not directly contained by profile.void
setPreserveIDs(java.lang.String choice)
Set preserve IDs option.void
setShowMappinWarning(boolean show)
Set if show warnings about (datatypes, metaclasses) mappings.void
setShowStereotypeFromSameWarning(boolean show)
Set if show warnings about not applied stereotypes (from the same profile).void
setShowStereotypePropertyTypeChangeWarning(boolean show)
Set if show warnings about stereotype property type change.void
setUseKeywordAsStereotypeName(boolean use)
Set if stereotype keyword is used as stereotype name on import.-
Methods inherited from class com.nomagic.magicdraw.core.options.VersionedOptionsGroup
afterLoad, beforeLoad, getExporterVersion, getOptionsToSave, isExporterVersionEarlier, isExporterVersionEarlier
-
Methods inherited from class com.nomagic.magicdraw.core.options.AbstractPropertyOptionsGroup
addInvisibleProperty, addProperty, addProperty, clone, createDefault, createOptions, createOptionsPanel, fixProperty, getCopy, getOptions, getProperty, getVisibleOptions, hasVisibleOptions, removeProperty, setOptions, setPropertiesInvisible, setPropertyInvisible
-
Methods inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
add, afterSave, firstInit, getChildren, getIcon, getId, getParent, isEnabled, isVisible, remove, resetCachedValues, setEnabled, setVisible, sortChildren
-
-
-
-
Field Detail
-
EMF_AUTO_EXPORT_OPTIONS_CHOICE
private static final java.lang.String EMF_AUTO_EXPORT_OPTIONS_CHOICE
- See Also:
- Constant Field Values
-
OPTION_EXPORT_ALWAYS
@OpenApi public static final java.lang.String OPTION_EXPORT_ALWAYS
Auto-export to Eclipse UML2 XMI option.- See Also:
- Constant Field Values
-
OPTION_ASK_BEFORE_EXPORT
@OpenApi public static final java.lang.String OPTION_ASK_BEFORE_EXPORT
Auto-export to Eclipse UML2 XMI option.- See Also:
- Constant Field Values
-
OPTION_NEVER
@OpenApi public static final java.lang.String OPTION_NEVER
Auto-export to Eclipse UML2 XMI option.- See Also:
- Constant Field Values
-
ASK_TO_OVERWRITE_EXPORTED_FILES
private static final java.lang.String ASK_TO_OVERWRITE_EXPORTED_FILES
- See Also:
- Constant Field Values
-
PRESERVE_IDS
private static final java.lang.String PRESERVE_IDS
- See Also:
- Constant Field Values
-
PRESERVE_IDS_DO_NOT
@OpenApi public static final java.lang.String PRESERVE_IDS_DO_NOT
Preserve ID option.- See Also:
- Constant Field Values
-
PRESERVE_IDS_ON_EXPORT
@OpenApi public static final java.lang.String PRESERVE_IDS_ON_EXPORT
Preserve ID option.- See Also:
- Constant Field Values
-
PRESERVE_IDS_ON_IMPORT
@OpenApi public static final java.lang.String PRESERVE_IDS_ON_IMPORT
Preserve ID option.- See Also:
- Constant Field Values
-
PRESERVE_IDS_ON_IMPORT_EXPORT
@OpenApi public static final java.lang.String PRESERVE_IDS_ON_IMPORT_EXPORT
Preserve ID option.- See Also:
- Constant Field Values
-
APPLY_ALL_PROFILES_TO_ROOT_MODEL
@OpenApi private static final java.lang.String APPLY_ALL_PROFILES_TO_ROOT_MODEL
Apply profiles to root model option.- See Also:
- Constant Field Values
-
MOVE_STEREOTYPE_TO_NESTING_PROFILE
protected static final java.lang.String MOVE_STEREOTYPE_TO_NESTING_PROFILE
- See Also:
- Constant Field Values
-
SHOW_MAPPING_WARNING
private static final java.lang.String SHOW_MAPPING_WARNING
- See Also:
- Constant Field Values
-
SHOW_STEREOTYPE_PROPERTY_TYPE_CHANGE_WARNING
private static final java.lang.String SHOW_STEREOTYPE_PROPERTY_TYPE_CHANGE_WARNING
- See Also:
- Constant Field Values
-
USE_KEYWORD_AS_STEREOTYPE_NAME
private static final java.lang.String USE_KEYWORD_AS_STEREOTYPE_NAME
- See Also:
- Constant Field Values
-
SHOW_STEREOTYPE_FROM_SAME_PROFILE_WARNING
private static final java.lang.String SHOW_STEREOTYPE_FROM_SAME_PROFILE_WARNING
- See Also:
- Constant Field Values
-
DISPLAY_WARNINGS_IN_MESSAGE_WINDOW
private static final java.lang.String DISPLAY_WARNINGS_IN_MESSAGE_WINDOW
- See Also:
- Constant Field Values
-
mResourceProvider
private PropertyResourceProvider mResourceProvider
-
mFormat
private final java.lang.String mFormat
-
ICON
private static final javax.swing.Icon ICON
-
EMF_OPTIONS_GROUP_ID
public static final java.lang.String EMF_OPTIONS_GROUP_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerOptions
public static BaseEmfOptionsGroup registerOptions(BaseEmfOptionsGroup options)
-
getBaseEMFOptions
public static BaseEmfOptionsGroup getBaseEMFOptions(java.lang.String optionsGroupID)
-
getName
public java.lang.String getName()
Description copied from class:OptionsGroup
Gets human-readable name of options.- Overrides:
getName
in classOptionsGroup
- Returns:
- human-readable name of options.
-
loadOptions
public void loadOptions(Style style, boolean pluginsLoaded)
- Overrides:
loadOptions
in classcom.nomagic.magicdraw.core.options.VersionedOptionsGroup
-
getGroupIcon
public javax.swing.Icon getGroupIcon()
Description copied from class:OptionsGroup
Returns icon to display with options.- Overrides:
getGroupIcon
in classOptionsGroup
- Returns:
- icon to display with options.
-
getPropertyGroupName
protected static java.lang.String getPropertyGroupName(boolean exportb, boolean importb)
-
setDefaultValues
public void setDefaultValues()
Description copied from class:AbstractPropertyOptionsGroup
Sets default values for the properties contained in this group. Overriding classes should set default values to the properties.- Overrides:
setDefaultValues
in classcom.nomagic.magicdraw.core.options.VersionedOptionsGroup
-
addChoiceProperty
protected final void addChoiceProperty(java.lang.String id, java.lang.String[] choice, java.lang.String selected, java.lang.String group)
-
setAutoExportOption
@OpenApi public void setAutoExportOption(java.lang.String choice)
Set auto-export to Eclipse UML2 XMI on project save option.- Specified by:
setAutoExportOption
in interfaceBaseOptions
- Parameters:
choice
-- See Also:
OPTION_ASK_BEFORE_EXPORT
,OPTION_EXPORT_ALWAYS
,OPTION_NEVER
-
getAutoExportOption
@OpenApi public java.lang.String getAutoExportOption()
Get auto-export to Eclipse UML2 XMI option.- Specified by:
getAutoExportOption
in interfaceBaseOptions
- Returns:
- current auto-export choice.
- See Also:
OPTION_ASK_BEFORE_EXPORT
,OPTION_EXPORT_ALWAYS
,OPTION_NEVER
-
setAskToOverwriteExportedFiles
@OpenApi public void setAskToOverwriteExportedFiles(boolean ask)
Set if ask to overwrite exported files.- Specified by:
setAskToOverwriteExportedFiles
in interfaceBaseOptions
- Parameters:
ask
- true - ask to overwrite, otherwise - overwrite without asking.
-
isAskToOverwriteExportedFiles
@OpenApi public boolean isAskToOverwriteExportedFiles()
Chekcks if ask to overwrite exported files.- Specified by:
isAskToOverwriteExportedFiles
in interfaceBaseOptions
- Returns:
- true if ask to overwrite exported files.
-
setPreserveIDs
@OpenApi public void setPreserveIDs(java.lang.String choice)
Set preserve IDs option.- Specified by:
setPreserveIDs
in interfaceBaseOptions
- Parameters:
choice
-- See Also:
PRESERVE_IDS_DO_NOT
,PRESERVE_IDS_ON_EXPORT
,PRESERVE_IDS_ON_IMPORT
,PRESERVE_IDS_ON_IMPORT_EXPORT
-
getPreserveIDs
@OpenApi public java.lang.String getPreserveIDs()
Get preserve IDs option.- Specified by:
getPreserveIDs
in interfaceBaseOptions
- Returns:
- current choice.
- See Also:
PRESERVE_IDS_DO_NOT
,PRESERVE_IDS_ON_EXPORT
,PRESERVE_IDS_ON_IMPORT
,PRESERVE_IDS_ON_IMPORT_EXPORT
-
setShowMappinWarning
@OpenApi public void setShowMappinWarning(boolean show)
Set if show warnings about (datatypes, metaclasses) mappings.- Specified by:
setShowMappinWarning
in interfaceBaseOptions
- Parameters:
show
-
-
isShowMappinWarning
@OpenApi public boolean isShowMappinWarning()
Checks if show warnings about (datatypes, metaclasses) mappings.- Specified by:
isShowMappinWarning
in interfaceBaseOptions
- Returns:
- true if warnings about (datatypes, metaclasses) mapping should be displayed.
-
setShowStereotypePropertyTypeChangeWarning
@OpenApi public void setShowStereotypePropertyTypeChangeWarning(boolean show)
Set if show warnings about stereotype property type change.- Specified by:
setShowStereotypePropertyTypeChangeWarning
in interfaceBaseOptions
- Parameters:
show
-
-
isShowStereotypePropertyTypeChangeWarning
@OpenApi public boolean isShowStereotypePropertyTypeChangeWarning()
Check if show warnings about stereotype property type change.- Specified by:
isShowStereotypePropertyTypeChangeWarning
in interfaceBaseOptions
- Returns:
- true if warnings about stereotype property type change is displayed.
-
setShowStereotypeFromSameWarning
@OpenApi public void setShowStereotypeFromSameWarning(boolean show)
Set if show warnings about not applied stereotypes (from the same profile).- Specified by:
setShowStereotypeFromSameWarning
in interfaceBaseOptions
- Parameters:
show
-
-
isShowStereotypeFromSameWarning
@OpenApi public boolean isShowStereotypeFromSameWarning()
Checks if show warnings about not applied stereotypes (from the same profile).- Specified by:
isShowStereotypeFromSameWarning
in interfaceBaseOptions
- Returns:
- true if warnings about not applied stereotype should be displayed.
-
setUseKeywordAsStereotypeName
@OpenApi public void setUseKeywordAsStereotypeName(boolean use)
Set if stereotype keyword is used as stereotype name on import.- Specified by:
setUseKeywordAsStereotypeName
in interfaceBaseOptions
- Parameters:
use
-
-
isUseKeywordAsStereotypeName
@OpenApi public boolean isUseKeywordAsStereotypeName()
Checks if stereotype keyword is used as stereotype name on import.- Specified by:
isUseKeywordAsStereotypeName
in interfaceBaseOptions
- Returns:
- true if stereotype keyword is used as stereotype name on import.
-
setDisplayWarnings
@OpenApi public void setDisplayWarnings(boolean display)
Set if to show warnings in Message Window on export/import.- Specified by:
setDisplayWarnings
in interfaceBaseOptions
- Parameters:
display
-
-
isDisplayWarnings
@OpenApi public boolean isDisplayWarnings()
Checks if to show warnings in Message Window on export/import.- Specified by:
isDisplayWarnings
in interfaceBaseOptions
- Returns:
- true if warnings shoud be displayed in Message Window.
-
setApplyAllProfilesToRootModel
@OpenApi public void setApplyAllProfilesToRootModel(boolean apply)
Set if to apply all profiles to root Model on export.- Specified by:
setApplyAllProfilesToRootModel
in interfaceBaseOptions
- Parameters:
apply
- true to apply all profiles to root Model (on export).
-
isApplyAllProfilesToRootModel
@OpenApi public boolean isApplyAllProfilesToRootModel()
Checks if to apply all profiles to root Model on export.- Specified by:
isApplyAllProfilesToRootModel
in interfaceBaseOptions
- Returns:
- true on export all profiles will be applied to root Model.
-
setMoveStereotypeToNestingProfile
@OpenApi public void setMoveStereotypeToNestingProfile(boolean move)
Set if move stereotype to nesting profile if stereotype is not directly contained by profile.- Specified by:
setMoveStereotypeToNestingProfile
in interfaceBaseOptions
- Parameters:
move
- true move stereotype to nesting profile (on export).
-
isMoveStereotypeToNestingProfile
@OpenApi public boolean isMoveStereotypeToNestingProfile()
Checks if move stereotype to nesting profile if stereotype is not directly contained by profile.- Specified by:
isMoveStereotypeToNestingProfile
in interfaceBaseOptions
- Returns:
- true move stereotype to nesting profile (on export).
-
isAskBeforeExport
public boolean isAskBeforeExport()
- Specified by:
isAskBeforeExport
in interfaceBaseOptions
- Returns:
- true when after each project save user is asked if he wants to export to emf.
-
isAutoExport
public boolean isAutoExport()
- Specified by:
isAutoExport
in interfaceBaseOptions
- Returns:
- true when after each save emf export is performed without any questions.
-
isPreserveExportedIDs
public boolean isPreserveExportedIDs()
- Specified by:
isPreserveExportedIDs
in interfaceBaseOptions
- Returns:
- true if preserve exported ids.
-
isPreserveImportedIDs
public boolean isPreserveImportedIDs()
- Specified by:
isPreserveImportedIDs
in interfaceBaseOptions
- Returns:
- true if preserve imported ids.
-
addBooleanProperty
protected final void addBooleanProperty(java.lang.String id, java.lang.String group)
-
addBooleanProperty
protected final void addBooleanProperty(java.lang.String id, java.lang.String group, boolean value)
-
addProperty
public void addProperty(Property property)
Description copied from class:AbstractPropertyOptionsGroup
Adds property to this group. DescriptionID will be reset. To add property with description useAbstractPropertyOptionsGroup.addProperty(Property, String)
method.- Overrides:
addProperty
in classAbstractPropertyOptionsGroup
- Parameters:
property
- property to be added.
-
setBooleanPropertyValue
protected final void setBooleanPropertyValue(java.lang.String id, boolean value)
-
getBooleanPropertyValue
protected final boolean getBooleanPropertyValue(java.lang.String id)
-
getBooleanProperty
protected final BooleanProperty getBooleanProperty(java.lang.String id)
-
isAutoExportChoice
private boolean isAutoExportChoice(java.lang.String value)
-
isPreserveIdChoice
private boolean isPreserveIdChoice(java.lang.String value)
-
isChoiceValue
private boolean isChoiceValue(java.lang.String choice, java.lang.String value)
-
getChoice
protected final ChoiceProperty getChoice(java.lang.String id)
-
getResourceProvider
private PropertyResourceProvider getResourceProvider()
-
createPropertyResourceProvider
protected com.nomagic.magicdraw.emfuml2xmi.envoptions.BaseEmfOptionsGroup.BaseEmfOptionsPropertyResourceProvider createPropertyResourceProvider()
-
getBanner
public com.nomagic.ui.banners.Banner getBanner()
-
-