This software is no longer maintained and there are no plans for a future release.
GraphML Export. A plugin for MagicDraw and Cameo Systems Modeler that exports internal block diagrams and requirements diagrams to GraphML for security analysis.
These instructions will get you running the graphml_export
plugin on your
local machine for development and testing purposes.
- Java Development Kit (JDK)
- MagicDraw OpenAPI
Tested with Groovy 2.0.1 (MagicDraw does not fully support anything above that.), Gradle 2.14, java8, Cameo Systems Modeler Architect 18.4 FR, and MagicDraw Standard 18.3 FR.
You will need java8. On macOS use homebrew:
$ brew tap caskroom/cask
$ brew tap caskroom/versions
$ brew cask install java8
Finally, clone this repository in a folder named graphml_export
.
Depending on the No Magic software package you have installed, that is
MagicDraw vs. Cameo Systems Modeler, you will need to edit the
build.gradle
file. This package assumes you have Cameo Systems
Modeler installed. Therefore, if you have MagicDraw installed you will
need to change the following code artifact:
magicDrawPath = '/Applications/Cameo Systems Modeler/'
def currentOS = System.properties['os.name'].toLowerCase()
if (currentOS.contains('windows')) {
magicDrawPath = 'C:\\Program Files\\Cameo Systems Modeler'
}
if (currentOS.contains('linux')) {
magicDrawPath = '~/Cameo Systems Modeler/'
}
To:
magicDrawPath = '/Applications/MagicDraw/'
def currentOS = System.properties['os.name'].toLowerCase()
if (currentOS.contains('windows')) {
magicDrawPath = 'C:\\Program Files\\MagicDraw'
}
if (currentOS.contains('linux')) {
magicDrawPath = '~/MagicDraw/'
}
This script assumes the default installation locations. If you have
installed elsewhere you need to change the corresponding path in the
build.gradle
file to the one corresponding to your installation
path. Otherwise the plugin automatically can infer your operating
system and set the correct installation path for your No Magic
package.
- Make sure you have installed the JDK and that MagicDraw OpenAPI is part of the installation as per the Prerequisites.
- Open a terminal emulator, e.g.,
Terminal.app
for macOS,urxvt
for GNU/Linux, orcmd
for Windows. - Navigate to the location you cloned this repository to in your file
system.
cd /path/to/graphml_export # For GNU/Linux or macOS cd C:\path\to\graphml_export # For Windows
- The second and final step will be to run either of the following
after navigating to whatever location you cloned this repository to
in your file system.
./gradlew install # For GNU/Linux or macOS gradlew install # For Windows
Gradle will take care of everything else at this point—including installing Gradle itself. You will need to restart your No Magic package for the plugin to take effect.
At the moment the plugin has been tested under Mac OS X 10.11.6, Windows 7, and Arch Linux.
There is a minimal amount of unit tests implemented with this plugin. I hope to extend these to test the main functionality of the software in the future.
The tests are run every time you install the plugin (if any test fails the whole installation will fail, which makes sense). To test outside the installation you can run:
./gradlew test //
If you want to develop further functionality or modify the functionality on this plugin you can do so in any editor you prefer by following the instructions above. However, we find it easier to use an IDE workflow for this specific plugin, with strong recommendation to IntelliJ. The only thing you need to do to import all OpenAPI libraries is to properly allow Gradle to do all the heavy-lifting. You do so by:
- Open IntelliJ
- Choose
Open
- Locate and choose the
build.gradle
file - Uncheck
Create separate module for source sets
- Click
OK
This will correctly import all the libraries, etc. In order to build
using IntelliJ you will need to navigate
to Settings → Search for gradle → Allow Gradle to do all the building
.
Georgios Bakirtzis (bakirtzis@virginia.edu) bakirtzis.net
Brandon Simon (simonbj@vcu.edu)