projectviewer.importer
Class ReImporter

java.lang.Object
  extended byprojectviewer.importer.Importer
      extended byprojectviewer.importer.FileImporter
          extended byprojectviewer.importer.RootImporter
              extended byprojectviewer.importer.ReImporter
All Implemented Interfaces:
java.lang.Runnable

public class ReImporter
extends RootImporter

Re-imports files and/or directories from the project root and from other nodes that are not under the root. Re-importing from nodes not under the root works as following: if the directory does not exist, the file nodes below it are checked to see if they still exist, and removed if they don't; if the directory exists, the importing method chosen by the user is used to re-import the directory. These actions take place recursively.

Version:
$Id: ReImporter.java 6365 2005-10-22 06:04:36Z vanza $
Author:
Marcelo Vanzin

Nested Class Summary
 
Nested classes inherited from class projectviewer.importer.Importer
Importer.NodeStructureChange, Importer.ShowNode
 
Field Summary
 
Fields inherited from class projectviewer.importer.RootImporter
oldRoot, parent
 
Fields inherited from class projectviewer.importer.FileImporter
fileCount, FILTER_MSG_INITIAL_IMPORT, FILTER_MSG_RE_IMPORT, FILTER_MSG_RECURSE, fnf
 
Fields inherited from class projectviewer.importer.Importer
added, fireEvent, postAction, project, removed, selected, viewer
 
Constructor Summary
ReImporter(VPTNode node, ProjectViewer viewer)
          Creates a ReImport object.
 
Method Summary
protected  java.util.Collection internalDoImport()
          Uses the user options from the RootImporter and re-imports the nodes not under the root.
protected  void unregisterDir(VPTDirectory dir, boolean flatten)
          Unregisters all files in the directory from the project, recursively, and removes the child nodes from the parent.
 
Methods inherited from class projectviewer.importer.RootImporter
getImportDialog, unregisterFiles
 
Methods inherited from class projectviewer.importer.FileImporter
addTree, showFileCount
 
Methods inherited from class projectviewer.importer.Importer
doImport, findDirectory, fireProjectEvent, importNode, importNode, loadImportFilterStatus, makePathTo, registerFile, run, saveImportFilterStatus, setViewerEnabled, unregisterFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReImporter

public ReImporter(VPTNode node,
                  ProjectViewer viewer)
Creates a ReImport object. Most of the functionality is inherited from the RootImporter class.

Method Detail

internalDoImport

protected java.util.Collection internalDoImport()
Uses the user options from the RootImporter and re-imports the nodes not under the root.

Overrides:
internalDoImport in class RootImporter

unregisterDir

protected void unregisterDir(VPTDirectory dir,
                             boolean flatten)
Unregisters all files in the directory from the project, recursively, and removes the child nodes from the parent.