Search in sources :

Example 1 with AntConfigurationListener

use of com.intellij.lang.ant.config.AntConfigurationListener in project intellij-community by JetBrains.

the class TargetActionStub method actionPerformed.

public void actionPerformed(final AnActionEvent e) {
    if (myProject == null) {
        return;
    }
    try {
        // this call will also lead to ant configuration loading
        final AntConfiguration config = AntConfiguration.getInstance(myProject);
        final AntConfigurationListener listener = new AntConfigurationListener() {

            public void configurationLoaded() {
                config.removeAntConfigurationListener(this);
                invokeAction(e);
            }
        };
        config.addAntConfigurationListener(listener);
        Disposer.register(myProject, new ListenerRemover(config, listener));
    } finally {
        invokeAction(e);
        dispose();
    }
}
Also used : AntConfigurationListener(com.intellij.lang.ant.config.AntConfigurationListener) AntConfiguration(com.intellij.lang.ant.config.AntConfiguration)

Aggregations

AntConfiguration (com.intellij.lang.ant.config.AntConfiguration)1 AntConfigurationListener (com.intellij.lang.ant.config.AntConfigurationListener)1