org.argouml.uml.reveng
Class Import

java.lang.Object
  |
  +--org.argouml.uml.reveng.Import

public class Import
extends java.lang.Object

This is the main class for all import classes.

It provides JPanels for tailoring the import run in the FileChooser.

The Import run is started by calling doFile(Project, File)

Supports recursive search in folder for all .java classes.

$Revision: 1.17 $

$Date: 2003/03/07 07:52:54 $


Constructor Summary
Import()
           
 
Method Summary
static void doFile(Project p, java.io.File f)
           This method is called by ActionImportFromSources to start the import run.
static javax.swing.JComponent getConfigPanel()
          Get the panel that lets the user set reverse engineering parameters.
static java.lang.String getSrcPath()
           
static boolean isCreateDiagramsChecked()
          Check, if "Create diagrams from imported code" is selected.
static boolean needsSave()
          If we have modified any diagrams, the project was modified and should be saved.
static void parseFile(Project p, java.io.File f)
          Parse 1 Java file, using JavaImport.
static void realDoFile(org.argouml.uml.reveng.ImportStatusScreen iss, Project p, java.util.Vector files)
          This method is no longer used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Import

public Import()
Method Detail

getConfigPanel

public static javax.swing.JComponent getConfigPanel()
Get the panel that lets the user set reverse engineering parameters.

doFile

public static void doFile(Project p,
                          java.io.File f)

This method is called by ActionImportFromSources to start the import run.

The method that for all parsing actions. It calls the actual parser methods depending on the type of the file.

Parameters:
p - The current Argo project.
f - The file or directory, we want to parse.

realDoFile

public static void realDoFile(org.argouml.uml.reveng.ImportStatusScreen iss,
                              Project p,
                              java.util.Vector files)

This method is no longer used.

old notes [This method does all the actual importing. Normally it runs in another thread.]

Parameters:
iss - is the status screen that is called for updates.
p - is the project
files - is a Vector of the files to be imported.

getSrcPath

public static java.lang.String getSrcPath()
Returns:
path for processed directory.

parseFile

public static void parseFile(Project p,
                             java.io.File f)
                      throws java.lang.Exception

Parse 1 Java file, using JavaImport.

Parameters:
f - The file to parse.
Throws:
Parser - exception.

isCreateDiagramsChecked

public static boolean isCreateDiagramsChecked()
Check, if "Create diagrams from imported code" is selected.
Returns:
true, if "Create diagrams from imported code" is selected

needsSave

public static boolean needsSave()
If we have modified any diagrams, the project was modified and should be saved. I don't consider a import, that only modifies the metamodel, at this point (Andreas Rueckert ). Calling Project.setNeedsSave(true) doesn't work here, because Project.postLoad() is called after the import and it sets the _needsSave flag to false.
Returns:
true, if any diagrams where modified and the project should be saved before exit.


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook