2.6.1 Working with the MetaEdit+ API
The visual debugging uses the services provided by the
MetaEdit+ API. The API consists mostly of commands that enable the user to
access and change MetaEdit+ model elements: Graphs, Objects, Relationships,
Roles, Properties, Ports and their representations. There are also some
additional API commands for controlling MetaEdit+, like animating diagram
elements for simulation or tracing purposes.
The API interface is implemented as a SOAP Web Service
server in MetaEdit+. Thus, an application interfacing with MetaEdit+ API will be
a SOAP client. SOAP is a widely supported and open standard, with frameworks
available for almost any programming language, platform or environment. These
frameworks take care of the details of opening and using the SOAP connection,
and you simply write code to call MetaEdit+ as if it were directly in your
environment.
API with C#
Watch visual debugging via the API works out-of-the-box with
‘C#: API’ generation on Windows, so there is no need to install
additional components or libraries.
API with Java
Watch visual debugging via the API from Java is currently only
implemented on Windows (other platforms would be possible, but they are
currently too much of a moving target to make it worthwhile for this example).
Two additional components need to be installed:
| The
Apache Xerces2 XML parser for Java from xerces.apache.org (version 2.11.0 was used
for this example). The example assumes it to be installed in
c:\java\xerces-2_11_0 (if located
elsewhere, change the $Xerces variable
in the ‘__Paths’
generator). |
| The
Apache Axis SOAP library from axis.apache.org/axis (for this example,
we used version 1.4 – please note that Axis2 is not currently supported).
It is assumed to be installed in
c:\java\axis-1_4 in Windows platforms
(if you install it elsewhere, change the
$Axis variable in the
‘__Paths’ generator). |
After
having installed these components, you can try out the visual debugging as
explained in the next
section.