Clone Referenced Project's Model Element

You can re-use model elements from dependent project in developing your current project by creating project reference, however, you are not allowed to modify them since they are located in dependent project. In VP-UML 8.0, you can clone model elements from dependent project into your local project, so that you can make a local copy and perform modification on it. This tutorial takes Fruit Store as an example to explain how to duplicate a Collection class from dependent project to become a localized class model.

August 16, 2010
User Rating: / 0
Views: 1,481
PDF Link Add comments
Edition: Standard or above (Edition comparison)

  1. Downlad the Library.vpp from this tutorial and then store it in your machine in advance.
  2. Create a new project with VP-UML. Select File > New Project from the main menu.
  3. In the New Project dialog box, enter Fruit Store as project name. Click Create Blank Project button.
    project name
  4. Open the Model Explorer.
    open model explorer
  5. Right click on the background of Model Explorer and select Manage Dependent Project... from the pop-up menu.
    manage dep project
  6. In the Manage Dependent Project dialog box, click Add button. Select Library.vpp. Click Close button.
    manage dep project
  7. Pay attention to the Model Explorer. You can see the model elements in Library.vpp.
    model explorer updated
  8. You can create a new class based on the depending Collection class. Right click on the Collection class and select Duplicate to Current Project from the pop-up menu.
    dup element
  9. Switch to current project through the drop down menu in Model Explorer. You can see that a Collection class is created under your current project.
    to current
  10. Let's visualize the class. Click on the UML button in toolbar and select Class Diagram from the pop-up menu.
    create class diagram
  11. Drag the Collection class from the Model Explorer to diagram.
    drag to diagram
  12. This Collection class does no longer depend on another project. It is fully owned by the current project. You can edit it with your own preference. Double click on it and rename it as SimpleCollection.
    renamed class
  13. You can not only rename class, but also add operations or attributes to it. Right click on SimpleCollection and select Add > Operation from the pop-up menu. Enter removeAll().
    add operation

Resources

  1. Library.vpp

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of this article:

Comments (0)

Write comment

Rating

Comment

Enter the calculation result

security code