Class CmiCustomizationUtil
java.lang.Object
com._1c.g5.v8.dt.internal.cmi.tasks.CmiCustomizationUtil
Provides utility methods to be used by tasks responsible for
CMI customization.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommandsPlacementFragmentfindCurrentPlacementFragment(CommandsPlacement commandsPlacement, Command command) Finds current placement fragment for the command.static CommandsOrderFragmentfindOrderFragment(CommandInterface commandInterface, CommandGroup group) Finds customization fragment by the group in the given command interface.static CommandsOrderFragmentfindOrderFragment(CommandsOrder commandsOrder, CommandGroup group) Find customization fragment by the group in the given "commands order".static CommandsPlacementFragmentfindPlacementFragment(CommandsPlacement commandsPlacement, CommandGroup group) Gets customization placement fragment.static CommandsVisibilityFragmentfindVisibilityFragment(CommandInterface commandInterface, Command command) Finds custom visibility fragment in CI.static CommandsPlacementgetOrCreatePlacement(CommandInterface commandInterface) Gets or create a new customization placement.static CommandsPlacementFragmentgetOrCreatePlacementFragment(CommandsPlacement placement, CommandGroup group) Gets or creates placement fragment.static booleanisAnySubsystemIncludedInCommandInterface(Configuration configuration) Checks if at least one subsystem is included into the command interface.static booleanremoveCommand(List<Command> commands, Command command) Removes the command from the list.static CommandGroupresolveGroup(Command command) Resolves group for the command.
-
Method Details
-
findCurrentPlacementFragment
public static CommandsPlacementFragment findCurrentPlacementFragment(CommandsPlacement commandsPlacement, Command command) Finds current placement fragment for the command.- Parameters:
commandsPlacement- The fragment to search into.command- The command to find in fragment.- Returns:
- The found fragment if any.
-
findOrderFragment
public static CommandsOrderFragment findOrderFragment(CommandInterface commandInterface, CommandGroup group) Finds customization fragment by the group in the given command interface.- Parameters:
commandInterface- the command interface.group- the group.- Returns:
- fragment if found,
nullotherwise.
-
findOrderFragment
public static CommandsOrderFragment findOrderFragment(CommandsOrder commandsOrder, CommandGroup group) Find customization fragment by the group in the given "commands order".- Parameters:
commandsOrder- the commands order.group- the group.
-
findPlacementFragment
public static CommandsPlacementFragment findPlacementFragment(CommandsPlacement commandsPlacement, CommandGroup group) Gets customization placement fragment.- Parameters:
commandInterface- The target command interface.- Returns:
- The command placement fragment.
-
findVisibilityFragment
public static CommandsVisibilityFragment findVisibilityFragment(CommandInterface commandInterface, Command command) Finds custom visibility fragment in CI.- Parameters:
commandInterface- The command interface to search within.command- The command to search the fragment for.- Returns:
- The fragment of any.
-
getOrCreatePlacement
Gets or create a new customization placement.- Parameters:
commandInterface- The target command interface.- Returns:
- The command placement.
-
getOrCreatePlacementFragment
public static CommandsPlacementFragment getOrCreatePlacementFragment(CommandsPlacement placement, CommandGroup group) Gets or creates placement fragment.- Parameters:
placement- The target placement.group- The target group.- Returns:
- The found or newly created fragment.
-
isAnySubsystemIncludedInCommandInterface
Checks if at least one subsystem is included into the command interface. For now at least one top subsystem should be included (we aren't support adding subordinates without parents into the CMI)- Parameters:
Configuration-- Returns:
-
removeCommand
Removes the command from the list.- Parameters:
commands- the command list to remove the command from.command- the command to remove from the list.- Returns:
trueif the command was found in the list and removed,falseotherwise.
-
resolveGroup
Resolves group for the command.- Parameters:
command- the command to resolve group for.- Returns:
- the command group if applicable,
nullotherwise.
-