projectviewer.importer
Class FileImporter

java.lang.Object
  extended by projectviewer.importer.Importer
      extended by projectviewer.importer.FileImporter
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
RootImporter

public class FileImporter
extends Importer

Imports files and/or directories into a project.

Author:
Marcelo Vanzin

Nested Class Summary
 
Nested classes/interfaces inherited from class projectviewer.importer.Importer
Importer.NodeStructureChange, Importer.ShowNodes
 
Field Summary
protected  org.gjt.sp.jedit.io.VFSFileFilter fnf
           
 
Fields inherited from class projectviewer.importer.Importer
isNodeStructureUpdate, postAction, project, selected, silent, viewer
 
Constructor Summary
FileImporter(VPTNode node, ProjectViewer viewer)
          Constructs a new file importer.
 
Method Summary
protected  void cleanup()
          This is called after Importer.internalDoImport() is invoked, so implementations can clean up any internal state.
protected  ImportDialog getImportDialog()
           
protected  void internalDoImport()
          Queries the user for files to be added by showing a file chooser dialog.
protected  ImportDialog showImportDialog(java.lang.String title, java.lang.String filtercfg)
           
 
Methods inherited from class projectviewer.importer.Importer
addNode, constructPath, doImport, findChild, importFiles, importFiles, loadImportFilterStatus, removeDirectory, removeFile, run, saveImportFilterStatus, setSilent, setViewerEnabled, setViewStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fnf

protected org.gjt.sp.jedit.io.VFSFileFilter fnf
Constructor Detail

FileImporter

public FileImporter(VPTNode node,
                    ProjectViewer viewer)
Constructs a new file importer.

Parameters:
node - The selected node in the viewer tree.
viewer - The viewer instance.
Method Detail

internalDoImport

protected void internalDoImport()
Queries the user for files to be added by showing a file chooser dialog. If any directories are chosen, the user is asked (once) if he wants to import them recursively. If the files to be added are below the project's root path, and they're being added directly to the project or to a node that is a directory and whose path is parent to the files being added, the importer creates the tree to the files and appends that tree to the node.

Specified by:
internalDoImport in class Importer

getImportDialog

protected ImportDialog getImportDialog()

showImportDialog

protected ImportDialog showImportDialog(java.lang.String title,
                                        java.lang.String filtercfg)

cleanup

protected void cleanup()
Description copied from class: Importer
This is called after Importer.internalDoImport() is invoked, so implementations can clean up any internal state. Default implementation does nothing.

Overrides:
cleanup in class Importer