*/
protected final void read() {
super.read();
// Create the extension registry mementos.
final IExtensionRegistry registry = Platform.getExtensionRegistry();
int activeSchemeElementCount = 0;
int bindingDefinitionCount = 0;
int schemeDefinitionCount = 0;
final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[3][];
// Sort the bindings extension point based on element name.
final IConfigurationElement[] bindingsExtensionPoint = registry
.getConfigurationElementsFor(EXTENSION_BINDINGS);
for (int i = 0; i < bindingsExtensionPoint.length; i++) {
final IConfigurationElement configurationElement = bindingsExtensionPoint[i];
final String name = configurationElement.getName();
// Check if it is a binding definition.
if (TAG_KEY.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements,
INDEX_BINDING_DEFINITIONS, bindingDefinitionCount++);
} else
// Check to see if it is a scheme definition.
if (TAG_SCHEME.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements, INDEX_SCHEME_DEFINITIONS,
schemeDefinitionCount++);
}
}
// 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 binding definition.
if (TAG_KEY_BINDING.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements,
INDEX_BINDING_DEFINITIONS, bindingDefinitionCount++);
// Check if it is a scheme defintion.
} else if (TAG_KEY_CONFIGURATION.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements, INDEX_SCHEME_DEFINITIONS,
schemeDefinitionCount++);
// Check if it is an active scheme identifier.
} else if (TAG_ACTIVE_KEY_CONFIGURATION.equals(name)) {
addElementToIndexedArray(configurationElement,
indexedConfigurationElements, INDEX_ACTIVE_SCHEME,
activeSchemeElementCount++);
}
}
/*
* Sort the accelerator configuration extension point into the scheme
* definitions.
*/
final IConfigurationElement[] acceleratorConfigurationsExtensionPoint = registry
.getConfigurationElementsFor(EXTENSION_ACCELERATOR_CONFIGURATIONS);
for (int i = 0; i < acceleratorConfigurationsExtensionPoint.length; i++) {
final IConfigurationElement configurationElement = acceleratorConfigurationsExtensionPoint[i];
final String name = configurationElement.getName();