blob: 3b12972f12b815cf0bd3d290043f3819fd052ece [file] [log] [blame]
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ecore/UML Standalone Configuration</title>
<link href="book.css" rel="stylesheet" type="text/css">
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="OCL Documentation">
<link rel="up" href="ProgrammersGuide.html" title="Classic Ecore/UML Programmers Guide">
<link rel="prev" href="Delegates.html" title="Delegates">
<link rel="next" href="PivotProgrammersGuide.html" title="Unified or Pivot Programmers Guide">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Ecore/UML Standalone Configuration</h1>
<div class="section" title="Ecore/UML Standalone Configuration">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a name="Standalone"></a>Ecore/UML Standalone Configuration</h2>
</div>
</div>
</div>
<p>If you use Eclipse OCL within Eclipse you should find that the appropriate registrations are provided for you automatically by the plugin registration mechanisms.</p>
<p>However if you use Eclipse OCL outside Eclipse, for instance in JUnit tests, you must provide the corresponding registrations in your code.</p>
<div class="section" title="Ecore">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="Ecore"></a>Ecore</h3>
</div>
</div>
</div>
<p>For the Ecore metamodel, the required registrations should be provided by invoking
<code class="code">org.eclipse.ocl.ecore.OCL.initialize(ResourceSet)</code>.
</p>
<p>This may be invoked with a null argument to install the registrations in the global EPackage.Registry. This is not normally recommended, but since this is for your application, the integrity of the global registry is your responsibility.</p>
<p>It is normally recommended to install the registrations solely for use in your own ResourceSet and to pass that to the initialize routine.</p>
<p>This initialization ensures that *.ecore is understood.</p>
<p>If you want to use EMF delegates to dispatch OCL, the required registrations may be
provided by
<code class="code">org.eclipse.ocl.ecore.delegate.OCLDelegateDomain.initialize(ResourceSet)</code>.
</p>
<p>This may be invoked with a null argument to install the registrations in the global EPackage.Registry rather than a specified local registry. </p>
</div>
<div class="section" title="UML">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="UML"></a>UML</h3>
</div>
</div>
</div>
<p>For the UML metamodel, the required registrations should be provided in a similar way by invoking
<code class="code">org.eclipse.ocl.uml.OCL.initialize(ResourceSet)</code>.
</p>
<p>This initialization ensures that *.uml is understood that http://www.eclipse.org/ocl/1.1.0/oclstdlib.uml is known and that standard pathmap: locations are resolvable. It also invokes
<code class="code">org.eclipse.uml2.uml.resources.util.UMLResourcesUtil.init(ResourceSet)</code> to ensure that all Eclipse and OMG UML namespaces and extensions are registered..
</p>
</div>
<div class="section" title="Classpath">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="Classpath"></a>Classpath</h3>
</div>
</div>
</div>
<p>A precise Java 5 classpath for the current release may be obtained as a diagnostic output near the end of the console output of the
<a class="ulink" href="https://ci.eclipse.org/ocl/job/ocl-ecore-standalone/lastBuild/console" target="_new">Jenkins Ecore Classpath</a> or
<a class="ulink" href="https://ci.eclipse.org/ocl/job/ocl-uml-standalone/lastBuild/console" target="_new">Jenkins UML Classpath</a> jobs.
</p>
</div>
<div class="section" title="Xtext Editors">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="XtextEditors"></a>Xtext Editors</h3>
</div>
</div>
</div>
<p>The Xtext Editors use the Pivot binding and so their initialiation is described in &ldquo;Pivot Standalone Configuration&rdquo;#PivotStandalone.</p>
<p>The Xtext editors may be used with the Ecore or UML bindings in so far as the Complete OCL editor provides a *.ocl document that may be parsed by the LPG parser, and the OCLinEcore editor provides embedded OCL that may be executed by either evaluator.</p>
</div>
</div>
</body>
</html>