projectviewer.importer
Class RootImporter

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

public class RootImporter
extends FileImporter

Imports files and/or directories from the project root. Optionally, can remove all existing files under the root before doing a fresh import.

Author:
Marcelo Vanzin

Nested Class Summary
 
Nested classes/interfaces inherited from class projectviewer.importer.Importer
Importer.NodeStructureChange, Importer.ShowNodes
 
Field Summary
protected  boolean addHidden
           
protected  java.lang.String oldRoot
           
protected  java.awt.Component parent
           
 
Fields inherited from class projectviewer.importer.FileImporter
fnf
 
Fields inherited from class projectviewer.importer.Importer
isNodeStructureUpdate, postAction, project, selected, silent, viewer
 
Constructor Summary
RootImporter(VPTNode node, ProjectViewer viewer, boolean clean)
          Imports files from the root of the project.
RootImporter(VPTNode node, java.lang.String oldRoot, ProjectViewer viewer, java.awt.Component parent)
          Creates an Importer that uses a component other than the ProjectViewer as the parent of the dialogs shown to the user.
 
Method Summary
protected  ImportDialog getImportDialog()
           
protected  void internalDoImport()
          Asks if the user wants to import files from the chosen project root.
protected  void unregisterFiles(VPTDirectory dir)
          Unregisters all files in the directory from the project, recursively.
 
Methods inherited from class projectviewer.importer.FileImporter
cleanup, showImportDialog
 
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

parent

protected java.awt.Component parent

oldRoot

protected java.lang.String oldRoot

addHidden

protected boolean addHidden
Constructor Detail

RootImporter

public RootImporter(VPTNode node,
                    java.lang.String oldRoot,
                    ProjectViewer viewer,
                    java.awt.Component parent)
Creates an Importer that uses a component other than the ProjectViewer as the parent of the dialogs shown to the user. If "oldRoot" is not null, files under this directory will be removed from the root node of the project.


RootImporter

public RootImporter(VPTNode node,
                    ProjectViewer viewer,
                    boolean clean)
Imports files from the root of the project. If "clean" is "true", the existing nodes that are below the root of the project will be removed before the importing.

Method Detail

internalDoImport

protected void internalDoImport()
Asks if the user wants to import files from the chosen project root.

Overrides:
internalDoImport in class FileImporter

unregisterFiles

protected void unregisterFiles(VPTDirectory dir)
Unregisters all files in the directory from the project, recursively.


getImportDialog

protected ImportDialog getImportDialog()
Overrides:
getImportDialog in class FileImporter