if (extension != null) {
IExtension[] extensions = extension.getExtensions();
for(int i = 0; i < extensions.length; i++){
IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
for(int j = 0; j < configElements.length; j++){
IConfigurationElement configElement = configElements[j];
try {
String varAttribute = configElement.getAttribute("variable"); //$NON-NLS-1$
if (variable.equals(varAttribute)) {
if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED)
verbose_found_variable_initializer(variable, configElement);
Object execExt = configElement.createExecutableExtension("class"); //$NON-NLS-1$
if (execExt instanceof ClasspathVariableInitializer){
ClasspathVariableInitializer initializer = (ClasspathVariableInitializer)execExt;
String deprecatedAttribute = configElement.getAttribute("deprecated"); //$NON-NLS-1$
if (deprecatedAttribute != null) {
JavaModelManager.getJavaModelManager().deprecatedVariables.put(variable, deprecatedAttribute);
}
String readOnlyAttribute = configElement.getAttribute("readOnly"); //$NON-NLS-1$
if (JavaModelManager.TRUE.equals(readOnlyAttribute)) {
JavaModelManager.getJavaModelManager().readOnlyVariables.add(variable);
}
return initializer;
}