@OpenApiAll
public class CodeEngineeringManager
extends java.lang.Object
Constructor and Description |
---|
CodeEngineeringManager() |
Modifier and Type | Method and Description |
---|---|
static CodeEngineeringSet |
createCodeEngineeringSet(java.lang.String language,
java.lang.String dialect,
java.lang.String name,
Project project,
Package workingPackage,
java.lang.String workingDirectory)
Given a language + dialect, name and working package of Code Engineering Set and project
where to add this CES, creates new Code Engineering Set instance.
|
static void |
generate(CodeEngineeringSet ces)
Performs code engineering for given code engineering set.
|
static java.util.List<CodeEngineeringSet> |
getAllCodeEngineeringSets(Project project)
Given a project, returns list of all available code engineering sets.
|
static CodeEngineeringSet |
getCodeEngineeringSet(Project project,
java.lang.String language,
java.lang.String dialect,
java.lang.String name)
Returns Code engineering set from given project, which matches language, dialect and name.
|
static void |
removeCodeEngineeringSet(CodeEngineeringSet codeEngineeringSet)
Given a codeEngineeringSet, removes it with all inner elements.
|
static void |
reverse(CodeEngineeringSet ces,
boolean showOptionDialog)
Performs reverse engineering for given code engineering set.
|
static void |
setClassFieldCreationType(Project project,
java.lang.String language,
com.nomagic.magicdraw.ce.core.rt.options.AttributeCreationType type)
Given a project and language of Code engineering set and, sets the default Class field creation type.
|
static void |
setClassFieldCreationType(Project project,
java.lang.String language,
boolean asAttribute)
|
static void |
setMergeModelAndCode(Project project,
boolean mergeCode)
Reverse engineering option, for merging new code with model.
|
static void |
setResetAlreadyCreatedFields(Project project,
boolean reset)
Reverse engineering option, to reset already created fields.
|
static void |
setResolveCollectionGenerics(Project project,
boolean resolve)
Reverse engineering option, to enable resolve collection generic.
|
static void |
setReverseAnalysisOption(Project project,
boolean createClassifiersDependencies,
boolean createPackageDependencies)
Sets reverse engineering analysis options.
|
public static CodeEngineeringSet createCodeEngineeringSet(@Nonnull java.lang.String language, @CheckForNull java.lang.String dialect, @Nonnull java.lang.String name, @Nonnull Project project, @CheckForNull Package workingPackage, @CheckForNull java.lang.String workingDirectory) throws java.lang.IllegalStateException
language
- Language of Code Engineering Set. Use CodeEngineeringConstants
to get
List of languages.dialect
- Dialect of language, this is dedicated for C++ or DDL CES. If language has no
dialect, use null.name
- Name of Code Engineering Set.project
- project where to add new code engineering set.workingPackage
- Working package code engineering set.workingDirectory
- Directory of working files. This is path where files are located fore
reverse, or where new files will be generated.java.lang.IllegalStateException
- if given language is not supported.public static void removeCodeEngineeringSet(@Nonnull CodeEngineeringSet codeEngineeringSet) throws java.lang.IllegalStateException
codeEngineeringSet
- set to be removed.java.lang.IllegalStateException
- if code engineering set language is not supported.public static java.util.List<CodeEngineeringSet> getAllCodeEngineeringSets(@Nonnull Project project)
project
- project of code engineering sets.public static CodeEngineeringSet getCodeEngineeringSet(@Nonnull Project project, @Nonnull java.lang.String language, @CheckForNull java.lang.String dialect, @Nonnull java.lang.String name) throws java.lang.IllegalStateException
project
- MD project, where code engineering set should be.language
- Language of code engineering set. Use CodeEngineeringConstants.Languages to
get constants.dialect
- dialect of language. Dedicated for C++ or DDL. Use
CodeEngineeringConstants.Dialects to get constants.name
- name of code engineering set.java.lang.IllegalStateException
- if given language is not supported.public static void setReverseAnalysisOption(@Nonnull Project project, boolean createClassifiersDependencies, boolean createPackageDependencies)
project
- MagicDraw project, where to apply this option.createClassifiersDependencies
- True to create classifiers dependencies.createPackageDependencies
- True to create package dependencies.@Deprecated public static void setClassFieldCreationType(@Nonnull Project project, @Nonnull java.lang.String language, boolean asAttribute) throws java.lang.IllegalStateException
project
- MagicDraw project.language
- Code Engineering set language.asAttribute
- true, if creation type is Attribute, false if creation type is association.java.lang.IllegalStateException
- if given language is not supported.public static void setClassFieldCreationType(@Nonnull Project project, @Nonnull java.lang.String language, com.nomagic.magicdraw.ce.core.rt.options.AttributeCreationType type) throws java.lang.IllegalStateException
project
- project.language
- Code Engineering set language.type
- class field creation type.java.lang.IllegalStateException
- if given language is not supported.public static void setResolveCollectionGenerics(Project project, boolean resolve)
project
- MD project.resolve
- True, to resolve, false to not resolve.public static void setResetAlreadyCreatedFields(@Nonnull Project project, boolean reset)
project
- MD project.reset
- true - reset, false - not reset.public static void setMergeModelAndCode(@Nonnull Project project, boolean mergeCode)
project
- MD project.mergeCode
- True to merge, false for not (default).public static void reverse(@Nonnull CodeEngineeringSet ces, boolean showOptionDialog) throws java.lang.IllegalStateException
ces
- code engineering set, to be reversed.showOptionDialog
- True to show code engineering option dialog, False for silent reverse.java.lang.IllegalStateException
- if code engineering set language is not supported.public static void generate(@Nonnull CodeEngineeringSet ces) throws java.lang.IllegalStateException
ces
- code engineering set to be generated.java.lang.IllegalStateException
- if code engineering set language is not supported.