Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/build/BuildListener.java


1   package javax.ide.build;
2   
3   import java.util.EventListener;
4   
5   /**
6    * Extension writers request notification of {@link BuildSystem} events by 
7    * implementing this interface and registering their build listener with the 
8    * extension deployment descriptor.<p>
9    *
10   * IDE providers are responsible for calling the <code>BuildListener</code>
11   * methods before their compiler starts compiling documents and immediately
12   * after it finishes doing so.
13   */
14  public interface BuildListener extends EventListener
15  {
16    /**
17     * The <code>preBuild</code> method is called before documents are compiled. 
18     * If a listener throws an {@link AbortBuildException}, the entire build is 
19     * aborted and the <code>postBuild</code> methods are called immediately on 
20     * the listeners whose <code>preBuild</code> method had a chance to 
21     * execute.  The <code>postBuild</code> method is not called on listener 
22     * that did not execute their <code>preBuild</code> method. <p>
23     * <p>
24     * This method may be called from threads other than the AWT event thread.
25     * 
26     * @param event the build event.
27     * @throws javax.ide.build.AbortBuildException to abort the entire build.
28     */
29    public void preBuild( BuildEvent event ) throws AbortBuildException;
30  
31    /**
32     * When the compiler finishes compiling documents, the 
33     * <code>postBuild</code> methods are called. If any <code>postBuild</code>
34     * method throws an {@link AbortBuildException}, the <code>postBuild</code> 
35     * methods are still called on the remaining listeners. Implementors of the 
36     * <code>postBuild</code> method must always check the 
37     * {@link BuildEvent#isBuildSuccessful} method before continuing. <p>
38     * <p>
39     * This method may be called from threads other than the AWT event thread.
40     * 
41     * @param event the build event.
42     * @throws javax.ide.build.AbortBuildException to abort the entire build.
43     */
44    public void postBuild( BuildEvent event ) throws AbortBuildException;
45  }
46