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 int
Tabular section line number length before 8.3.27.static final int
Tabular section line number length since 8.3.27.static final int
Tabular 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 EObjectTrie
createEObjectTrieForTopModelObjects
(Collection<org.eclipse.emf.ecore.EObject> topModelObjects, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider) Creates anEObjectTrie
from the given collection of top model objects.static Collection<TypeItem>
getAllProducingTypes
(MdObject mdObject) Gets collection of producing type ofmdObject
static Value
getDefaultStyleElementTypeValue
(StyleElementType styleElementType, IV8Project v8project) Returns default value for specified element type.static String
getFullyQualifiedName
(Field field) Returns the fully qualified name of anField
, ornull
if the name cannot be determined.static org.eclipse.xtext.naming.QualifiedName
getFullyQualifiedName
(MdObject mdObject) Returns the fully qualified name of an MdObject, ornull
if the name cannot be determined.static org.eclipse.xtext.naming.QualifiedName
getFullyQualifiedNameRu
(MdObject mdObject) Returns the fully qualified nameRu of an MdObject, ornull
if the name cannot be determined.static String
getFullyQualifiendNameRu
(Field field) Returns the Russian fully qualified name of anField
, ornull
if the name cannot be determined.static int
getLineNumberLength
(IV8Project v8Project) Returns project line number length.static String
Returns the name of theMdObject
.static String
getModuleName
(org.eclipse.emf.ecore.EReference reference) Gets the name of the module which is referenced by the given object.static org.eclipse.xtext.naming.QualifiedName
getProxySupportsFullQualifiedName
(MdObject mdObject) Returns md-object qualified name.static org.eclipse.xtext.naming.QualifiedName
getTopMdObjectFullyQualifiedName
(org.eclipse.emf.ecore.EClass eClass, String name) Gets FQN of the MD object identified by the givenEClass
and name.static boolean
hasRealDatabasePresentation
(MdObject object) Checks thatobject
has real association with databasestatic boolean
isIndependentObject
(Object object) Checks object is independent forStandaloneContent
.static boolean
isMobileApplicationUsePurposes
(IV8Project v8Project) Checks if the specifiedIV8Project
has only one mobile application use purpose.static boolean
isMobileApplicationUsePurposes
(Collection<ApplicationUsePurpose> usePurposes) Deprecated.static boolean
isSuppressSettingsFeature
(org.eclipse.emf.ecore.EStructuralFeature reference) Returnstrue
ifEStructuralFeature
represents a suppression objectstatic boolean
isUserSettable
(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, ornull
if the name cannot be determined. Some examples of the returned names:Сonfiguration1
(only Configuration objects may have a one-segment name)Catalog.Catalog1
Catalog.Catalog1.Attribute.Attribute1
- Parameters:
mdObject
- notnull
- Returns:
- the fully qualified name of an MdObject, or
null
if 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 givenEClass
and name.- Parameters:
eClass
- theEClass
of the object, may not benull
, must be descendant of MD_OBJECT.name
- the name of the object ornull
if is not applicable.- Returns:
- the FQN, not
null
.
-
getFullyQualifiedNameRu
Returns the fully qualified nameRu of an MdObject, ornull
if the name cannot be determined. Some examples of the returned names:Сonfiguration1
(only Configuration objects may have a one-segment name)Catalog.Catalog1
Catalog.Catalog1.Attribute.Attribute1
- Parameters:
mdObject
- notnull
- Returns:
- the fully qualified nameRu of an MdObject, or
null
if 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:
true
if the given feature is settable by the user, andfalse
if 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 ofApplicationUsePurpose
elements for check, cannot benull
- Returns:
true
if given collection is only for mobile applications,false
in otherwise
-
isMobileApplicationUsePurposes
Checks if the specifiedIV8Project
has only one mobile application use purpose.- Parameters:
v8Project
- theIV8Project
for check, can benull
- Returns:
true
if the givenIV8Project
has only one mobile application use purpose andfalse
if the givenIV8Project
isnull
or 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 anEObjectTrie
from the given collection of top model objects.- Parameters:
topModelObjects
- the given collection of top model objects, cannot benull
qualifiedNameProvider
- the qualified name provider, cannot benull
- Returns:
- the created
EObjectTrie
, nevernull
-
hasRealDatabasePresentation
Checks thatobject
has real association with database- Parameters:
object
- checking object, cannot benull
- Returns:
true
if object has presentation in database,false
otherwise
-
getDefaultStyleElementTypeValue
public static Value getDefaultStyleElementTypeValue(StyleElementType styleElementType, IV8Project v8project) Returns default value for specified element type.- Parameters:
styleElementType
- the style elemet type, cannot benull
v8project
- the v8 project, cannot benull
- Returns:
- the default value, can be
null
-
isSuppressSettingsFeature
public static boolean isSuppressSettingsFeature(org.eclipse.emf.ecore.EStructuralFeature reference) Returnstrue
ifEStructuralFeature
represents a suppression object- Parameters:
reference
- the feature reference, cannot benull
- Returns:
true
ifEStructuralFeature
represents a suppression object
-
getFullyQualifiedName
Returns the fully qualified name of anField
, ornull
if the name cannot be determined. -
getFullyQualifiendNameRu
Returns the Russian fully qualified name of anField
, ornull
if 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:
true
is independent,false
otherwise
-
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)