home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
SourceFileListener.java
< prev
next >
Wrap
Text File
|
1998-10-25
|
3KB
|
70 lines
/*
* Copyright 1998 Symantec Corporation, All Rights Reserved.
*/
package com.symantec.itools.vcafe.openapi;
/**
* The listener interface for receiving notification when a change has occurred to
* a <code>SourceFile</code>.
* To be notified of changes, a plug-in implements this interface then calls
* <code>SourceFile.addSourceFileListener</code> to place itself on the notification list.
* When the <code>SourceFile</code> changes, the appropriate method of this interface is called.
* To be notified of changes to <i>any</i> <code>SourceFile</code>, use <code>VisualCafe.addSourceFileListener</code>.
* If you are only interested in a subset of the notification methods, you can extend the
* <code>SourceFileAdapter</code> class rather than implement all the methods yourself.
*
* @see SourceFile#addSourceFileListener
* @see SourceFile#removeSourceFileListener
* @see VisualCafe#addSourceFileListener
* @see VisualCafe#removeSourceFileListener
* @see SourceFileAdapter
*
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public interface SourceFileListener
{
/**
* This method is called when the file's contents have been reverted.
* @param sourceFile the file whose contents have been reverted.
*/
public void sourceFileReverted(SourceFile sourceFile);
/**
* This method is called when the file is about to be saved to disk.
* @param sourceFile the file that is about to be saved.
*/
public void aboutToSaveSourceFile(SourceFile sourceFile);
/**
* This method is called when the file is done being saved to the disk.
* @param sourceFile the file that was just saved.
*/
public void doneSavingSourceFile(SourceFile sourceFile);
/** Indicates the file was modified by the user. */
public final int CHANGED_BY_USER = 0;
/** Indicates the file was modified by the parser. */
public final int CHANGED_SYMBOLICALLY = 1;
/**
* This method is called when the file was modified since being loaded from disk.
* Note that this method is <b>not</b> called for every keystroke, just the initial change.
* @param sourceFile the file that has been modified.
* @param reason how the file was modified. Can be one of:<ul type=circle>
* <li>CHANGED_BY_USER - the file was modified by the user.
* <li>CHANGED_SYMBOLICALLY - the file was modified by the parser.
* </ul>
*/
public void sourceFileChanged(SourceFile sourceFile, int reason);
/**
* This method is called when a change to the file is Undone.
*/
public void sourceFileChangeUndone(SourceFile sourceFile);
}