Example usage for org.springframework.ide.eclipse.core.model ISourceModelElement getElementName

List of usage examples for org.springframework.ide.eclipse.core.model ISourceModelElement getElementName

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.core.model ISourceModelElement getElementName.

Prototype

String getElementName();

Source Link

Document

Returns the name of this element.

Usage

From source file:org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.java

/**
 * Registers the given component definition with this {@link BeansConfig}'s beans and component storage.
 *//*  w ww  . j a v  a2s .  c  om*/
private void registerComponentDefinition(ComponentDefinition componentDefinition,
        Map<String, IModelElementProvider> elementProviders) {
    String uri = NamespaceUtils.getNameSpaceURI(componentDefinition);
    IModelElementProvider provider = elementProviders.get(uri);
    if (provider == null) {
        provider = BeansConfig.DEFAULT_ELEMENT_PROVIDER;
    }
    ISourceModelElement element = provider.getElement(BeansJavaConfig.this, componentDefinition);
    if (element instanceof IBean) {
        beans.put(element.getElementName(), (IBean) element);
    } else if (element instanceof IBeansComponent) {
        components.add((IBeansComponent) element);
    }
}