Date: Thu, 28 Mar 2024 15:53:50 +0100 (CET) Message-ID: <1284537987.492.1711637630899@nm-docs> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_491_952979782.1711637630898" ------=_Part_491_952979782.1711637630898 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This guide describes the Open Java API of MagicDraw or a Cameo Suit= e product, such as Cameo Systems Modeler, and provides instructions on how = to implement custom plugins, add actions to the menus or toolbars, change U= ML model elements as well as create new patterns. Though MagicDraw is used = in examples mainly, other modeling tools, since they are based on the = MagicDraw modeling platform, performs the same.
The program core code and used libraries are packaged in jars files that= are located in <modeling tool installation directory&g= t;\lib (and its subdirectories).
Some plugins also exposes Open API. Plugins libraries can be located in&= nbsp;<modeling tool installation directory>\plugins\<plugin_na= me>
The code can be divided into the following three API scope groups:=
Java annotations are used to distinguish which API scope in the provided= code belongs to. Annotations of the type (class, interface, enum) declaration:
Annotation | API Scope |
Scope applies to<= /p> |
---|---|---|
@OpenApiAll = td> | OpenAPI |
The annotated type declaration and all declar= ed members, constructors. |
@OpenApi |
OpenAPI |
The annotated type declaration only. Each dec= lared member, constructor is annotated explicitly with the @OpenApi or @Int= ernalApi annotation (see the following table). |
@InternalApi |
InternalAPI |
The annotated type declaration and all declar= ed members, constructors. |
@NotApi |
NotAPI |
The annotated type declaration and all declar= ed members, constructors. |
Annotations of the member, constructor declaration of the @OpenApi type:=
Annotation | API Scope |
Scope applies to<= /p> |
---|---|---|
@OpenApi |
OpenAPI |
The annotated declared member or constructor.= |
@InternalApi |
InternalAPI |
The annotated declared member or constructor.= |
Only code from the OpenAPI scope should be used to extend the modeling t= ool. All the InternalAPI and NotAPI scope code are additionally annotated w= ith the @Deprecated annotation. This allows seeing the illegal API= usage in all modern IDEs without an additional configuration.
We provide a set of plugin samples in <modeling = tool installation directory>\openapi\examples. By using= these examples, you can find out on how to use an OpenAPI.
In the generated javadoc, you will find the detailed descrip=
tion of classes, their attributes, and operations. JavaDoc is located in