blob: 894532e87a52c48afb08de4ef510f5f762030bda [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>plugin_dev</title>
</head>
<body>
<h1 id="Simpletransformationschain_Discoverer_API">Simpletransformationschain Discoverer API</h1>
<p>First, add the following plug-in dependencies to your project (
<b>Require-Bundle</b> in your Manifest.MF):
</p>
<ul>
<li>org.eclipse.uml2.uml</li>
<li>org.eclipse.modisco.usecase.simpletransformationschain</li>
<li>org.eclipse.modisco.infra.discovery.core</li>
</ul>
<p>Then, you can use the following discoverer classes:</p>
<ul>
<li>DiscoverUmlModelFromJavaProject: from an IJavaProject (defined in jdt.core)</li>
<li>DiscoverUmlModelFromProject: from an IProject</li>
<li>DiscoverUmlModelWithBidirectionalAssociationsFromJavaProject: from an IJavaProject, with bidirectional associations</li>
<li>DiscoverUmlModelWithBidirectionalAssociationsFromProject: from an IProject, with bidirectional associations</li>
</ul>
<p>For example, to discover a UML model from a Java project:</p>
<pre>
DiscoverUmlModelWithBidirectionalAssociationsFromJavaProject discoverer = new DiscoverUmlModelWithBidirectionalAssociationsFromJavaProject();
discoverer.discoverElement(javaProject, monitor);
Resource umlModel = discoverer.getTargetModel();
</pre>
<p>To have a monitor to pass to the <code>discoverElement</code> method, you can either call the discoverer in an Eclipse Job, or pass a new NullProgressMonitor if you don't need progress reporting.</p>
</body>
</html>