home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / ProjectListener.java < prev    next >
Text File  |  1998-10-25  |  5KB  |  131 lines

  1. /*
  2.  * Copyright 1998 Symantec Corporation, All Rights Reserved.
  3.  */
  4.  
  5. package com.symantec.itools.vcafe.openapi;
  6.  
  7. /**
  8.  * The listener interface for receiving notification when a change has occurred to
  9.  * a <code>VisualProject</code>.
  10.  * To be notified of changes, a plug-in implements this interface then calls
  11.  * <code>VisualProject.addProjectListener</code> to place itself on the notification list.  When
  12.  * the <code>VisualProject</code> changes, the appropriate method of this interface
  13.  * is called.
  14.  * If you are only interested in a subset of the notification methods, you can extend the
  15.  * <code>ProjectAdapter</code> class rather than implement all the methods yourself.
  16.  *
  17.  * @see VisualProject#addProjectListener
  18.  * @see ProjectAdapter
  19.  *
  20.  * @author Symantec Internet Tools Division
  21.  * @version 1.0
  22.  * @since VCafe 3.0
  23.  */
  24. public interface ProjectListener
  25. {
  26.     /**
  27.      * This method is called when the project is closed.
  28.      * After this method is called, this listener is removed from the project.
  29.      * @param visualProject    the project that is being closed.
  30.      */
  31.     public void projectClosed(VisualProject visualProject);
  32.     
  33.     /**
  34.      * This method is called when the project is moved on disk.
  35.      * @param visualProject    the project that has moved.
  36.      * @param oldLocation    the previous location of the project.
  37.      * @param newLocation    the current location of the project.
  38.      */
  39.     public void projectMoved(VisualProject visualProject, String oldLocation, String newLocation);
  40.  
  41.     /**
  42.      * This method is called before the project is saved.
  43.      * @param visualProject    the project that is to be saved.
  44.      * @return <code>true</code> if the project save continue.
  45.      */
  46.     public boolean aboutToSaveProject(VisualProject visualProject);
  47.  
  48.     /**
  49.      * This method is called after the project is saved
  50.      * @param visualProject    the project that was saved
  51.      */
  52.     public void doneSavingProject(VisualProject visualProject);
  53.  
  54.     /**
  55.      * This method is called before the project is run
  56.      * @param visualProject    the project that is to be run
  57.      */
  58.     public void aboutToRunProject(VisualProject visualProject);
  59.  
  60.     /**
  61.      * This method is called when the project is no longer running
  62.      * @param visualProject    the project that was running
  63.      */
  64.     public void doneRunningProject(VisualProject visualProject);
  65.  
  66.     /**
  67.      * This method is called before a save all is performed on the project
  68.      * @param visualProject    the project that is to be saved
  69.      */
  70.     public void aboutToSaveAll(VisualProject visualProject);
  71.  
  72.     /**
  73.      * This method is called after a save all is performed on the project
  74.      * @param visualProject    the project that was saved
  75.      */
  76.     public void doneSavingAll(VisualProject visualProject);
  77.  
  78.     /**
  79.      * This method is called when a file is added to the project
  80.      * @param visualProject    the project that contains the <code>ProjectFile</code>
  81.      * @param projectFile    the <code>ProjectFile</code> object that was added
  82.      * @param addedBy        who added the file
  83.      * @see ProjectFile#getFileAddedBy
  84.      */
  85.     public void projectFileAdded(VisualProject visualProject, ProjectFile projectFile, int addedBy);
  86.  
  87.     /**
  88.      * This method is called before a file is removed from the project
  89.      * @param visualProject    the project that contained the <code>ProjectFile</code>
  90.      * @param projectFile    the <code>ProjectFile</code> object that was removed
  91.      * @param removedBy        who removed the file
  92.      */
  93.     public void projectFileRemoved(VisualProject visualProject, ProjectFile projectFile, int removedBy);
  94.  
  95.     /**
  96.      * This method is called when a file in the project is renamed
  97.      * @param visualProject    the project that contains the <code>ProjectFile</code>
  98.      * @param projectFile    the <code>ProjectFile</code> object that will be/was renamed
  99.      * @param oldName        the previous name of the <code>ProjectFile</code>
  100.      * @param newName        the current name of the <code>ProjectFile</code>
  101.      */
  102.     public void projectFileRenamed(VisualProject visualProject, ProjectFile projectFile, String oldName, String newName);
  103.  
  104.     /**
  105.      * This method is called before changes occur to the data of <code>ProjectFiles</code>.
  106.      * For example, before a build or a reparse of the browser information.
  107.      * @param visualProject    the project whose <code>ProjectFiles</code> are changing
  108.      */
  109.     public void aboutToChangeProjectEntries(VisualProject visualProject);
  110.  
  111.     /**
  112.      * This method is called after changes occur to the data of <code>ProjectFiles</code>.
  113.      * For example, after a build or a reparse of the browser information.
  114.      * @param visualProject    the project whose <code>ProjectFiles</code> have changed
  115.      */
  116.     public void doneChangingProjectEntries(VisualProject visualProject);
  117.     
  118.     /**
  119.      * This method is called after the user changes the current option set
  120.      * from Debug to Final, or vice versa.
  121.      * @param visualProject    the project whose option set changed
  122.      */
  123.     public void projectOptionSetChanged(VisualProject visualProject);
  124.  
  125.     /**
  126.      * This method is called after the user changes the project's options
  127.      * @param visualProject    the project whose options changed
  128.      */
  129.     public void projectOptionsChanged(VisualProject visualProject);
  130. }
  131.