Search in sources :

Example 6 with AntConfiguration

use of com.intellij.lang.ant.config.AntConfiguration 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)6 AntBuildFile (com.intellij.lang.ant.config.AntBuildFile)3 AntBuildTarget (com.intellij.lang.ant.config.AntBuildTarget)2 AntConfigurationBase (com.intellij.lang.ant.config.AntConfigurationBase)1 AntConfigurationListener (com.intellij.lang.ant.config.AntConfigurationListener)1 AntNoFileException (com.intellij.lang.ant.config.AntNoFileException)1 TargetActionStub (com.intellij.lang.ant.config.actions.TargetActionStub)1 ActionManager (com.intellij.openapi.actionSystem.ActionManager)1 ActionManagerEx (com.intellij.openapi.actionSystem.ex.ActionManagerEx)1 Keymap (com.intellij.openapi.keymap.Keymap)1 KeymapGroup (com.intellij.openapi.keymap.KeymapGroup)1 KeymapManagerEx (com.intellij.openapi.keymap.ex.KeymapManagerEx)1 Project (com.intellij.openapi.project.Project)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 Tree (com.intellij.ui.treeStructure.Tree)1 HashMap (com.intellij.util.containers.HashMap)1 HashSet (java.util.HashSet)1 TreeSelectionEvent (javax.swing.event.TreeSelectionEvent)1 TreeSelectionListener (javax.swing.event.TreeSelectionListener)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1