Package com._1c.g5.v8.dt.md
Class MdUtil
java.lang.Object
com._1c.g5.v8.dt.md.MdUtil
Utility class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intTabular section line number length before 8.3.27.static final intTabular section line number length since 8.3.27.static final intTabular section line number length since 8.3.27 but with compatibility mode 8.3.26 and less. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EObjectTriecreateEObjectTrieForTopModelObjects(Collection<org.eclipse.emf.ecore.EObject> topModelObjects, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider) Creates anEObjectTriefrom the given collection of top model objects.static Collection<TypeItem>getAllProducingTypes(MdObject mdObject) Gets collection of producing type ofmdObjectstatic ValuegetDefaultStyleElementTypeValue(StyleElementType styleElementType, IV8Project v8project) Returns default value for specified element type.static StringgetFullyQualifiedName(Field field) Returns the fully qualified name of anField, ornullif the name cannot be determined.static org.eclipse.xtext.naming.QualifiedNamegetFullyQualifiedName(MdObject mdObject) Returns the fully qualified name of an MdObject, ornullif the name cannot be determined.static org.eclipse.xtext.naming.QualifiedNamegetFullyQualifiedNameRu(MdObject mdObject) Returns the fully qualified nameRu of an MdObject, ornullif the name cannot be determined.static StringgetFullyQualifiendNameRu(Field field) Returns the Russian fully qualified name of anField, ornullif the name cannot be determined.static intgetLineNumberLength(IV8Project v8Project) Returns project line number length.static StringReturns the name of theMdObject.static StringgetModuleName(org.eclipse.emf.ecore.EReference reference) Gets the name of the module which is referenced by the given object.static org.eclipse.xtext.naming.QualifiedNamegetProxySupportsFullQualifiedName(MdObject mdObject) Returns md-object qualified name.static org.eclipse.xtext.naming.QualifiedNamegetTopMdObjectFullyQualifiedName(org.eclipse.emf.ecore.EClass eClass, String name) Gets FQN of the MD object identified by the givenEClassand name.static booleanhasRealDatabasePresentation(MdObject object) Checks thatobjecthas real association with databasestatic booleanisIndependentObject(Object object) Checks object is independent forStandaloneContent.static booleanisMobileApplicationUsePurposes(IV8Project v8Project) Checks if the specifiedIV8Projecthas only one mobile application use purpose.static booleanisMobileApplicationUsePurposes(Collection<ApplicationUsePurpose> usePurposes) Deprecated.static booleanisSuppressSettingsFeature(org.eclipse.emf.ecore.EStructuralFeature reference) ReturnstrueifEStructuralFeaturerepresents a suppression objectstatic booleanisUserSettable(org.eclipse.emf.ecore.EStructuralFeature feature) Returns whether the given feature is settable by the user (i.e. not "special").
-
Field Details
-
K_VT_LINE_NO_LENGTH
public static final int K_VT_LINE_NO_LENGTHTabular section line number length before 8.3.27.- See Also:
-
K_VT_LINE_NO_LENGTH_MIN
public static final int K_VT_LINE_NO_LENGTH_MINTabular section line number length since 8.3.27 but with compatibility mode 8.3.26 and less.- See Also:
-
K_VT_LINE_NO_LENGTH_MAX
public static final int K_VT_LINE_NO_LENGTH_MAXTabular section line number length since 8.3.27.- See Also:
-
-
Constructor Details
-
MdUtil
public MdUtil()
-
-
Method Details
-
getFullyQualifiedName
Returns the fully qualified name of an MdObject, ornullif the name cannot be determined. Some examples of the returned names:Сonfiguration1(only Configuration objects may have a one-segment name)Catalog.Catalog1Catalog.Catalog1.Attribute.Attribute1
- Parameters:
mdObject- notnull- Returns:
- the fully qualified name of an MdObject, or
nullif the name cannot be determined
-
getTopMdObjectFullyQualifiedName
public static org.eclipse.xtext.naming.QualifiedName getTopMdObjectFullyQualifiedName(org.eclipse.emf.ecore.EClass eClass, String name) Gets FQN of the MD object identified by the givenEClassand name.- Parameters:
eClass- theEClassof the object, may not benull, must be descendant of MD_OBJECT.name- the name of the object ornullif is not applicable.- Returns:
- the FQN, not
null.
-
getFullyQualifiedNameRu
Returns the fully qualified nameRu of an MdObject, ornullif the name cannot be determined. Some examples of the returned names:Сonfiguration1(only Configuration objects may have a one-segment name)Catalog.Catalog1Catalog.Catalog1.Attribute.Attribute1
- Parameters:
mdObject- notnull- Returns:
- the fully qualified nameRu of an MdObject, or
nullif the name cannot be determined
-
isUserSettable
public static boolean isUserSettable(org.eclipse.emf.ecore.EStructuralFeature feature) Returns whether the given feature is settable by the user (i.e. not "special").- Parameters:
feature- notnull- Returns:
trueif the given feature is settable by the user, andfalseif the feature is "special"
-
getModuleName
Gets the name of the module which is referenced by the given object.- Parameters:
reference- the reference.- Returns:
- the module name.
-
isMobileApplicationUsePurposes
@Deprecated public static boolean isMobileApplicationUsePurposes(Collection<ApplicationUsePurpose> usePurposes) Deprecated.The specified collection ofApplicationUsePurpose-s is only for mobile applications- Parameters:
usePurposes- the collection ofApplicationUsePurposeelements for check, cannot benull- Returns:
trueif given collection is only for mobile applications,falsein otherwise
-
isMobileApplicationUsePurposes
Checks if the specifiedIV8Projecthas only one mobile application use purpose.- Parameters:
v8Project- theIV8Projectfor check, can benull- Returns:
trueif the givenIV8Projecthas only one mobile application use purpose andfalseif the givenIV8Projectisnullor has empty use purposes or has personal computer use purpose
-
getAllProducingTypes
Gets collection of producing type ofmdObject- Parameters:
mdObject- object for getting it producing types, can't benull- Returns:
- collection of producing type of
mdObject, nevernull
-
createEObjectTrieForTopModelObjects
public static EObjectTrie createEObjectTrieForTopModelObjects(Collection<org.eclipse.emf.ecore.EObject> topModelObjects, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider) Creates anEObjectTriefrom the given collection of top model objects.- Parameters:
topModelObjects- the given collection of top model objects, cannot benullqualifiedNameProvider- the qualified name provider, cannot benull- Returns:
- the created
EObjectTrie, nevernull
-
hasRealDatabasePresentation
Checks thatobjecthas real association with database- Parameters:
object- checking object, cannot benull- Returns:
trueif object has presentation in database,falseotherwise
-
getDefaultStyleElementTypeValue
public static Value getDefaultStyleElementTypeValue(StyleElementType styleElementType, IV8Project v8project) Returns default value for specified element type.- Parameters:
styleElementType- the style elemet type, cannot benullv8project- the v8 project, cannot benull- Returns:
- the default value, can be
null
-
isSuppressSettingsFeature
public static boolean isSuppressSettingsFeature(org.eclipse.emf.ecore.EStructuralFeature reference) ReturnstrueifEStructuralFeaturerepresents a suppression object- Parameters:
reference- the feature reference, cannot benull- Returns:
trueifEStructuralFeaturerepresents a suppression object
-
getFullyQualifiedName
Returns the fully qualified name of anField, ornullif the name cannot be determined. -
getFullyQualifiendNameRu
Returns the Russian fully qualified name of anField, ornullif the name cannot be determined. -
getProxySupportsFullQualifiedName
public static org.eclipse.xtext.naming.QualifiedName getProxySupportsFullQualifiedName(MdObject mdObject) Returns md-object qualified name. Proxy supports.- Parameters:
mdObject- the md-object, cannot benull, may be proxy- Returns:
- the qualified name, cannot be
null
-
isIndependentObject
Checks object is independent forStandaloneContent.- Parameters:
object- the object, cannot benull- Returns:
trueis independent,falseotherwise
-
getMdName
Returns the name of theMdObject. If object synonym exists then return synonym, otherwise return object's name -
getLineNumberLength
Returns project line number length. Since 8.3.27- Parameters:
v8Project- the v8 project, can benull- Returns:
- the project line number length.
-
MdClassUtil.isMobileApplicationUsePurposes(Collection)