projectviewer.importer
Class ImporterFileFilter

java.lang.Object
  extended by projectviewer.importer.ImporterFileFilter
All Implemented Interfaces:
org.gjt.sp.jedit.io.VFSFileFilter
Direct Known Subclasses:
AllFilesFilter, CompositeImporterFileFilter, CVSEntriesFilter, GlobFilter, NonProjectFileFilter

public abstract class ImporterFileFilter
extends java.lang.Object
implements org.gjt.sp.jedit.io.VFSFileFilter

File filter implementation used when importing files into a project. It provides some PV-specific extensions to the jEdit filter interface.

Author:
Marcelo Vanzin

Field Summary
 
Fields inherited from interface org.gjt.sp.jedit.io.VFSFileFilter
SERVICE_NAME
 
Constructor Summary
ImporterFileFilter()
           
 
Method Summary
 boolean accept(java.lang.String url)
          Calls VFSFileFilter.accept(VFSFile).
protected  void done()
          Called by project viewer after the filter is used for importing.
 java.lang.String getId()
          This method should return a string that uniquely identifies the filter.
abstract  java.lang.String getRecurseDescription()
          This method will be called by the toString() method when showing this filter as an option to the dialog shown when asking about whether the user wants to recurse into the directories selected for importing.
 java.lang.String toString()
          Calls getRecurseDescription().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gjt.sp.jedit.io.VFSFileFilter
accept, getDescription
 

Constructor Detail

ImporterFileFilter

public ImporterFileFilter()
Method Detail

getRecurseDescription

public abstract java.lang.String getRecurseDescription()
This method will be called by the toString() method when showing this filter as an option to the dialog shown when asking about whether the user wants to recurse into the directories selected for importing.

It should return a short, descriptive string of what the filter does. For example, "Import all files." or "Use the CVS/Entries file."


toString

public java.lang.String toString()
Calls getRecurseDescription().

Overrides:
toString in class java.lang.Object

accept

public boolean accept(java.lang.String url)
Calls VFSFileFilter.accept(VFSFile).

Specified by:
accept in interface org.gjt.sp.jedit.io.VFSFileFilter

getId

public java.lang.String getId()
This method should return a string that uniquely identifies the filter. The string is used when persisting information related to the filter, and later used to match the configuration to the filter. The default implementation returns the class name.


done

protected void done()
Called by project viewer after the filter is used for importing. Filters that cache data should override this method and clean up any caches so that future imports are unaffected by the state.