Skip to content

Latest commit

 

History

History
244 lines (145 loc) · 8.13 KB

File metadata and controls

244 lines (145 loc) · 8.13 KB

UML Manager (CLI & GUI)

This UML Manager is an application that allows users to create and manage class definitions, fields, methods, parameters, and relationships between classes. It provides a simple way to review and model class structures and their associations with each other. You can run it either in GUI mode or CLI mode.

How to Run the Program

1. Make sure you have Java installed

You need Java installed on your computer. If you are not sure, open a terminal and type:

java -version

If you see a version number, Java is installed. If not, you will need to install Java first.


2. Download and unzip the application

  • Click the "Sprint4" on the Releases section
  • Click on the "Sprint4.Zip" to start your download
  • Once you have downloaded, Extract(Unzip) the file

3. Open the Terminal or Command Prompt

OPTION 1

  • Windows:

    1. After you've unzipped, click on that folder, inside there will be a file called "target". Right click it (Make sure the file is selected), and press "Open in Terminal"

    That will open the file in the terminal directory where it lives in.

OPTION 2

  • Windows:
    1. Press Win + R, type cmd, and press Enter.
  • Mac/Linux:
    Open your terminal application.

Navigate to the folder where you unzipped the files:

cd path/to/unzipped/folder

Example:

cd /Users/alexr/Downloads/UMLManager


4. Run the Program

There are two ways to run the program currently.

  • GUI Mode (default):

In your terminal, copy and paste this -> java -jar 404App-1.0-SNAPSHOT-jar-with-dependencies.jar on the command line.

This will start the GUI

  • CLI Mode:

In your terminal, copy and past this -> java -jar 404App-1.0-SNAPSHOT-jar-with-dependencies.jar --cli on the command line.

This will start the CLI

5. What You Should See

  • CLI Mode:
image
  • GUI Mode:
image

How To Use

- CLI

  1. The CLI is very self explanitory, when you type 'help' in the command line you'll see all avalable commands
image
  1. When you begin, you'll have to add a class first (These commands are case sensitive so be sure to look at how they are formatted). Youll be prompted to type the class name
image
  1. Once that is complete you are free to add parameters, methods, fields, and relationships
image
  1. To add a relationship, you will need two classes minimum, I mean, thats the whole point ;). You will pe prompted to add a 'Source Class' and a 'Target Class' and the type of relationship.
image

Note: you might find that you'll get a '?' on the 'Relationship added' line, that simply means your terminal does not use UTF-8 ecoding unfortunately

  1. To see the Classes you have listed simply type listClasses on the command line.
image
  1. To make typing more simple and efficient we also have autoimplementation, for example if you want to add a relationship you can begin to type 'addR-' and then press [TAB] to autocomplete the rest, you can do this for fields, methods, CLI command, and parameter names!
image

Available Commands for CLI

Project / Save Commands

  • new

    Clears the current project and starts a new blank project.

  • load
    Loads a previously saved project from a JSON file.

  • save
    Saves the current project to the last used save path. If no save exists, prompts for a filename.

  • saveAs
    Prompts for a filename and saves the current project under that name.


Class Commands

  • addClass Creates a new class.

  • deleteClass
    Deletes an existing class.

  • renameClass
    Renames a class.

  • listClasses
    Displays all current classes.

  • listClass
    Displays the provided class.


Field Commands

  • addField
    Adds a new field to a class.

  • deleteField
    Removes a field from a class.

  • renameField
    Renames a field inside a class.


Method Commands

  • addMethod
    Adds a new method to a class with optional parameters.

  • deleteMethod
    Removes a method and all associated data by name from the target class.

  • renameMethod Renames a method in a class.


Parameter Commands

  • addParameter
    Adds a parameter to a method.

  • deleteParameter
    Removes a parameter from a method.

  • renameParameter

    Renames a parameter from a method.


Relationship Commands

  • addRelationship
    Creates a relationship between two classes.
    <Type> can be: REALIZATION, AGGREGATION, COMPOSITION, GENERALIZATION.

  • deleteRelationship Removes all relationships involving a given class.

  • listRelationships Lists all relationships created.


System Commands

  • help
    Displays a list of all available commands.

  • exit Closes the application.


- GUI

  1. To create a default class you can go to the menu section, click on 'Class' and then you can add a new class along with many more options
image
  1. You can click on the 'Expand Clas List' which will show all classes which have been created and if they have been added to the scene
image
  1. You can double click on the default class name to rename such class
image
  1. You can right click on the class box to add, create, and rename such class
image
  1. To add a relationship go to the menu bar, and select 'Relations' -> 'add Relation'. You will be prompted to add a source class and target class
image image

5a. You will be prompted to add a relationship type using a drop down, select which ever.

image

5b. The final result will look something like this.

image
  1. You can choose to save, save as 'filename', load, create new, and exit the program in the file menu button. With saving your project, it will direct you to your file explorer where you can export a photo and/or save your project.
image
  1. An important feature that we have recently implemented is the ability to undo and/or redo. By clicking the "UndoRedo" button on the menu bar you can undo something that you previously did as well as redo that action!
image