@Deprecated
public class Utils
extends java.lang.Object
For methods that change the model in some way, no check are performed on whether element is editable or not. Sessions are also not created. The caller will need to manage sessions themselves and wrap any call in a session.
Modifier and Type | Class and Description |
---|---|
static class |
Utils.AvailableAttribute
Deprecated.
Getting element attributes and properties/values
|
static class |
Utils.DocGenComparator
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
HTML_WRAPPER_END
Deprecated.
|
static java.util.regex.Pattern |
HTML_WRAPPER_START
Deprecated.
|
static org.apache.log4j.Logger |
log
Deprecated.
|
static java.util.Map<java.lang.String,java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> |
nameOrIdSearchCache
Deprecated.
|
static java.util.Map<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element,java.util.Map<java.lang.String,java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>>> |
nameOrIdSearchOwnerCache
Deprecated.
|
static java.util.Map<java.lang.String,com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
nameOrIdSingleElementSearchCache
Deprecated.
|
static java.util.Map<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element,java.util.Map<java.lang.String,com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> |
nameOrIdSingleElementSearchOwnerCache
Deprecated.
|
protected static java.lang.String[] |
trueStrings
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
badDirectionError(int direction,
java.lang.String methodSignature)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectAssociatedElements(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
int depth,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.AggregationKind kind)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectByExpression(java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.lang.String query,
boolean iterate)
Deprecated.
Collect all objects of type Element in each of the results of evaluating
the query expression on each of the elements.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectByExpression(java.lang.Object element,
java.lang.Object query)
Deprecated.
Get elements returned by evaluating a query expression on an element.
|
static java.util.List<java.lang.Object> |
collectByStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipJavaClass(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.lang.Class<?> c,
int direction,
int depth)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipJavaClasses(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.util.Collection<java.lang.Class<?>> javaClasses,
int direction,
int depth)
Deprecated.
This will consider all relationships that are also specializations of
javaClasses
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipMetaclasses(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Class> metaclasses,
int direction,
int depth)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype,
int direction,
boolean derived,
int depth)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipStereotypes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.util.Collection<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> stereotypes,
int direction,
boolean derived,
int depth)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectDirectedRelatedElementsByRelationshipStereotypeString(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.lang.String stereotype,
int direction,
boolean derived,
int depth)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectOwnedElements(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
int depth)
Deprecated.
Collects ownedElements recursively, returned collection will not include
source
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
collectOwners(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
int depth)
Deprecated.
collect the owner of the element recursively up to depth (intermediate
owners will be returned also)
|
static void |
copyStereotypes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element a,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element b)
Deprecated.
Copies all stereotypes of element a to element b if b doesn't already
have it (including derived)
|
static void |
createDependencyWithStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element from,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element to,
com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype s)
Deprecated.
|
static void |
createGeneralization(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Classifier parent,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Classifier child)
Deprecated.
Creates a generalization relationship between parent and child
|
static void |
displayValidationWindow(com.nomagic.magicdraw.core.Project project,
java.util.Collection<ValidationSuite> vss,
java.lang.String title)
Deprecated.
|
static void |
displayValidationWindow(com.nomagic.magicdraw.core.Project project,
ValidationSuite vs,
java.lang.String title)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Diagram> |
filterDiagramsByDiagramTypes(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> diagrams,
java.util.List<java.lang.String> types,
boolean include)
Deprecated.
like it says
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByExpression(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.lang.String query,
boolean include,
boolean iterate)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByJavaClasses(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.util.Collection<java.lang.Class<?>> javaClasses,
boolean include)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByMetaclasses(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Class> metaclasses,
boolean include)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByNameRegex(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.util.Collection<java.lang.String> regex,
boolean include)
Deprecated.
matches name of elements against a collect of regular expression strings,
see java.util.regex.Pattern for regex patterns
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByStereotype(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype,
boolean include,
boolean derived)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
filterElementsByStereotypes(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements,
java.util.Collection<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> stereotypes,
boolean include,
boolean derived)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
findByName(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element owner,
java.lang.String pattern,
boolean getJustFirst)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
findByName(com.nomagic.magicdraw.core.Project project,
java.lang.String pattern,
boolean getJustFirst)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.DirectedRelationship> |
findDirectedRelationshipsBetween(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element source,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element target)
Deprecated.
returns all directed relationships where client element is source and
supplier element is target
|
static java.lang.String |
floatTruncate(java.lang.String f,
int p)
Deprecated.
Given a string f and integer p, if f is a floating point number, returns
the string with precision p
|
static void |
forceDialogReturnFalse()
Deprecated.
Causes the next call of a user dialog generating method to return the indicated value
The called method should then reset these values, so they don't accidentally get used again
|
static java.util.Set<com.nomagic.magicdraw.annotation.Annotation> |
getAnnotations(ValidationRule vr,
com.nomagic.magicdraw.core.Project project,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint cons)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getAspectStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property> |
getAttributes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
boolean includeInherited)
Deprecated.
depending on includeInherited flag, gets all the attributes of e based on
redefinition (if e is not a classifier it'll be ignored) if
includeInherited is false, will get the owned attributes of the
classifiers
|
static Utils.AvailableAttribute |
getAvailableAttribute(java.lang.Object attr)
Deprecated.
Convert the input Object to an availableAttribute enum value.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getCharacterizesStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getClassProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop,
boolean inherited)
Deprecated.
Get Class Properties with a name matching that of the input Property.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getClassProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
java.lang.String propName,
boolean inherited)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification |
getClassPropertyValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop,
boolean includeInherited)
Deprecated.
Get Class Property values for Properties with a name matching that of the
input Property.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getConformStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static DBTable |
getDBTableFromEditableTable(EditableTable et,
boolean addLineNum)
Deprecated.
For user scripts, if you have a pop up table that should look the same as
the docgen output, you can just use this method to get back a DBTable to
pass back to the output.
|
static DBTable |
getDBTableFromEditableTable(EditableTable et,
boolean addLineNum,
java.lang.Integer... merge)
Deprecated.
For user scripts, if you have a pop up table, but you want to merge the
first x columns into a column with indentations (like properties table).
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getDocumentStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static java.lang.Object |
getElementAttribute(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
Utils.AvailableAttribute attr)
Deprecated.
Returns an attribute of the element based on the input availableAttribute
type.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getElementGroupStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static java.util.List<java.lang.String> |
getElementNames(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.NamedElement> elements)
Deprecated.
return names of a collection of named elements
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element |
getElementProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
Deprecated.
Get the element's matching Slot or Properties.
|
static java.util.List<java.lang.Object> |
getElementPropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop,
boolean allowStereotypeDefaultOrInherited)
Deprecated.
A list of property values will always be returned.
|
static java.util.List<java.lang.Object> |
getElementPropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
java.lang.String propName,
boolean allowStereotypeDefaultOrInherited)
Deprecated.
|
static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
getElementsOnDiagram(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Diagram diagram)
Deprecated.
returns collection of model elements that's on the diagram
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getElementStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
java.lang.String propName)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
getErrorConstraint(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getExposeStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getExpressionStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
getFatalConstraint(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static From |
getFromAttribute(java.lang.Object attr)
Deprecated.
Convert to an From enum value
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getGeneratedFromElementProperty(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getGeneratedFromViewProperty(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
getInfoConstraint(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static <T> java.util.List<T> |
getListOfType(java.lang.Object o,
java.lang.Class<T> type)
Deprecated.
Get a list including all objects that are of the specified type and are o
or a child/grandchild of o if o is a Collection.
|
static <T> java.util.List<T> |
getListOfType(java.lang.Object o,
java.lang.Class<T> type,
java.util.Set<java.lang.Object> seen)
Deprecated.
Get a list including all objects that are of the specified type and are o
or a child/grandchild of o if o is a Collection.
|
static int |
getMultiplicity(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p)
Deprecated.
if multiplicity is not a range, returns the number if upper limit is
infinity and lower limit > 0, returns lower else returns 1
|
static java.lang.String |
getName(java.lang.Object obj)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getProductStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Package |
getRootElement(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static java.util.List<com.nomagic.magicdraw.validation.RuleViolationResult> |
getRuleViolations(com.nomagic.magicdraw.core.Project project,
java.util.Collection<ValidationSuite> vss)
Deprecated.
|
static java.util.List<com.nomagic.magicdraw.validation.RuleViolationResult> |
getRuleViolations(ValidationRule vr,
com.nomagic.magicdraw.core.Project project,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint cons)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.components.mdbasiccomponents.Component |
getSiteCharacterizationComponent(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot |
getSlot(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
Deprecated.
Get the element's matching Slot.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot> |
getSlots(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getStereotype(com.nomagic.magicdraw.core.Project project,
java.lang.String stereotypeName)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot |
getStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
Deprecated.
Get the element's matching Slots or Properties.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getStereotypePropertyByName(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype,
java.lang.String propName)
Deprecated.
Get the property of the stereotype by name.
|
static java.util.List<java.lang.Object> |
getStereotypePropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop,
boolean useDefaultIfNoSlot)
Deprecated.
Gets list of values for a stereotype property, this returns valuespecs
|
static java.lang.String |
getTypeName(java.lang.Object obj)
Deprecated.
|
static com.nomagic.magicdraw.uml.BaseElement |
getUserSelection(java.util.List<java.lang.Class<?>> types,
java.lang.String title)
Deprecated.
|
static java.lang.Boolean |
getUserYesNoAnswer(java.lang.String question)
Deprecated.
|
static java.lang.Boolean |
getUserYesNoAnswerWithButton(java.lang.String question,
java.lang.String[] buttons,
boolean includeCancel)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getViewClassStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
getViewConstraint(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element view)
Deprecated.
Constraint Utils
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property |
getViewElementsProperty(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getViewpointStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype |
getViewStereotype(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
getWarningConstraint(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static void |
guilog(java.lang.String s)
Deprecated.
Log to GUILog in UI's event dispatcher
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
intersectionOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> a)
Deprecated.
|
static boolean |
isColor(java.lang.Object o)
Deprecated.
|
static boolean |
isPopupsDisabled()
Deprecated.
|
static boolean |
isSiteChar(com.nomagic.magicdraw.core.Project project,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Package e)
Deprecated.
|
static java.lang.Boolean |
isTrue(java.lang.Object o,
boolean strict)
Deprecated.
|
static boolean |
isTypeOf(java.lang.Object object,
java.lang.String typeName)
Deprecated.
|
static java.lang.String |
join(java.util.Collection<?> s,
java.lang.String delimiter)
Deprecated.
Given a collection of stuff, joins their string representation into one
string using delimiter
|
static void |
log(java.lang.Object o)
Deprecated.
|
static void |
log(java.lang.Object o,
java.awt.Color color)
Deprecated.
|
static void |
log(java.lang.Object o,
java.lang.Object color)
Deprecated.
|
static void |
log(java.lang.Object o,
java.lang.String colorName)
Deprecated.
|
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification |
makeValueSpecification(com.nomagic.magicdraw.core.Project project,
java.lang.String value,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification valueSpec)
Deprecated.
Creates a new
ValueSpecification of the same type as valueSpec
but with a new value to be parsed from a String . |
static void |
printException(java.lang.Exception ex)
Deprecated.
|
static boolean |
recommendUpdateFromRemote(com.nomagic.magicdraw.core.Project project)
Deprecated.
|
static boolean |
recommendUpdateFromRemote(com.nomagic.magicdraw.core.Project project,
java.lang.String add)
Deprecated.
|
static <T> java.util.List<T> |
removeDuplicates(java.util.Collection<T> elements)
Deprecated.
This does not change the passed in elements collection, it returns a new
list Compared to just using Set, this preserves the order of the passed
in collection
|
static void |
resetForcedReturns()
Deprecated.
Resets all unconsumed forced return values
|
static void |
setPopupsDisabled(boolean disable)
Deprecated.
Sets boolean that can disabled popups and redirect their messages to the GUI log.
|
static void |
setPropertyValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p,
java.lang.String value)
Deprecated.
This will set the default value of p to value, based on what type the
default value currently is right now, it'll try to convert to:
LiteralBoolean, LiteralInteger, LiteralUnlimitedNatural, otherwise it'll
be a LiteralString more options possibly in future like durations, etc
|
static void |
setSlotValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot slot,
java.lang.Object value)
Deprecated.
This will set the default value of p to value, based on what type the
default value currently is right now, it'll try to convert to:
LiteralBoolean, LiteralInteger, LiteralUnlimitedNatural, otherwise it'll
be a LiteralString more options possibly in future like durations, etc
|
static void |
showPopupMessage(java.lang.String message)
Deprecated.
|
static java.lang.String |
slotValueToString(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot slot)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
sortByAttribute(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem,
java.lang.Object attr)
Deprecated.
Sorts elements by attribute, provided it is one of those supported by
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
sortByAttribute(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem,
Utils.AvailableAttribute attr)
Deprecated.
Sorts elements by a specific attribute limited to the enumeration below,
which is suspiciously similar to the possible attributes in
tableAttributeColumn...
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
sortByExpression(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem,
java.lang.Object o)
Deprecated.
|
static <T,TT extends T> |
sortByName(java.util.Collection<TT> e)
Deprecated.
Sorts e by name, returns a new list with name ordered elements
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
sortByProperty(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
Deprecated.
Sorts elements by a any property.
|
static java.lang.String |
stripHtmlWrapper(java.lang.String before)
Deprecated.
Remove HTML wrapper.
|
static java.awt.Color |
toColor(java.lang.String colorString)
Deprecated.
Get the Color by name or by RGB specification.
|
static java.lang.String |
toStringNameAndType(java.lang.Object o,
boolean includeId,
boolean useToStringIfNull)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
unionOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> a)
Deprecated.
|
static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
xorOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> cc)
Deprecated.
returns elements not shared
misnomer - this is really doing the symmetric difference
|
public static org.apache.log4j.Logger log
protected static final java.lang.String[] trueStrings
public static java.util.Map<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element,java.util.Map<java.lang.String,java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>>> nameOrIdSearchOwnerCache
public static java.util.Map<java.lang.String,java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> nameOrIdSearchCache
public static java.util.Map<java.lang.String,com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> nameOrIdSingleElementSearchCache
public static java.util.Map<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element,java.util.Map<java.lang.String,com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> nameOrIdSingleElementSearchOwnerCache
public static final java.util.regex.Pattern HTML_WRAPPER_START
public static final java.util.regex.Pattern HTML_WRAPPER_END
public static <T> java.util.List<T> removeDuplicates(java.util.Collection<T> elements)
elements
- public static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> getElementsOnDiagram(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Diagram diagram)
diagram
- selected diagrampublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Diagram> filterDiagramsByDiagramTypes(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> diagrams, java.util.List<java.lang.String> types, boolean include)
diagrams
- can be a list of any model element, only diagrams will be
tested and returnedtypes
- this needs to be a list of the diagram type names. This
usually shows up when you hover over the new diagram icon in
magicdrawinclude
- whether to include the diagram type or notpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByStereotype(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype, boolean include, boolean derived)
public static java.lang.Boolean isTrue(java.lang.Object o, boolean strict)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByExpression(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.lang.String query, boolean include, boolean iterate)
elements
- query
- ocl expressioninclude
- whether to include element or not if query is trueiterate
- whether to apply query to each element or collection as a wholepublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByStereotypes(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.util.Collection<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> stereotypes, boolean include, boolean derived)
elements
- stereotypes
- include
- whether to include or exclude elements with given stereotypesderived
- whether to consider derived stereotypespublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByNameRegex(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.util.Collection<java.lang.String> regex, boolean include)
elements
- regex
- include
- element will be returned if include is true and matched, or include is false and not matchedpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByJavaClasses(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.util.Collection<java.lang.Class<?>> javaClasses, boolean include)
elements
- javaClasses
- include
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> filterElementsByMetaclasses(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Class> metaclasses, boolean include)
elements
- metaclasses
- these are the metaclass element classes from magicdraw's uml
profileinclude
- whether to include elements with given metaclasses or not,
this will always include derivedpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectOwners(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, int depth)
e
- depth
- collect to what level of depth - 0 is infinitepublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectOwnedElements(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, int depth)
e
- depth
- collect to what level of depth - 0 is infinitepublic static <T> java.util.List<T> getListOfType(java.lang.Object o, java.lang.Class<T> type)
o
- type
- public static <T> java.util.List<T> getListOfType(java.lang.Object o, java.lang.Class<T> type, java.util.Set<java.lang.Object> seen)
o
- type
- seen
- a list of already visited objects to avoid infinite recursionpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectByExpression(java.lang.Object element, java.lang.Object query)
element
- the context of the queryquery
- a query expression, such as OCL text in a Stringpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectByExpression(java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elements, java.lang.String query, boolean iterate)
elements
- contexts for evaluating the expressionquery
- iterate
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectAssociatedElements(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, int depth, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.AggregationKind kind)
e
- needs to be a Classifier, else empty list will be returneddepth
- collect to what level of depth - 0 is infinitekind
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipJavaClasses(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.util.Collection<java.lang.Class<?>> javaClasses, int direction, int depth)
e
- javaClasses
- this is the class of the relationships to considerdirection
- 0 is both, 1 is outward, 2 is inwarddepth
- collect to what level of depth - 0 is infinitepublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipJavaClass(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.lang.Class<?> c, int direction, int depth)
e
- c
- direction
- 0 is both, 1 is outward, 2 is inwarddepth
- collect to what level of depth - 0 is infinitepublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipMetaclasses(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Class> metaclasses, int direction, int depth)
e
- metaclasses
- these are the metaclass element classes from magicdraw's uml
profile, this will always considered derived relationship
metaclassesdirection
- 0 means both, 1 means e is the client, 2 means e is the
supplierpublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipStereotypes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.util.Collection<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> stereotypes, int direction, boolean derived, int depth)
e
- stereotypes
- direction
- 0 means both, 1 means e is the client, 2 means e is the
supplierderived
- whether to consider derived stereotypespublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype, int direction, boolean derived, int depth)
e
- stereotype
- direction
- direction 0 means both, 1 means e is the client, 2 means e is
the supplierderived
- depth
- collect to what level of depth - 0 is infinitepublic static java.util.List<java.lang.Object> collectByStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p)
protected static void badDirectionError(int direction, java.lang.String methodSignature)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> collectDirectedRelatedElementsByRelationshipStereotypeString(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.lang.String stereotype, int direction, boolean derived, int depth)
e
- stereotype
- direction
- direction 0 means both, 1 means e is the client, 2 means e is
the supplierderived
- depth
- collect to what level of depth - 0 is infinitepublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property> getAttributes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, boolean includeInherited)
e
- includeInherited
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> intersectionOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> a)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> unionOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> a)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> xorOfCollections(java.util.Collection<? extends java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>> cc)
cc
- public static <T,TT extends T> java.util.List<T> sortByName(java.util.Collection<TT> e)
e
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> sortByAttribute(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem, Utils.AvailableAttribute attr)
elem
- attr
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> sortByProperty(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
elem
- prop
- public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> sortByAttribute(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem, java.lang.Object attr)
elem
- the element whose attribute is soughtattr
- the type of attribute (name, value, ...)public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> sortByExpression(java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> elem, java.lang.Object o)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.DirectedRelationship> findDirectedRelationshipsBetween(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element source, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element target)
source
- target
- public static boolean isTypeOf(java.lang.Object object, java.lang.String typeName)
object
- the object to test for a matchtypeName
- regular expression String according to Patternpublic static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Package getRootElement(com.nomagic.magicdraw.core.Project project)
public static boolean isSiteChar(com.nomagic.magicdraw.core.Project project, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Package e)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> findByName(com.nomagic.magicdraw.core.Project project, java.lang.String pattern, boolean getJustFirst)
public static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> findByName(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element owner, java.lang.String pattern, boolean getJustFirst)
@Deprecated public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getStereotype(com.nomagic.magicdraw.core.Project project, java.lang.String stereotypeName)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getConformStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getExposeStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getElementGroupStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getViewStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getViewpointStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getAspectStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getCharacterizesStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getDocumentStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getProductStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getExpressionStereotype(com.nomagic.magicdraw.core.Project project)
@Deprecated public static com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype getViewClassStereotype(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getGeneratedFromViewProperty(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getGeneratedFromElementProperty(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getViewElementsProperty(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.components.mdbasiccomponents.Component getSiteCharacterizationComponent(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint getViewConstraint(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element view)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint getWarningConstraint(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint getErrorConstraint(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint getFatalConstraint(com.nomagic.magicdraw.core.Project project)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint getInfoConstraint(com.nomagic.magicdraw.core.Project project)
public static void guilog(java.lang.String s)
public static com.nomagic.magicdraw.uml.BaseElement getUserSelection(java.util.List<java.lang.Class<?>> types, java.lang.String title)
types
- title
- title of the dialog boxpublic static void showPopupMessage(java.lang.String message)
public static java.lang.Boolean getUserYesNoAnswerWithButton(java.lang.String question, java.lang.String[] buttons, boolean includeCancel)
public static java.lang.Boolean getUserYesNoAnswer(java.lang.String question)
question
- public static java.util.Set<com.nomagic.magicdraw.annotation.Annotation> getAnnotations(ValidationRule vr, com.nomagic.magicdraw.core.Project project, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint cons)
public static java.util.List<com.nomagic.magicdraw.validation.RuleViolationResult> getRuleViolations(ValidationRule vr, com.nomagic.magicdraw.core.Project project, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint cons)
public static java.util.List<com.nomagic.magicdraw.validation.RuleViolationResult> getRuleViolations(com.nomagic.magicdraw.core.Project project, java.util.Collection<ValidationSuite> vss)
public static void displayValidationWindow(com.nomagic.magicdraw.core.Project project, ValidationSuite vs, java.lang.String title)
public static void displayValidationWindow(com.nomagic.magicdraw.core.Project project, java.util.Collection<ValidationSuite> vss, java.lang.String title)
public static void copyStereotypes(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element a, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element b)
a
- b
- public static void createGeneralization(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Classifier parent, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Classifier child)
parent
- child
- public static void createDependencyWithStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element from, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element to, com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype s)
public static void setPropertyValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p, java.lang.String value)
p
- value
- public static void setSlotValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot slot, java.lang.Object value)
slot
- value
- public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification makeValueSpecification(com.nomagic.magicdraw.core.Project project, java.lang.String value, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification valueSpec)
ValueSpecification
of the same type as valueSpec
but with a new value to be parsed from a String
. It'll try to
convert to: LiteralBoolean, LiteralInteger, LiteralUnlimitedNatural,
otherwise it'll be a LiteralString more options possibly in future like
durations, etcvalue
- valueSpec
- public static From getFromAttribute(java.lang.Object attr)
attr
- the attribute of some typepublic static Utils.AvailableAttribute getAvailableAttribute(java.lang.Object attr)
attr
- the attribute of some typepublic static java.lang.Object getElementAttribute(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, Utils.AvailableAttribute attr)
elem
- the element whose attribute is soughtattr
- the type of attribute (name, value, ...)public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getClassProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop, boolean inherited)
elem
- the owner of the Propertyprop
- a property of the same name as that owned by the input Elementinherited
- ignored for now, should indicate whether to look for inherited
propertiespublic static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot getSlot(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
elem
- the source Elementprop
- the Stereotype tag that the Slot instantiatespublic static java.util.List<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot> getSlots(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem)
elem
- public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot getStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
elem
- the Element with the sought Properties.prop
- the Stereotype tag or Class Propertypublic static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getClassProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, java.lang.String propName, boolean inherited)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getElementStereotypeProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, java.lang.String propName)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property getStereotypePropertyByName(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype stereotype, java.lang.String propName)
stereotype
- propName
- public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element getElementProperty(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop)
elem
- the Element with the sought Properties.prop
- the Stereotype tag or Class Propertypublic static java.util.List<java.lang.Object> getElementPropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop, boolean allowStereotypeDefaultOrInherited)
elem
- the owner of the Propertyprop
- a property of the same name as that owned by the input Elementpublic static java.util.List<java.lang.Object> getElementPropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, java.lang.String propName, boolean allowStereotypeDefaultOrInherited)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.ValueSpecification getClassPropertyValue(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop, boolean includeInherited)
elem
- the owner of the Propertyprop
- a property of the same name as that owned by the input Elementpublic static java.util.List<java.lang.Object> getStereotypePropertyValues(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element elem, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property prop, boolean useDefaultIfNoSlot)
elem
- prop
- useDefaultIfNoSlot
- public static void log(java.lang.Object o)
public static java.awt.Color toColor(java.lang.String colorString)
colorString
- public static boolean isColor(java.lang.Object o)
public static void log(java.lang.Object o, java.lang.String colorName)
public static void log(java.lang.Object o, java.awt.Color color)
public static void log(java.lang.Object o, java.lang.Object color)
public static java.lang.String slotValueToString(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Slot slot)
slot
- public static java.lang.String floatTruncate(java.lang.String f, int p)
ex. if f is 2.31111111 and p is 2, returns 2.31
f
- p
- public static DBTable getDBTableFromEditableTable(EditableTable et, boolean addLineNum)
et
- public static DBTable getDBTableFromEditableTable(EditableTable et, boolean addLineNum, java.lang.Integer... merge)
et
- the editable table.merge
- this is a variable length parameter, indicates how many
columns you want to merge consecutively. For example, if you
want to merge the first 2 columns and then the next 2
columnes, do getDBTableFromEditableTable(et, 2, 2)public static java.lang.String stripHtmlWrapper(java.lang.String before)
before
- public static java.lang.String join(java.util.Collection<?> s, java.lang.String delimiter)
s
- delimiter
- public static java.lang.String getName(java.lang.Object obj)
obj
- public static java.lang.String getTypeName(java.lang.Object obj)
public static java.lang.String toStringNameAndType(java.lang.Object o, boolean includeId, boolean useToStringIfNull)
public static java.util.List<java.lang.String> getElementNames(java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.NamedElement> elements)
elements
- public static int getMultiplicity(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Property p)
p
- public static void printException(java.lang.Exception ex)
public static boolean recommendUpdateFromRemote(com.nomagic.magicdraw.core.Project project)
public static boolean recommendUpdateFromRemote(com.nomagic.magicdraw.core.Project project, java.lang.String add)
public static void setPopupsDisabled(boolean disable)
disable
- true to redirect popups to gui log, false to renable normal popup behaviorpublic static boolean isPopupsDisabled()
public static void forceDialogReturnFalse()
public static void resetForcedReturns()