The Astah Plug-in architecture makes it possible for you to empower Astah by adding your own functions.
You are able to add your own components like menu or extended views to Astah’s GUI.
In this tutorial, we will introduce you how to develop Plug-ins for Astah with a few samples.
Below is a table of software and its version that is used in this tutorial. You can use other versions of software, but please note that some settings or appearance of dialogs may look different than ones we have in this tutorial.
|OS||Windows 7, Ubuntu Linux 11.10|
|Java||Oracle JDK 7|
|Astah||Astah Professional, UML, Community 6.7 and Astah SysML 1.1|
When you launch Astah it will load all of the plug-in files that are located in the directory below:
The Plug-in files need to be .jar format and also to be OSGi bundle because Astah’s Plug-ins architecture uses OSGi Runtime.
We’ve prepared SDK for you to develop Astah Plug-ins with which automatically packages OSGi bundle and also allows you to use Plug-ins on Astah without storing them in the directory above during your plug-in development. Now let’s set up the environment to develop plug-ins!
First, extract the Astah Plug-in SDK to a folder and then set the following environment variables.
Add [ASDK_HOME] and specify the folder where you deployed the Astah Plug-in SDK:
e.g.) set ASDK_HOME=C:\dev\astah-plugin-SDK-1.0
Specify “%ASDK_HOME%\bin” (“$ ASDK_HOME /bin” if you are using Linux or Mac OS X) folder to [PATH], where the executable files of Astah Plug-in SDK’s exist:
e.g.) set PATH=%ASDK_HOME%\bin;%PATH%
Then run the command below.
If the below appears, that means an installation of Astah Plug-in SDK is completed.
> astah* Plug-in SDK version: 1.0
Open %ASDK_HOME%¥conf¥settings.xml with a text editor. In this .xml file, you need to make sure the configuration about the Astah edition and the file path to the Astah app is correctly set.
In this .xml file, there are several pre-set profiles for each edition and OS.
By default, the configuration for Astah Professional edition on Windows is selected.
So please make sure to choose the profile that applies to you and make others commented out.
Also, after you choose the profile, please double-check that the file path to Astah app and edition are correct in the following three properties:
Now, run the command below to make sure Astah launches on the SDK.:
If you get one of the following errors, please try the workaround noted here.
Return code is: 501, ReasonPhrase:HTTPS Required
Could not transfer artifact xxx from/to central