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.

$Id: Import.java,v 1.34 2003/06/30 21:59:34 linus Exp $


Field Summary
static java.lang.String separator
          Deprecated. As of ArgoUml version 0.13.5, don't use this!
 
Constructor Summary
Import()
          Creates dialog window with chooser and configuration panel.
 
Method Summary
 void disposeDialog()
          Close dialog window.
 void doFile()
           This method is called by ActionImportFromSources to start the import run.
 javax.swing.JComponent getConfigPanel(Import importInstance)
          Get the panel that lets the user set reverse engineering parameters.
 Project getProject()
          Deprecated. As of ArgoUml version 0.13.5, don't use this!
 ProjectBrowser getProjectBrowser()
          Deprecated. As of ArgoUml version 0.13.5, don't use this!
 java.lang.String getSrcPath()
           
 boolean isCreateDiagramsChecked()
          Check, if "Create diagrams from imported code" is selected.
 boolean isDiscendDirectoriesRecursively()
          Check, if "Discend directories recursively" is selected.
 boolean isMinimiseFigsChecked()
          Check, if "Minimise Class icons in diagrams" is selected.
 boolean needsSave()
          If we have modified any diagrams, the project was modified and should be saved.
 void parseFile(Project p, java.lang.Object f)
          Parse 1 Java file, using JavaImport.
 void setSrcPath(java.lang.String path)
          Set path for processed directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

separator

public static final java.lang.String separator
Deprecated. As of ArgoUml version 0.13.5, don't use this!

not used.

See Also:
Constant Field Values
Constructor Detail

Import

public Import()
Creates dialog window with chooser and configuration panel.

Method Detail

getProject

public Project getProject()
Deprecated. As of ArgoUml version 0.13.5, don't use this!

Unnecessary method


getProjectBrowser

public ProjectBrowser getProjectBrowser()
Deprecated. As of ArgoUml version 0.13.5, don't use this!

Unnecessary method


disposeDialog

public void disposeDialog()
Close dialog window.


getConfigPanel

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


doFile

public void doFile()

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.


setSrcPath

public void setSrcPath(java.lang.String path)
Set path for processed directory.


getSrcPath

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

parseFile

public void parseFile(Project p,
                      java.lang.Object f)
               throws java.lang.Exception

Parse 1 Java file, using JavaImport.

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

isCreateDiagramsChecked

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

Returns:
true, if "Create diagrams from imported code" is selected

isDiscendDirectoriesRecursively

public boolean isDiscendDirectoriesRecursively()
Check, if "Discend directories recursively" is selected.

Returns:
true, if "Discend directories recursively" is selected

isMinimiseFigsChecked

public boolean isMinimiseFigsChecked()
Check, if "Minimise Class icons in diagrams" is selected.

Returns:
true, if "Minimise Class icons in diagrams" is selected

needsSave

public 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 © 1996-2003 (20040216)ArgoUML Project HomeArgoUML Cookbook