Package com._1c.g5.v8.dt.cmi.model.util
Class CmiModelUtil
java.lang.Object
com._1c.g5.v8.dt.cmi.model.util.CmiModelUtil
Command interface utility class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandInterfacecreateCommandInterface(IBmTransaction transaction, String fqn) Creates command interface.static CommandInterfacecreateConfigurationCommandInterface(Configuration configuration, IBmTransaction transaction) Creates configuration command interface.static CommandInterfacecreateMainSectionCommandInterface(Configuration configuration, IBmTransaction transaction) Creates main section command interface.static StringgetCategoryRepresentation(CommandGroupCategory commandGroupCategory) Gets the text representation of command group category.static ObjectgetCommandGroup(org.eclipse.emf.ecore.EObject command, CommandInterface commandInterface) Gets command command group.static CommandGroupCategorygetCommandGroupCategory(org.eclipse.emf.ecore.EObject group) Gets command group category.static StringgetCommandGroupName(CommandGroup group) Gets command group name.static StringgetCommandGroupRepresentation(CommandGroup group, Configuration configuration) Gets command group representation.static StringgetCommandGroupRepresentation(CommandGroup group, Language language) Gets command group representation.static StringgetCommandName(Command command) Gets command name.static StringgetCommandRepresentation(Command command, Configuration configuration) Gets command representatonstatic StringgetCommandRepresentation(Command command, Language language) Gets command representatonstatic CommandsOrderFragmentgetCommandsOrderFragmentForGroup(org.eclipse.emf.ecore.EObject group, CommandInterface commandInterface) Gets commands order fragment fo group.static booleangetCommandVisibility(org.eclipse.emf.ecore.EObject command, CommandInterface commandInterface) Gets command visibility.static CommandGroupgetDefaultCommandGroup(org.eclipse.emf.ecore.EObject command) Gets default command group.static booleangetDefaultCommandVisibility(org.eclipse.emf.ecore.EObject command) Get default command visibility.static AdjustableBooleangetDefaultCommandVisible(org.eclipse.emf.ecore.EObject command) Gets command visibility.static org.eclipse.emf.ecore.EObjectgetEObjectByDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic) Gets diagnostic e-object.static StringgetProxyUuid(org.eclipse.emf.ecore.EObject eObject) Gets proxy object representationstatic StringGets group representation for standard command group.static booleanisEObjectEquals(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2) Check e-object equals (with proxy representation)static booleanisSameBmObject(org.eclipse.emf.ecore.EObject object1, org.eclipse.emf.ecore.EObject object2) Determines whether two possibly-null objects are same.
-
Constructor Details
-
CmiModelUtil
public CmiModelUtil()
-
-
Method Details
-
createCommandInterface
Creates command interface.- Parameters:
transaction- The transaction the command interface should be attached to.fqn- the command interface FQN.- Returns:
- the created command interface.
-
createConfigurationCommandInterface
public static CommandInterface createConfigurationCommandInterface(Configuration configuration, IBmTransaction transaction) Creates configuration command interface.- Parameters:
configuration- the configuration.transaction- The transaction the command interface should be attached to.- Returns:
- the created command interface.
-
createMainSectionCommandInterface
public static CommandInterface createMainSectionCommandInterface(Configuration configuration, IBmTransaction transaction) Creates main section command interface.- Parameters:
configuration- the configuration.transaction- The transaction the command interface should be attached to.- Returns:
- the created command interface.
-
getCommandGroup
public static Object getCommandGroup(org.eclipse.emf.ecore.EObject command, CommandInterface commandInterface) Gets command command group.- Parameters:
command- the commandcommandInterface- the interface- Returns:
- the commands group
-
getCommandGroupCategory
Gets command group category.- Parameters:
group- the group- Returns:
- the group category
-
getCommandGroupName
Gets command group name.- Parameters:
group- the group- Returns:
- tne group name
-
getCommandGroupRepresentation
Gets command group representation.- Parameters:
group- the groupconfiguration- the confuguration- Returns:
- the command group name
-
getStandardCommandGroupRepresentation
Gets group representation for standard command group.- Parameters:
group- the standard group- Returns:
- the group representation
-
getCommandGroupRepresentation
Gets command group representation.- Parameters:
group- the grouplanguage- the language, may benull- Returns:
- the command group name
-
getCommandName
Gets command name.- Parameters:
command- the command- Returns:
- the command name
-
getCommandRepresentation
Gets command representaton- Parameters:
command- the commandconfiguration- the configuration- Returns:
- the name
-
getCommandRepresentation
Gets command representaton- Parameters:
command- the commandlanguage- the language, may benull- Returns:
- the name
-
getCommandsOrderFragmentForGroup
public static CommandsOrderFragment getCommandsOrderFragmentForGroup(org.eclipse.emf.ecore.EObject group, CommandInterface commandInterface) Gets commands order fragment fo group.- Parameters:
group- the groupcommandInterface- the interface- Returns:
- the fragment, may be
null
-
getCommandVisibility
public static boolean getCommandVisibility(org.eclipse.emf.ecore.EObject command, CommandInterface commandInterface) Gets command visibility.- Parameters:
command- the commandcommandInterface- the interface- Returns:
- true is visible
-
getDefaultCommandGroup
Gets default command group.- Parameters:
command- the command- Returns:
- the group
-
getDefaultCommandVisibility
public static boolean getDefaultCommandVisibility(org.eclipse.emf.ecore.EObject command) Get default command visibility.- Parameters:
command- the command- Returns:
- true is visible
-
getDefaultCommandVisible
Gets command visibility.- Parameters:
command- the command- Returns:
- the visibility
-
getEObjectByDiagnostic
public static org.eclipse.emf.ecore.EObject getEObjectByDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic) Gets diagnostic e-object.- Parameters:
diagnostic- the diagnostic- Returns:
- the e-object
-
getProxyUuid
Gets proxy object representation- Parameters:
eObject- the e-object- Returns:
- the representstion
-
isEObjectEquals
public static boolean isEObjectEquals(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2) Check e-object equals (with proxy representation)- Parameters:
eObject1- the first e-objecteObject2- the second e-object- Returns:
- true is equals
-
isSameBmObject
public static boolean isSameBmObject(org.eclipse.emf.ecore.EObject object1, org.eclipse.emf.ecore.EObject object2) Determines whether two possibly-null objects are same.- Returns
falseifobject1orobject2is null. - else if
object1andobject2are both proxy returnstrueif their proxy URI's are identical, returnsfalseotherwise; - else if
object1andobject2are both non-null and instance ofIBmObjectreturnstrueif theirIBmObject.bmGetId()s are identical, returnsfalseotherwise; - else returns
trueifobject1andobject2are both non-null and they are equal according toObject.equals(Object). - Returns
falsein all other situations.
- Parameters:
object1- the first instance.object2- the second instance.
- Returns
-
getCategoryRepresentation
Gets the text representation of command group category.- Parameters:
commandGroupCategory- the given command group category, can not benull- Returns:
- the text representation of command group category, may be
null
-