Skip to content

Commit

Permalink
Generated from commit: eclipse-xtext/xtext-website@66a7140
Browse files Browse the repository at this point in the history
  • Loading branch information
genie-xtext committed Dec 13, 2024
1 parent 75a80ee commit 48df0d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions documentation/302_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h1 id="configuration">Configuration</h1>

<h2 id="short-intro-to-mwe">A Short Introduction to MWE2</h2>

<p>MWE2 (Modeling Workflow Engine) allows to compose object graphs declaratively in a very compact manner. The nice thing about it is that it just instantiates Java classes and the configuration is done through public setter and adder methods as known from Java Beans encapsulation principles. More in-depth information can be found in the <a href="https://github.com/eclipse/mwe/blob/master/documentation/mwe2.md">MWE2 documentation</a>.</p>
<p>MWE2 (Modeling Workflow Engine) allows to compose object graphs declaratively in a very compact manner. The nice thing about it is that it just instantiates Java classes and the configuration is done through public setter and adder methods as known from Java Beans encapsulation principles. More in-depth information can be found in the <a href="https://github.com/eclipse-mwe/mwe/blob/master/documentation/mwe2.md">MWE2 documentation</a>.</p>

<p>Given the following simple Java class (POJO):</p>

Expand Down Expand Up @@ -249,14 +249,14 @@ <h2 id="short-intro-to-mwe">A Short Introduction to MWE2</h2>
}
</code></pre>

<p>Although arbitrary Java classes can be used, the standard root element for MWE2 files is <a href="https://github.com/eclipse/mwe/blob/v2.12.1/plugins/org.eclipse.emf.mwe2.runtime/src/org/eclipse/emf/mwe2/runtime/workflow/Workflow.java">Workflow</a>, which is part of the very slim runtime model shipped with MWE2. It accepts <em>beans</em> and <em>components</em>.</p>
<p>Although arbitrary Java classes can be used, the standard root element for MWE2 files is <a href="https://github.com/eclipse-mwe/mwe/blob/master/plugins/org.eclipse.emf.mwe2.runtime/src/org/eclipse/emf/mwe2/runtime/workflow/Workflow.java">Workflow</a>, which is part of the very slim runtime model shipped with MWE2. It accepts <em>beans</em> and <em>components</em>.</p>

<ul>
<li>
<p>The method Workflow.addBean(Object) provides a means to apply global side-effects, which unfortunately is required sometimes. For instance, <a href="https://github.com/eclipse/mwe/blob/v2.12.1/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java">StandaloneSetup</a> can be used to initialize global EMF metadata such as the <a href="https://git.eclipse.org/r/plugins/gitiles/emf/org.eclipse.emf/+/refs/tags/R2_20_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EPackage.java">EPackage.Registry</a>.</p>
<p>The method Workflow.addBean(Object) provides a means to apply global side-effects, which unfortunately is required sometimes. For instance, <a href="https://github.com/eclipse-mwe/mwe/blob/master/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java">StandaloneSetup</a> can be used to initialize global EMF metadata such as the <a href="https://git.eclipse.org/r/plugins/gitiles/emf/org.eclipse.emf/+/refs/tags/R2_20_0/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/EPackage.java">EPackage.Registry</a>.</p>
</li>
<li>
<p>The method Workflow.addComponent(..) accepts instances of <a href="https://github.com/eclipse/mwe/blob/v2.12.1/plugins/org.eclipse.emf.mwe2.runtime/src/org/eclipse/emf/mwe2/runtime/workflow/IWorkflowComponent.java">IWorkflowComponent</a>, which is the primary concept of the workflow model of MWE2. The language generator component itself is an instance of IWorkflowComponent and can therefore be used within MWE2 workflows.</p>
<p>The method Workflow.addComponent(..) accepts instances of <a href="https://github.com/eclipse-mwe/mwe/blob/master/plugins/org.eclipse.emf.mwe2.runtime/src/org/eclipse/emf/mwe2/runtime/workflow/IWorkflowComponent.java">IWorkflowComponent</a>, which is the primary concept of the workflow model of MWE2. The language generator component itself is an instance of IWorkflowComponent and can therefore be used within MWE2 workflows.</p>
</li>
</ul>

Expand Down Expand Up @@ -454,7 +454,7 @@ <h3 id="importing-metamodels">Importing Existing Metamodels</h3>

<p>If you are importing more than one metamodel, you can add more <code>referencedResource</code> declarations as required.</p>

<p>In some occasions this simple way of referencing metamodels is not sufficient; you can then use the <a href="https://github.com/eclipse/mwe/blob/v2.12.1/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java">StandaloneSetup</a> as a Workflow bean for fine-tuning your EMF setup. Example:</p>
<p>In some occasions this simple way of referencing metamodels is not sufficient; you can then use the <a href="https://github.com/eclipse-mwe/mwe/blob/master/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java">StandaloneSetup</a> as a Workflow bean for fine-tuning your EMF setup. Example:</p>

<pre><code class="language-mwe2">bean = StandaloneSetup {
platformUri = "${rootPath}"
Expand Down
4 changes: 2 additions & 2 deletions feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</description>
<link>https://eclipse.dev/Xtext/</link>
<atom:link href="https://eclipse.dev/Xtext/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Sat, 07 Dec 2024 07:59:05 +0000</pubDate>
<lastBuildDate>Sat, 07 Dec 2024 07:59:05 +0000</lastBuildDate>
<pubDate>Fri, 13 Dec 2024 09:37:09 +0000</pubDate>
<lastBuildDate>Fri, 13 Dec 2024 09:37:09 +0000</lastBuildDate>
<generator>Jekyll v2.5.3</generator>

<item>
Expand Down
4 changes: 2 additions & 2 deletions xtend/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</description>
<link>https://eclipse.dev/Xtext/xtend/</link>
<atom:link href="https://eclipse.dev/Xtext/xtend/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Sat, 07 Dec 2024 07:59:06 +0000</pubDate>
<lastBuildDate>Sat, 07 Dec 2024 07:59:06 +0000</lastBuildDate>
<pubDate>Fri, 13 Dec 2024 09:37:10 +0000</pubDate>
<lastBuildDate>Fri, 13 Dec 2024 09:37:10 +0000</lastBuildDate>
<generator>Jekyll v2.5.3</generator>

<item>
Expand Down

0 comments on commit 48df0d9

Please sign in to comment.