AntConfiguration: addAntConfigurationListener
I tried the following, but I my listener is never called. Any suggestions?
AntConfiguration component = ( AntConfiguration ) ProjectManager.getInstance().getDefaultProject().getComponent( AntConfiguration.class );
component.addAntConfigurationListener( new AntConfigurationListener() {
public void buildFileChanged( BuildFile buildFile ) {
System.out.println( "AntEditor.buildFileChanged" );
}
public void buildFileAdded( BuildFile buildFile ) {
System.out.println( "AntEditor.buildFileAdded" );
}
public void buildFileRemoved( BuildFile buildFile ) {
System.out.println( "AntEditor.buildFileRemoved" );
}
} );
Please sign in to leave a comment.
Johannes Schneider wrote:
AFAIK the default project is the template that new projects are created from. This project
instance will never have an Ant file added. You need to use a "real" project reference
(e.g. by using a ProjectComponent) and get the Ant component from that project instance.
HTH,
Sascha
Thanks ;)...
Sascha Weinreuter wrote: