Modelers

org.topcased.modeler.tools
Class DiagramFileInitializer

java.lang.Object
  extended by org.topcased.modeler.tools.DiagramFileInitializer

public class DiagramFileInitializer
extends java.lang.Object

This class creates a Diagram from an existing model


Constructor Summary
DiagramFileInitializer()
          Constructor
DiagramFileInitializer(ResourceSet resourceSet)
          Constructor
 
Method Summary
 void createDiagram(EObject root, java.lang.String diagramId, boolean initializeContent, org.eclipse.core.runtime.IProgressMonitor monitor)
          Convert an Package or a Java project into a UML2 model
 void createDiagram(EObject root, java.lang.String diagramId, java.lang.String diagramName, boolean initializeContent, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates the diagram file for the given existing model
protected  void syncImportObjects(Resource diagramResource, EObject model, org.eclipse.core.runtime.IProgressMonitor monitor)
          Execute the import.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagramFileInitializer

public DiagramFileInitializer()
Constructor


DiagramFileInitializer

public DiagramFileInitializer(ResourceSet resourceSet)
Constructor

Parameters:
resourceSet - The ResourceSet to use to create the Diagrams resource. Should be used only when a custom ResourceSet should be used instead of the default EMF one
Method Detail

createDiagram

public void createDiagram(EObject root,
                          java.lang.String diagramId,
                          java.lang.String diagramName,
                          boolean initializeContent,
                          org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws java.io.IOException
Creates the diagram file for the given existing model

Parameters:
root - the root EObject associated with the diagram
diagramId - the ID of the diagram to create
diagramName - The diagram name
initializeContent - if true, try to initialize the graphical objects with the existing model objects
monitor - the progress monitor
Throws:
java.io.IOException - Throws if the diagram file cannot be written

createDiagram

public void createDiagram(EObject root,
                          java.lang.String diagramId,
                          boolean initializeContent,
                          org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws java.io.IOException
Convert an Package or a Java project into a UML2 model

Parameters:
root - the root EObject associated with the diagram
diagramId - the ID of the diagram to create
initializeContent - if true, try to initialize the graphical objects with the existing model objects
monitor - the progress monitor
Throws:
java.io.IOException - Throws if the diagram file cannot be written

syncImportObjects

protected void syncImportObjects(Resource diagramResource,
                                 EObject model,
                                 org.eclipse.core.runtime.IProgressMonitor monitor)
Execute the import. This method must be called in the UI thread

Parameters:
diagramResource - the diagram
model - the model
monitor -

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.