Example usage for org.springframework.ide.eclipse.beans.core.model IBeansConfigEventListener onReset

List of usage examples for org.springframework.ide.eclipse.beans.core.model IBeansConfigEventListener onReset

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.beans.core.model IBeansConfigEventListener onReset.

Prototype

void onReset(IBeansConfig config);

Source Link

Document

Event indicating that the IBeansConfig 's internal structure has been reset.

Usage

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

/**
 * Sets internal list of {@link IBean}s to <code>null</code>. Any further access to the data of this instance of
 * {@link IBeansConfig} leads to reloading of the corresponding beans config file.
 *///ww w  . j a  va  2  s  .  c  o m
public void reload() {
    if (configClass != null) {
        try {
            w.lock();
            // System.out.println(String.format("++- resetting config '%s'", file.getFullPath().toString()));
            isModelPopulated = false;
            modificationTimestamp = IResource.NULL_STAMP;
            defaults = null;
            imports.clear();
            aliases.clear();
            beans.clear();
            components.clear();
            isBeanClassesMapPopulated = false;
            beanClassesMap.clear();
            problems.clear();
            children = null;
            //            componentDefinitions.clear();
        } finally {
            w.unlock();
        }

        // Reset all config sets which contain this config
        for (IBeansConfigEventListener eventListener : eventListeners) {
            eventListener.onReset(this);
        }
    }
}