Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2017-04-23 18:42:07 +0000
committervincent lorenzo2017-05-31 15:10:33 +0000
commit125d946f362a14128a4aacabd54191231f593c34 (patch)
tree872e9a1cc4cd052d6ca5b33494308a16ef1685a8
parentc5620db13c9577efc668b0c7fa47093eaa8d16f1 (diff)
downloadorg.eclipse.papyrus-125d946f362a14128a4aacabd54191231f593c34.tar.gz
org.eclipse.papyrus-125d946f362a14128a4aacabd54191231f593c34.tar.xz
org.eclipse.papyrus-125d946f362a14128a4aacabd54191231f593c34.zip
Bug 515707: [Expressions] Papyrus must provide a generic extensible way to create and interprete Expression
- EMF expressions documentation plugin Change-Id: I749f89f925649c589478bad518b0e89961ac745b Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.doc.feature/feature.xml6
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.classpath7
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.project47
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/META-INF/MANIFEST.MF9
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/OSGI-INF/l10n/bundle.properties4
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/about.html28
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/build.properties7
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/plugin.xml24
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/pom.xml53
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-devDoc-main-toc.xml9
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-userDoc-main-toc.xml7
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsDevDoc.mediawiki120
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsUserDoc.mediawiki78
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BasicExpressionClassDiagram.PNGbin0 -> 39774 bytes
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BooleanExpressionClassDiagram.PNGbin0 -> 68638 bytes
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/CreateAnExpressionCatalogForTheProfile.pngbin0 -> 30821 bytes
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/UMLExpressionsClassDiagram.PNGbin0 -> 52368 bytes
-rw-r--r--plugins/doc/pom.xml1
19 files changed, 407 insertions, 0 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.doc.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.doc.feature/feature.xml
index 1ef988def97..c928b4451df 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.doc.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.doc.feature/feature.xml
@@ -35,6 +35,12 @@
unpack="false"/>
<plugin
+ id="org.eclipse.papyrus.infra.emf.expressions.doc"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
id="org.eclipse.papyrus.infra.gmfdiag.common.doc"
download-size="0"
install-size="0"
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.classpath b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.classpath
new file mode 100755
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.project b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.project
new file mode 100755
index 00000000000..aa833e04912
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.project
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.expressions.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.settings/org.eclipse.jdt.core.prefs b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..0c68a61dca8
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..dbdaee2bc86
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.expressions.doc;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Description: %Bundle-Description
+Require-Bundle: org.eclipse.help
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/OSGI-INF/l10n/bundle.properties b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 00000000000..58161ae9e86
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.infra.emf.expressions.doc
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus EMF Expressions Documentation
+Bundle-Description = This plugin provides the documentation for users and developpers about the Papyrus Expressions Frameworks. \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/about.html b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/about.html
new file mode 100755
index 00000000000..598b3684879
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/build.properties b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/build.properties
new file mode 100755
index 00000000000..194a6120dd9
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+ about.html,\
+ plugin.xml,\
+ target/site/generated-eclipse-help/**,\
+ OSGI-INF/
+src.includes = about.html,\
+ src/site/mediawiki/
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/plugin.xml b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/plugin.xml
new file mode 100755
index 00000000000..ece20324cd5
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="target/site/generated-eclipse-help/expressions-userDoc-main-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/site/generated-eclipse-help/expressionsUserDoc-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/site/generated-eclipse-help/expressionsDevDoc-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/site/generated-eclipse-help/expressions-devDoc-main-toc.xml"
+ primary="false">
+ </toc>
+ </extension>
+
+</plugin>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/pom.xml b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/pom.xml
new file mode 100755
index 00000000000..419207d18d3
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.plugins-doc</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.emf.expressions.doc</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <description>This plugin provides the documentation for users and developpers about the Papyrus Expressions Frameworks.</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
+ <configuration>
+ <sourceFolder>src/site/mediawiki</sourceFolder>
+ <outputFolder>${project.build.directory}/site/generated-eclipse-help</outputFolder>
+ <!-- copyrightNotice>${help.copyrightNotice}</copyrightNotice>
+ <title>${help.documentTitle}</title-->
+ <multipleOutputFiles>false</multipleOutputFiles>
+ <navigationImages>true</navigationImages>
+ <formatOutput>true</formatOutput>
+ <htmlFilenameFormat>$1.html</htmlFilenameFormat>
+ <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
+ <helpPrefix>target/site/generated-eclipse-help</helpPrefix>
+ <!-- stylesheetUrls>
+ <param>styles/main.css</param>
+ </stylesheetUrls-->
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-help</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
+ <version>${mylyn.wikitext.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <name>Papyrus Infra Nattable doc</name>
+</project>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-devDoc-main-toc.xml b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-devDoc-main-toc.xml
new file mode 100755
index 00000000000..4994dcf6bd6
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-devDoc-main-toc.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Expressions" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocDev">
+ <topic label="Expressions" >
+ <topic label="Framework">
+ <link toc="target/site/generated-eclipse-help/expressionsDevDoc-toc.xml"/>
+ <anchor id="expressionsDevDoc"/>
+ </topic>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-userDoc-main-toc.xml b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-userDoc-main-toc.xml
new file mode 100755
index 00000000000..b6ee13ba55a
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressions-userDoc-main-toc.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Expressions" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocCustom">
+ <topic label="Expressions" >
+ <link toc="target/site/generated-eclipse-help/expressionsUserDoc-toc.xml"/>
+ <anchor id="expressionsUserDoc"/>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsDevDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsDevDoc.mediawiki
new file mode 100755
index 00000000000..49a854ec670
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsDevDoc.mediawiki
@@ -0,0 +1,120 @@
+=Introduction=
+Since Papyrus 3.0 (Eclipse Oxygen), Papyrus provides the Expressions Framework.
+This framework provides one basis interface <code>IExpression<CONTEXT_TYPE, RETURN_TYPE></code>. This interface provides the method <code>evaluate(CONTEXT_TYPE):RETURN_TYPE</code>.
+This framework has been developed to be hightly extensible, in order to be able to evaluate all object kinds and returning all possible values. This extensibility requires for the developer to extends the basic IExpression in its framework.
+
+The expressions can be grouped in an <code>ExpressionCatalog</code>, in order to provide predefined expressions to the user.
+Each expression must have a name and can have a description.
+
+==Why this framework?==
+The Expressions have initially been developed for Papyrus Matrices Table. Developing the matrices, we need to provide a way to easily filter the rows and the columns to show. That's the reason for which the first expressions available in Papyrus are the boolean expressions to evaluate EObject.
+
+==Initial requirements==
+*the framework must be extensible for the developer
+*the framework must be easy to configure for the user
+*the framework must allow to get a strong typing for the parameters (other frameworks, like Papyrus EMF Facet requires to check the type of the parameters before evaluating the object, the types are not verified during the build of the model using them)
+**we required to be able to type filters used in the matrices by an expression working on EObject and returning Boolean values.
+*no 'hidden' parameter (Papyrus Constraints framework is limited to boolean, and required parameters of the constraint are not obvious to find.
+*must allow to wrap pre-existing contraints mechanism (OCL, EMF-Facet, and others).
+
+=How the Expressions Framework has been built?=
+*The description of the framework has been done using Papyrus. We created 2 models to describe the expressions. The first one define the bases of the framework and provides the boolean expressions for eobjects. The second one specialize the previous model for UML. Here, you have three snapshots of these models:
+
+[[File:images/BasicExpressionClassDiagram.PNG|frame|The basis of the Expression Framework]] <br>
+
+[[File:images/BooleanExpressionClassDiagram.PNG|frame|The boolean operators expressions]] <br>
+
+[[File:images/UMLExpressionsClassDiagram.PNG|frame|The expressions for UML.]] <br>
+
+
+
+*these uml models has been converted into EMF models using the UMLToEcore tool provided by UML. Unfortunately, this framework doesn't manage the Templates defined in our model. So we patched the uml plugin '''org.eclipse.uml2.uml.util.UMLUtil''' to be able to generate the expected EMF model. This patch is available in the plugin '''org.eclipse.papyrus.infra.emf.expression''', in the '''patch''' folder.
+*the previous step gave us the file ''*.ecore'' and ''*.genmodel''. Before generating the source code, we configure the ''*.genmodel'' as described here:
+
+#Selecting the root of the genmodel:
+##all folders for generated code are set to ''src-gen'' instead of ''src''
+##In the ''All'' group
+###'''NON-NLS markers''': <code>true</code>
+###'''Copyright Text''': we set the Papyrus header
+###''''OSGI Compatible''': <code>true</code>
+##In the ''Edit'' group
+###'''Creation Icon''': <code>false</code> (to avoid to have one icon by feature)
+##In the ''Editor'' group
+###'''Creation Sub Menus''': <code>true</code> (we no idea about the real need of this feature)
+#Selecting each EPackage of the EMF Model
+##In the ''Edit'' Group
+###'''Child Creation Extender''': set to <code>true</code>, to get creation menu coming from the other models extending expressions
+###'''Extensible Provider Factory''': set to <code>true</code>
+##In the ''Editor'' Group
+###'''Generated Model Wizard''': set to <code>false</code>, <u>excepted for the Expressions EPackage itself</u>
+###'''Multiple Editor Page''': set to <code>false</code>, <u>excepted for the Expressions EPackage itself</u>
+
+
+
+After this configuration, we generate the java code for the model, in order to get the EMF edit plugins for each expression model, and the editor. This last one is mandatory only for the basis of the expression framework. The extension, like UML Expressions, doesn't require it.
+
+We completed the generated code declaring a custom factory for the package to implement the <code>evaluate</code> methods for each expression. In the future, we probably look for including the body of the method in the UML model, using the OCL language.
+
+We declare our own ''ResourceFactory'' and ''Resource'', in order to control the format options for all editors able to manage an EMF resource. By this way, we ensure that the format of the files never changes regardless the used EMF editor. Our new files are: '''org.eclipse.papyrus.infra.emf.expressions.util.custom.ExpressionsResourceFactory''' and '''org.eclipse.papyrus.infra.emf.expressions.util.custom.ExpressionsResource'''.
+
+The options currenlty set for the format are:
+
+<code> Map<Object, Object> options = super.getDefaultSaveOptions();</code><br>
+<code>// idem in Papyrus ModelSet</code><br>
+<code>options.put(XMLResource.OPTION_URI_HANDLER, new URIHandlerImpl.PlatformSchemeAware());</code><br>
+<code>// idem in MultiDiagramUtil</code><br>
+<code>options.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$</code><br>
+<code>options.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);</code><br>
+<code>// formating option about the size of the line in the file</code><br>
+<code>// options.put(XMLResource.OPTION_LINE_WIDTH, 10);</code><br>
+<code>options.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);</code><br>
+
+
+We registered the '''ExpressionsResourceFactory''' throw the extension point <code>org.eclipse.emf.ecore.extension_parser</code>.
+
+We commented a part of the generated code to avoid to get an NPE at runtime. In the method <code>org.eclipse.papyrus.infra.emf.expressions.booleanexpressionspackage.impl.EObjectBooleanExpressionsPackageImpl.createUMLAnnotations</code>, the second call to <code>addAnnotation</code> is trying to add an annotation on the <code>null</code>.
+
+=The Expression plugins=
+The plugins available in Papyrus for the user:
+*'''org.eclipse.papyrus.infra.emf.expressions'''
+**the UML model describing the framework,
+**the equivalent EMF model,
+**the generated code from EMF,
+**custom factory and others classes developed for this framework.
+*'''org.eclipse.papyrus.infra.emf.expressions.edit'''
+**provides the label provider as usual with EMF.
+*'''org.eclipse.papyrus.infra.emf.expressions.editor'''
+**provides the editor as usual with EMF.
+*'''org.eclipse.papyrus.infra.emf.expressions.properties'''
+**provides the properties view, based on XWT, for the expressions.
+*'''org.eclipse.papyrus.uml.expressions'''
+**the UML model describing the extension for UML,
+**the equivalent EMF mode,
+**the generated code from EMF,
+**custom factory and others classes developed for this framework.
+*'''org.eclipse.papyrus.uml.expressions'''
+**provides the label provider as usual with EMF.
+*'''org.eclipse.papyrus.uml.expressions.properties'''
+**provides the properties view, based on XWT, for the UML expressions
+
+In addition, we have a toolsmiths plugin:
+*'''org.eclipse.papyrus.toolsmiths.expressions'''
+**allows to generate an ExpressionCatalog owning all required UML Expressions <code>IsStereotypedWithExpression</code> required to manipulate a given profile.
+
+
+=How to register a new ExpressionCatalog?=
+Your expression catalog file should have the ''expression'' extension.
+You must register it using the extension point called '''org.eclipse.papyrus.infra.emf.expressions.expressionCatalog'''.
+
+=How to create a CatalogExpression for a UML Profile?=
+Installaing the Papyrus Toolsmiths feature, you get an Expressions Generator. This one is able to generate all expressions '''IsStereotypedWithExpression''' to test application of your stereotypes defined in your profile.
+
+[[File:images/CreateAnExpressionCatalogForTheProfile.png|frame| The menu to create an expression catalog.]] <br>
+#Open your profile
+#Select the root profile
+#'''Right-Click'''->'''Generate Tooling Model'''->'''Create an ExpressionCatalog for the Profile'''
+#The created catalog is stored as the same location than your profile. You can move it to the wanted location
+#In the plugin.xml of the project providing the catalog, you must register it throw the extension point '''org.eclipse.papyrus.infra.emf.expressions.expressionCatalog'''.
+
+=How to get all registered CatalogExpression?=
+You must call the method <code>org.eclipse.papyrus.infra.emf.expressions.catalog.ExpressionCatalogRegistry.getAllRegisteredCatalog()</code>.
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsUserDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsUserDoc.mediawiki
new file mode 100755
index 00000000000..eaa244120a7
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/expressionsUserDoc.mediawiki
@@ -0,0 +1,78 @@
+=Introduction=
+Since Papyrus 3.0 (Eclipse Oxygen), Papyrus provides the Expressions Framework.
+This framework provides one basis interface <code>IExpression<CONTEXT_TYPE, RETURN_TYPE></code>. This interface provides the method <code>evaluate(CONTEXT_TYPE):RETURN_TYPE</code>. This framework has been developed to be hightly extensible. Please read the expression developer documentation to go further.
+
+==Why this framework?==
+The Expressions have initially been developed for Papyrus Matrices Table. Developing the matrices, we need to provide a way to the user to easily filter the rows and the columns to show. That's the reason for which the first expressions available in Papyrus are the boolean expressions.
+
+
+==General Presentation==
+Nowadays (Papyrus 3.0), for the users, the expressions are only used in the context of the Papyrus Matrices Table.
+Throw the Matrix Property View, the user can create its own expressions to use them as filter. It is also possible for him to reference existing expressions provides by Papyrus.
+
+===ExpressionCatalog===
+An ExpressionCatalog owns <code>IExpression<?,?></code>. It allows to provide predefined expressions to the user.
+
+===Existing IExpression<EObject,Boolean>===
+For these expressions, the evaluate method takes as argument an '''EObject''' and returns a '''Boolean''', so <code>true</code> or <code>false</code>.
+If you don't know what is an EObject, it is not matter. It is a detail of the implementation of UML in Eclipse.
+The only thing to know for Papyrus user, it that all UML Elements are EObject.
+
+Here, we present you the generic boolean expressions provided by Papyrus:
+*'''LiteralTrueExpression'''
+**parameters: no parameter
+** the evaluation returns always <code>true</code>
+*'''LiteralFalseExpression'''
+**parameters: no parameter
+**semantic:the evaluation returns always <code>false</code>
+*'''AndExpression'''
+**parameters:
+***''ownedExpressions'': other boolean expressions owned by the <code>AndExpresion</code>,
+***''referencedExpressions'': other boolean expressions referenced by the <code>AndExpresion</code>.
+**semantic:this expression allows to make a logical AND between all owned and referenced expressions.
+**default value: if these is no expression to evaluate, we return <code>true</code> by default.
+*'''OrExpression'''
+**parameters:
+***''ownedExpressions'': other boolean expressions owned by the <code>OrExpression</code>,
+***''referencedExpressions'': other boolean expressions referenced by the <code>OrExpression</code>.
+**semantic: this expression allows to make a logical OR between all owned and referenced expressions.
+**default value: if these is no expression to evaluate, we return <code>false</code> by default.
+*'''NotExpression'''
+**parameters:
+***''ownedExpression'': a boolean expression owned by the <code>NotExpression</code>,
+***''referencedExpression'': a boolean expression referenced by the <code>NotExpression</code>.
+**semantic: this expression allows get the negation of another boolean expression.
+***when ''ownedExpression'' is defined, we return the negation of the ownedExpression,
+***when ''ownedExpression'' is not defined and referenced expression is defined: we return the negation of the referencedExpression,
+***when ''ownedExpression'' and ''referencedExpression'' are not defined, we return <code>false</code> as default value.
+*'''ReferenceBooleanExpression'''
+**parameter:
+***''referencedExpression'': the referenced boolean expression.
+**semantic: this expression allows to reference an expression provided by the <code>ExpressionCatalog</code>.
+**defaultValue: if there is no referenced expression, the expression returns <code>true</code>.
+
+
+After defining these main objects required to write boolean expression, we provided some expressions dedicated to UML:
+*'''IsStereotypedWithExpression'''
+**parameters:
+***''stereotype identifier'': the qualified name of the stereotype,
+***''profile URI'': the URI of the top profile owning the stereotype, not mandatory.
+**semantic: this expression returns <code>true</code> when the stereotype is applied on the element. If the ''profile URI'' is defined, we check that the stereotype comes from the expected profile.
+**default value:
+*** we return <code>false</code>, if the stereotype identifier is not defined.
+
+*'''HasAppliedStereotypesExpression'''
+**parameters: there is no parameter.
+**semantic: returns <code>true</code> when at least one stereotype is applied on the element.
+
+*'''IsTypeOfExpression'''
+**parameters:
+***''UML Metaclass'': the expected UML metaclass.
+**semantic: returns <code>true</code> when the evaluated element is strictly an instance of the excepted metaclass. So for subtypes, of the expected metaclass, we return <code>false</code>.
+**default value: we return <code>false</code> when the ''UML Metaclass'' is not defined.
+
+*'''IsKindOfExpression'''
+**parameters:
+***''UML Metaclass'': the expected UML metaclass.
+**semantic: returns <code>true</code> when the evaluated element is an instance of the excepted metaclass. So for subtypes, of the expected metaclass, we return <code>true</code> too.
+**default value: we return <code>false</code> when the ''UML Metaclass'' is not defined.
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BasicExpressionClassDiagram.PNG b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BasicExpressionClassDiagram.PNG
new file mode 100755
index 00000000000..d5559aeb260
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BasicExpressionClassDiagram.PNG
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BooleanExpressionClassDiagram.PNG b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BooleanExpressionClassDiagram.PNG
new file mode 100755
index 00000000000..0d19f4a436b
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/BooleanExpressionClassDiagram.PNG
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/CreateAnExpressionCatalogForTheProfile.png b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/CreateAnExpressionCatalogForTheProfile.png
new file mode 100755
index 00000000000..78f5dd567c1
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/CreateAnExpressionCatalogForTheProfile.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/UMLExpressionsClassDiagram.PNG b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/UMLExpressionsClassDiagram.PNG
new file mode 100755
index 00000000000..b32c3b552a0
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.infra.emf.expressions.doc/src/site/mediawiki/images/UMLExpressionsClassDiagram.PNG
Binary files differ
diff --git a/plugins/doc/pom.xml b/plugins/doc/pom.xml
index 226670329be..b3bde2847ce 100644
--- a/plugins/doc/pom.xml
+++ b/plugins/doc/pom.xml
@@ -16,6 +16,7 @@
<module>org.eclipse.papyrus.infra.doc</module>
<module>org.eclipse.papyrus.infra.gmfdiag.common.doc</module>
<module>org.eclipse.papyrus.infra.gmfdiag.css.doc</module>
+ <module>org.eclipse.papyrus.infra.emf.expressions.doc</module>
<module>org.eclipse.papyrus.infra.internationalization.doc</module>
<module>org.eclipse.papyrus.infra.nattable.doc</module>
<module>org.eclipse.papyrus.infra.newchild.doc</module>

Back to the top