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.

section divider

Prerequisites

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.

Software

Version

OSWindows 7, Ubuntu Linux 11.10
JavaOracle JDK 7
AstahAstah Professional, UML, Community 6.7 and Astah SysML 1.1
Eclipse3.7.1
IntelliJ IDEA11.1
section divider

Astah Plug-in architecture

When you launch Astah it will load all of the plug-in files that are located in the directory below:
Userhome\.astah\professional(Astah’s edition)\plugins.
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!

section divider

Set up the development environment

We provide Astah Plug-in SDK which is based on Maven3.
In order to set up the environment to develop plug-ins, you need to meet the system requirements of Astah’s – the edition you are using.

System Requirements:

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.
> asdk

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.

settings.xml file in Astah Plugin SDK
(As shown in the image above, “Astah Professional for Windows” is enabled and “Astah System for Windows” is commented out by default.)


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:

  • <file> – <exists>
  • <properties> – <astahPath>
  • <properties> – <astahEdition>
Astah Plugin SDK Setting

Now, run the command below to make sure Astah launches on the SDK.:

> astah-launch

If the error happens…

If you get one of the following errors, please try the workaround noted here.

Return code is: 501, ReasonPhrase:HTTPS Required
or
Could not transfer artifact xxx from/to central