// Sort the commands extension point based on element name.
final IConfigurationElement[] commandsExtensionPoint = registry
.getConfigurationElementsFor(EXTENSION_COMMANDS);
for (int i = 0; i < commandsExtensionPoint.length; i++) {
final IConfigurationElement configurationElement = commandsExtensionPoint[i];
final String name = configurationElement.getName();
// Check if it is a handler submission or a command definition.
if (TAG_HANDLER_SUBMISSION.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements,
INDEX_HANDLER_SUBMISSIONS, handlerSubmissionCount++);
} else if (TAG_COMMAND.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements,
INDEX_COMMAND_DEFINITIONS, commandDefinitionCount++);
}
}
// Sort the handler extension point based on element name.
final IConfigurationElement[] handlersExtensionPoint = registry
.getConfigurationElementsFor(EXTENSION_HANDLERS);
for (int i = 0; i < handlersExtensionPoint.length; i++) {
final IConfigurationElement configurationElement = handlersExtensionPoint[i];
final String name = configurationElement.getName();
// Check if it is a handler submission or a command definition.
if (TAG_HANDLER.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements,