Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-12-09 11:24:15 +0000
committervincent lorenzo2016-12-14 15:38:58 +0000
commit54878023d146bffcdafe121e2fa5bf0076ee68e6 (patch)
tree7261b0a7ba818fc7459302d7b0825dd357714241 /plugins/infra
parentb758a18d7d4312b6a82d12e82d4ad07c360eb0f3 (diff)
downloadorg.eclipse.papyrus-54878023d146bffcdafe121e2fa5bf0076ee68e6.tar.gz
org.eclipse.papyrus-54878023d146bffcdafe121e2fa5bf0076ee68e6.tar.xz
org.eclipse.papyrus-54878023d146bffcdafe121e2fa5bf0076ee68e6.zip
Bug 496905: [Diagram][ModelExplorer][Table][Dialog] Papyrus must
integrate the internationalization feature provided by UML. https://bugs.eclipse.org/bugs/show_bug.cgi?id=496905 Documentation for Internationalization. Change-Id: Iad2301c0931fb326d7ef593c893d5e35a2dfe5c6 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/plugin.xml7
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/pom.xml38
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/InternationalizationPreferences.pngbin15707 -> 0 bytes
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/LabelsInternationalizationExample.pngbin10402 -> 0 bytes
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/PropertiesModelExplorer.pngbin6347 -> 0 bytes
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev-toc.xml22
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.html266
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.mediawiki197
10 files changed, 1 insertions, 535 deletions
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/.settings/org.eclipse.core.resources.prefs b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/.settings/org.eclipse.core.resources.prefs
index a8dcccbdbbf..d62816525ba 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,3 @@
eclipse.preferences.version=1
-encoding//src/site/mediawiki/internationalizationDev-toc.xml=utf-8
-encoding//src/site/mediawiki/internationalizationDev.html=UTF-8
encoding//target/site/generated-eclipse-help/internationalizationDev-toc.xml=utf-8
encoding//target/site/generated-eclipse-help/internationalizationDev.html=UTF-8
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/META-INF/MANIFEST.MF b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/META-INF/MANIFEST.MF
index c45aaded456..00154872ac9 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/META-INF/MANIFEST.MF
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/META-INF/MANIFEST.MF
@@ -24,8 +24,6 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility
org.eclipse.papyrus.infra.emf;bundle-version="[2.2.0,3.0.0)",
org.eclipse.papyrus.infra.internationalization.common;bundle-version="[1.0.0,2.0.0)",
org.eclipse.jface;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.help;bundle-version="[3.7.0,4.0.0)",
- org.eclipse.papyrus.infra.doc;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.papyrus.infra.internationalization.Activator
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/plugin.xml b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/plugin.xml
index 189b4a897ee..63e9b49fc53 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/plugin.xml
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/plugin.xml
@@ -21,12 +21,5 @@
fileExtension="internationalization">
</model>
</extension>
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="target/site/generated-eclipse-help/internationalizationDev-toc.xml"
- primary="false">
- </toc>
- </extension>
</plugin>
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/pom.xml b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/pom.xml
index 19dc71f2eef..f4a65611106 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/pom.xml
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/pom.xml
@@ -9,42 +9,4 @@
<artifactId>org.eclipse.papyrus.infra.internationalization</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-
- <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>
</project> \ No newline at end of file
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/InternationalizationPreferences.png b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/InternationalizationPreferences.png
deleted file mode 100644
index a3796931ef1..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/InternationalizationPreferences.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/LabelsInternationalizationExample.png b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/LabelsInternationalizationExample.png
deleted file mode 100644
index 9d4147d9d1a..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/LabelsInternationalizationExample.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/PropertiesModelExplorer.png b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/PropertiesModelExplorer.png
deleted file mode 100644
index 064464dcf77..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/images/PropertiesModelExplorer.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev-toc.xml b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev-toc.xml
deleted file mode 100644
index 555b1dbf2b2..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev-toc.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="internationalizationDev" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocDev" topic="src/site/mediawiki/internationalizationDev.html">
- <topic href="src/site/mediawiki/internationalizationDev.html" label="Internationalization">
- <topic href="src/site/mediawiki/internationalizationDev.html#Plugins" label="Plugins"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#How_to_use_internationalization" label="How to use internationalization">
- <topic href="src/site/mediawiki/internationalizationDev.html#How_the_labels_are_managed_in_properties_file" label="How the labels are managed in properties file"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Infra_.28Diagrams_and_Tables.29" label="Infra (Diagrams and Tables)"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#UML_Named_Elements" label="UML Named Elements"></topic>
- </topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Internationalization_preferences" label="Internationalization preferences"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Control_mode" label="Control mode">
- <topic href="src/site/mediawiki/internationalizationDev.html#What_is_it_managed" label="What is it managed"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#How_is_it_managed" label="How is it managed"></topic>
- </topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Specificities" label="Specificities">
- <topic href="src/site/mediawiki/internationalizationDev.html#Loading_properties_resources" label="Loading properties resources"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#InternationalizationUMLItemProviderAdapterFactory" label="InternationalizationUMLItemProviderAdapterFactory"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Diagram_and_Table_owner_QualifiedName" label="Diagram and Table owner QualifiedName"></topic>
- <topic href="src/site/mediawiki/internationalizationDev.html#Editors" label="Editors"></topic>
- </topic>
- </topic>
-</toc>
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.html b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.html
deleted file mode 100644
index 0e65f08f962..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<?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"/>
- </head>
- <body>
- <h1 id="Internationalization">Internationalization</h1>
- <p>The internationalization is the way to manage your model with a specific language by labels. Like Eclipse, the internationalization is managed by the 'properties' file which are defined depending language as following (with for example, english language in US country):</p>
- <ul>
- <li>
- <i>modelName</i>
- <b>_en_US.properties</b>
- </li>
- <li>
- <i>modelName</i>
- <b>_en.properties</b>
- </li>
- <li>
- <i>modelName</i>
- <b>.properties</b>
- </li>
- </ul>
- <p>
- <img title="Properties files in Model Explorer" alt="Properties files in Model Explorer" border="1" src="images/PropertiesModelExplorer.png"/>
- </p>
- <h2 id="Plugins">Plugins</h2>
- <p>The plugins for the internationalization are the following:</p>
- <ul>
- <li><code>org.eclipse.papyrus.infra.internationalization</code>: it contains:
- <ul>
- <li>Internationalization Meta-model</li>
- <li>Generated code from the Meta-model</li>
- <li>The model resources for the internationalization entries (key and label of internationalized objects) and internationalization preferences</li>
- <li>Utils classes to manage the labels and the preferences</li>
- </ul>
- </li>
- <li><code>org.eclipse.papyrus.infra.internationalization.edit</code>: contains generated edit code from the Meta-model</li>
- <li><code>org.eclipse.papyrus.infra.internationalization.common</code>: contains all the common classes to manage command modification and some utils for the internationalization preferences. It contains the <code>IInternationalizationEditor</code> interface too which allows to define the editor that can be internationalized.</li>
- <li><code>org.eclipse.papyrus.infra.internationalization.controlmode</code>: contains the needed elements to manage the control mode for the properties and the preferences files</li>
- <li><code>org.eclipse.papyrus.infra.internationalization.ui</code>: contains the needed ui classes especially for the internationalization preferences</li>
- <li><code>org.eclipse.papyrus.infra.internationalization.utils</code>: contains all the needed utils classes to manage the label which can be used to get the diagrams and tables labels</li>
- <li><code>org.eclipse.papyrus.infra.editor.welcome.internationalization</code>: contains the needed classes to manage the preferences in the welcome page</li>
- <li><code>org.eclipse.papyrus.uml.internationalization</code>: contains the UML internationalization model resource which can manage the UML elements in the properties file</li>
- <li><code>org.eclipse.papyrus.uml.internationalization.edit</code>: contains the <code>InternationalizationUMLItemProviderAdapterFactory</code> which define the ItemProvider of UML elements to use the Papyrus getLabel function instead of UML getLabel function</li>
- <li><code>org.eclipse.papyrus.uml.internationalization.utils</code>: contains all the needed utils classes to manage the label which can be used to get the named elements labels</li>
- </ul>
- <h2 id="How_to_use_internationalization">How to use internationalization</h2>
- <p>Instead of name, the label of objects must be displayed in Papyrus.</p>
- <h3 id="How_the_labels_are_managed_in_properties_file">How the labels are managed in properties file</h3>
- <p>Each element which have a label must be written in the properties file like following:</p>
- <ul>
- <li>If this is a diagram:
- <ul>
- <li>
- <b>_labelDiagram_</b>
- <i>DiagramOwnerQualifiedName</i>
- <b>_label_</b>
- <i>DiagramName</i>
- <b>=</b>
- <i>DiagramLabel</i>
- </li>
- </ul>
- </li>
- <li>If this is a table:
- <ul>
- <li>
- <b>_labelTable_</b>
- <i>TableOwnerQualifiedName</i>
- <b>_label_</b>
- <i>TableName</i>
- <b>=</b>
- <i>TableLabel</i>
- </li>
- </ul>
- </li>
- <li>If this is an UML NamedElement:
- <ul>
- <li>
- <b>_label_</b>
- <i>NamedElementQualifiedName</i>
- <b>=</b>
- <i>NamedElementLabel</i>
- </li>
- </ul>
- </li>
- </ul>
- <p>
- <img title="Example of internationalization labels" alt="Example of internationalization labels" border="1" src="images/LabelsInternationalizationExample.png"/>
- </p>
- <h3 id="Infra_.28Diagrams_and_Tables.29">Infra (Diagrams and Tables)</h3>
- <p>For the Diagrams and the Tables, UML is not needed. So to use the internationalization, you just need to:</p>
- <ul>
- <li>add the org.eclipse.papyrus.infra.internationalization.utils dependency</li>
- <li>use methods/functions of <code>LabelInternationalization</code></li>
- </ul>
- <p>The <code>LabelInternationalization</code> class contains the following needed methods/functions:</p>
- <table class="wikitable" border="1">
- <tr>
- <th style="text-align: center;">Method/Function</th>
- <th style="text-align: center;">Parameters</th>
- <th style="text-align: center;">Description</th>
- </tr>
- <tr>
- <th style="font-weight: bold;">getInstance</th>
- <td></td>
- <td>The the instance of LabelInternationalization</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getDiagramLabelWithoutName</th>
- <td>Diagram</td>
- <td>Get the label of the diagram without getting its name if label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getDiagramLabel</th>
- <td>Diagram</td>
- <td>Get the label of the diagram or the name if the diagram label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">setDiagramLabel</th>
- <td>Diagram, String, Locale</td>
- <td>Set the label (in prameter) of the Diagram for the locale needed (if <code>null</code>, the current must be used) without using command</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getSetDiagramLabelCommand</th>
- <td>EditingDomain, Diagram, String, Locale</td>
- <td>Get the command to set the label (in prameter) of the Diagram for the locale needed (if <code>null</code>, the current must be used)</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getTableLabelWithoutName</th>
- <td>Table</td>
- <td>Get the label of the Table without getting its name if label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getTableLabel</th>
- <td>Table</td>
- <td>Get the label of the Table or the name if the Table label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">setDiagramLabel</th>
- <td>Table, String, Locale</td>
- <td>Set the label (in prameter) of the Table for the locale needed (if <code>null</code>, the current must be used) without using command</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getSetTableLabelCommand</th>
- <td>EditingDomain, Table, String, Locale</td>
- <td>Get the command to set the label (in prameter) of the Table for the locale needed (if <code>null</code>, the current must be used)</td>
- </tr>
- </table>
- <h3 id="UML_Named_Elements">UML Named Elements</h3>
- <p>For the UML NamedElement, to use the internationalization, you just need to:</p>
- <ul>
- <li>add the org.eclipse.papyrus.uml.internationalization.utils dependency</li>
- <li>use the <code>UMLLabelInternationalization</code></li>
- </ul>
- <p>The <code>UMLLabelInternationalization</code> class contains following needed methods/functions:</p>
- <table class="wikitable" border="1">
- <tr>
- <th style="text-align: center;">Method/Function</th>
- <th style="text-align: center;">Parameters</th>
- <th style="text-align: center;">Description</th>
- </tr>
- <tr>
- <th style="font-weight: bold;">getInstance</th>
- <td></td>
- <td>The the instance of LabelInternationalization</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getLabelWithoutName</th>
- <td>NamedElement</td>
- <td>Get the label of the NamedElement without getting its name if label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getLabel</th>
- <td>NamedElement</td>
- <td>Get the label of the NamedElement or the name if the NamedElement label is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">setLabel</th>
- <td>NamedElement, String, Locale</td>
- <td>Set the label (in prameter) of the NamedElement for the locale needed (if <code>null</code>, the current must be used) without using command</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getSetLabelCommand</th>
- <td>EditingDomain, NamedElement, String, Locale</td>
- <td>Get the command to set the label (in prameter) of the NamedElement for the locale needed (if <code>null</code>, the current must be used)</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getKeywordWithoutName</th>
- <td>Stereotype</td>
- <td>Get the keyword of the Stereotype without getting its name if keyword is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getKeyword</th>
- <td>Stereotype</td>
- <td>Get the keyword of the Stereotype or the name if the Stereotype keyword is not available</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">setKeyword</th>
- <td>Stereotype, String, Locale</td>
- <td>Set the keyword (in prameter) of the Stereotype for the locale needed (if <code>null</code>, the current must be used) without using command</td>
- </tr>
- <tr>
- <th style="font-weight: bold;">getSetKeywordCommand</th>
- <td>EditingDomain, Stereotype, String, Locale</td>
- <td>Get the command to set the keyword (in prameter) of the Stereotype for the locale needed (if <code>null</code>, the current must be used)</td>
- </tr>
- </table>
- <h2 id="Internationalization_preferences">Internationalization preferences</h2>
- <p>Two preferences are managed in the papyrus model:</p>
- <ul>
- <li>useInternationalization: Boolean to determinate if the internationalization must be used</li>
- <li>language: String to define the selected language for the internationalization</li>
- </ul>
- <p>The preferences are stored as EAnnotation:</p>
- <ul>
- <li>in the notation file in this is a private storage</li>
- <li>in the metadata in this is not a private storage</li>
- </ul>
- <p>
- <img title="Internationalization preferences management" alt="Internationalization preferences management" border="1" src="images/InternationalizationPreferences.png"/>
- </p>
- <p>Those preferences are managed in a <code>PreferenceStore</code> in the activator of org.eclipse.papyrus.infra.internationalization.common plugin.</p>
- <h2 id="Control_mode">Control mode</h2>
- <p>The sub-models are managed with the properties files.
- Indeed, when an object is created as sub-model, the key representing this object or its descendance in the properties files must be moved in sub-properties files corresponding to the controlled object.
- During this sub-model creation, the qualified names of the keys that are moved change, the new qualified names are calculated from the root of the sub-model.</p>
- <h3 id="What_is_it_managed">What is it managed</h3>
- <p>The managed files/objects are:</p>
- <ul>
- <li>The properties files and their keys</li>
- <li>The notation and the internationalization preferences if this is private storage</li>
- </ul>
- <h3 id="How_is_it_managed">How is it managed</h3>
- <p>The <code>org.eclipse.papyrus.infra.internationalization.controlmode</code> manage all the control mode for the internationalization.</p>
- <p>The properties files are managed by:</p>
- <ul>
- <li><code>PropertiesControlParticipant</code> and <code>PropertiesUncontrolParticipant</code> for the participants</li>
- <li><code>CreatePropertiesControlResourceCommand</code> which define the command to create the controlled properties file</li>
- <li><code>RemovePropertiesControlResourceCommand</code> which define the command to delete the controlled properties file</li>
- <li><code>ControlPropertiesCommand</code> which define the command to manage the internationalization entries to move into the controlled properties</li>
- </ul>
- <p>The notation and the internationalization preference storage are managed by:</p>
- <ul>
- <li><code>InternationalizationAnnotationControlParticipant</code> for the participant (uncontrolled is not needed because the parent is priority)</li>
- <li><code>InternationalizationAnnotationCommand</code> which define the command to create the internationalization preference into the controlled notation file</li>
- </ul>
- <h2 id="Specificities">Specificities</h2>
- <h3 id="Loading_properties_resources">Loading properties resources</h3>
- <p>The properties resources are loaded and managed by the <code>UMLInternationalizationModelResource</code> class.
- This <code>UMLInternationalizationModelResource</code> class inherit from <code>InternationalizationModelResource</code> from infra plugins.
- The load is managed as 2 steps:</p>
- <ol>
- <li>Load the file and read the content to create the <code>InternationalizationLibrary</code> with diagrams and tables labels reconciliation with existing diagrams and tables.</li>
- <li>Loop on content to resolve the UML dependencies in properties files to reference the existing UML objects.</li>
- </ol>
- <p>So, after the load, the resolveable properties are managed as UML object, diagram or table as key of <code>InternationalizationLibrary</code></p>
- <h3 id="InternationalizationUMLItemProviderAdapterFactory">InternationalizationUMLItemProviderAdapterFactory</h3>
- <p>The <code>InternationalizationUMLItemProviderAdapterFactory</code> extends <code>UMLItemProviderAdapterFactory</code> and allows to redefine the ItemProvider of UML elements to get the papyrus internationalization getLabel instead of UML getLabel.</p>
- <p>If an ItemProvider of UML element need to be redefined, the ItemProviderAdapterFactory must ihnerit from this class instead of <code>UMLItemProviderAdapterFactory</code>.</p>
- <h3 id="Diagram_and_Table_owner_QualifiedName">Diagram and Table owner QualifiedName</h3>
- <p>The diagrams and the tables are managed in the infra plugins, however, the owner of the diagram or table must be serialized in the properties file by its QualifiedName. So the owner QualifiedName is managed by the class <code>QualifiedNameUtils</code> and calculated manually.</p>
- <h3 id="Editors">Editors</h3>
- <p>The diagrams and tables are managed by the internationalization. To do this, the diagram and table editor must inherit from <code>IInternationalizationEditor</code> which allows to modify part name and refresh the editor with the label.
- If any new editor is comming with internationalization management, this one must ihnerit from <code>IInternationalizationEditor</code> too.</p>
- </body>
-</html> \ No newline at end of file
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.mediawiki b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.mediawiki
deleted file mode 100644
index 608b244fa9b..00000000000
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src/site/mediawiki/internationalizationDev.mediawiki
+++ /dev/null
@@ -1,197 +0,0 @@
-= Internationalization =
-The internationalization is the way to manage your model with a specific language by labels. Like Eclipse, the internationalization is managed by the 'properties' file which are defined depending language as following (with for example, english language in US country):
-* ''modelName'''''_en_US.properties'''
-* ''modelName'''''_en.properties'''
-* ''modelName'''''.properties'''
-
-[[Image:images/PropertiesModelExplorer.png|frame|none|Properties files in Model Explorer]]
-
-== Plugins ==
-The plugins for the internationalization are the following:
-* <code>org.eclipse.papyrus.infra.internationalization</code>: it contains:
-** Internationalization Meta-model
-** Generated code from the Meta-model
-** The model resources for the internationalization entries (key and label of internationalized objects) and internationalization preferences
-** Utils classes to manage the labels and the preferences
-* <code>org.eclipse.papyrus.infra.internationalization.edit</code>: contains generated edit code from the Meta-model
-* <code>org.eclipse.papyrus.infra.internationalization.common</code>: contains all the common classes to manage command modification and some utils for the internationalization preferences. It contains the <code>IInternationalizationEditor</code> interface too which allows to define the editor that can be internationalized.
-* <code>org.eclipse.papyrus.infra.internationalization.controlmode</code>: contains the needed elements to manage the control mode for the properties and the preferences files
-* <code>org.eclipse.papyrus.infra.internationalization.ui</code>: contains the needed ui classes especially for the internationalization preferences
-* <code>org.eclipse.papyrus.infra.internationalization.utils</code>: contains all the needed utils classes to manage the label which can be used to get the diagrams and tables labels
-* <code>org.eclipse.papyrus.infra.editor.welcome.internationalization</code>: contains the needed classes to manage the preferences in the welcome page
-* <code>org.eclipse.papyrus.uml.internationalization</code>: contains the UML internationalization model resource which can manage the UML elements in the properties file
-* <code>org.eclipse.papyrus.uml.internationalization.edit</code>: contains the <code>InternationalizationUMLItemProviderAdapterFactory</code> which define the ItemProvider of UML elements to use the Papyrus getLabel function instead of UML getLabel function
-* <code>org.eclipse.papyrus.uml.internationalization.utils</code>: contains all the needed utils classes to manage the label which can be used to get the named elements labels
-
-== How to use internationalization ==
-Instead of name, the label of objects must be displayed in Papyrus.
-
-=== How the labels are managed in properties file ===
-Each element which have a label must be written in the properties file as following:
-* If this is a diagram:
-** '''_labelDiagram_'''''DiagramOwnerQualifiedName'''''_label_'''''DiagramName'' '''=''' ''DiagramLabel''
-* If this is a table:
-** '''_labelTable_'''''TableOwnerQualifiedName'''''_label_'''''TableName'' '''=''' ''TableLabel''
-* If this is an UML NamedElement:
-** '''_label_'''''NamedElementQualifiedName'' '''=''' ''NamedElementLabel''
-
-[[Image:images/LabelsInternationalizationExample.png|frame|none|Example of internationalization labels]]
-
-=== Infra (Diagrams and Tables) ===
-For the Diagrams and the Tables, UML is not needed. So to use the internationalization, you just need to:
-* add the org.eclipse.papyrus.infra.internationalization.utils dependency
-* use methods/functions of <code>LabelInternationalization</code>
-
-The <code>LabelInternationalization</code> class contains the following needed methods/functions:
-{| class="wikitable" border="1"
-! style="text-align: center;" | Method/Function
-! style="text-align: center;" | Parameters
-! style="text-align: center;" | Description
-|-
-! style="font-weight: bold;" | getInstance
-|
-| The the instance of LabelInternationalization
-|-
-! style="font-weight: bold;" | getDiagramLabelWithoutName
-| Diagram
-| Get the label of the diagram without getting its name if label is not available
-|-
-! style="font-weight: bold;" | getDiagramLabel
-| Diagram
-| Get the label of the diagram or the name if the diagram label is not available
-|-
-! style="font-weight: bold;" | setDiagramLabel
-| Diagram, String, Locale
-| Set the label (in parameter) of the Diagram for the locale needed (if <code>null</code>, the current must be used) without using command
-|-
-! style="font-weight: bold;" | getSetDiagramLabelCommand
-| EditingDomain, Diagram, String, Locale
-| Get the command to set the label (in parameter) of the Diagram for the locale needed (if <code>null</code>, the current must be used)
-|-
-! style="font-weight: bold;" | getTableLabelWithoutName
-| Table
-| Get the label of the Table without getting its name if label is not available
-|-
-! style="font-weight: bold;" | getTableLabel
-| Table
-| Get the label of the Table or the name if the Table label is not available
-|-
-! style="font-weight: bold;" | setDiagramLabel
-| Table, String, Locale
-| Set the label (in prameter) of the Table for the locale needed (if <code>null</code>, the current must be used) without using command
-|-
-! style="font-weight: bold;" | getSetTableLabelCommand
-| EditingDomain, Table, String, Locale
-| Get the command to set the label (in parameter) of the Table for the locale needed (if <code>null</code>, the current must be used)
-|}
-
-=== UML Named Elements ===
-For the UML NamedElement, to use the internationalization, you just need to:
-* add the org.eclipse.papyrus.uml.internationalization.utils dependency
-* use the <code>UMLLabelInternationalization</code>
-
-The <code>UMLLabelInternationalization</code> class contains following needed methods/functions:
-{| class="wikitable" border="1"
-! style="text-align: center;" | Method/Function
-! style="text-align: center;" | Parameters
-! style="text-align: center;" | Description
-|-
-! style="font-weight: bold;" | getInstance
-|
-| The the instance of LabelInternationalization
-|-
-! style="font-weight: bold;" | getLabelWithoutName
-| NamedElement
-| Get the label of the NamedElement without getting its name if label is not available
-|-
-! style="font-weight: bold;" | getLabel
-| NamedElement
-| Get the label of the NamedElement or the name if the NamedElement label is not available
-|-
-! style="font-weight: bold;" | setLabel
-| NamedElement, String, Locale
-| Set the label (in parameter) of the NamedElement for the locale needed (if <code>null</code>, the current must be used) without using command
-|-
-! style="font-weight: bold;" | getSetLabelCommand
-| EditingDomain, NamedElement, String, Locale
-| Get the command to set the label (in parameter) of the NamedElement for the locale needed (if <code>null</code>, the current must be used)
-|-
-! style="font-weight: bold;" | getKeywordWithoutName
-| Stereotype
-| Get the keyword of the Stereotype without getting its name if keyword is not available
-|-
-! style="font-weight: bold;" | getKeyword
-| Stereotype
-| Get the keyword of the Stereotype or the name if the Stereotype keyword is not available
-|-
-! style="font-weight: bold;" | setKeyword
-| Stereotype, String, Locale
-| Set the keyword (in parameter) of the Stereotype for the locale needed (if <code>null</code>, the current must be used) without using command
-|-
-! style="font-weight: bold;" | getSetKeywordCommand
-| EditingDomain, Stereotype, String, Locale
-| Get the command to set the keyword (in parameter) of the Stereotype for the locale needed (if <code>null</code>, the current must be used)
-|}
-
-== Internationalization preferences ==
-Two preferences are managed in the Papyrus model:
-* useInternationalization: Boolean to determinate if the internationalization must be used
-* language: String to define the selected language for the internationalization
-
-
-The preferences are stored as EAnnotation:
-* in the notation file in this is a private storage
-* in the metadata in this is not a private storage
-
-
-[[Image:images/InternationalizationPreferences.png|frame|none|Internationalization preferences management]]
-
-
-Those preferences are managed in a <code>PreferenceStore</code> in the activator of org.eclipse.papyrus.infra.internationalization.common plugin.
-
-The <code>PapyrusProjectScope</code> allows to manage the preferences for the Eclipse project with Papyrus model name.
-
-== Control mode ==
-The sub-models are managed with the properties files.
-Indeed, when an object is created as sub-model, the key representing this object or its descendance in the properties files must be moved in sub-properties files corresponding to the controlled object.
-During this sub-model creation, the qualified names of the keys that are moved change, the new qualified names are calculated from the root of the sub-model.
-
-=== What is it managed ===
-The managed files/objects are:
-* The properties files and their keys
-* The notation and the internationalization preferences if this is private storage
-
-=== How is it managed ===
-The <code>org.eclipse.papyrus.infra.internationalization.controlmode</code> manage all the control mode for the internationalization.
-
-The properties files are managed by:
-* <code>PropertiesControlParticipant</code> and <code>PropertiesUncontrolParticipant</code> for the participants
-* <code>CreatePropertiesControlResourceCommand</code> which define the command to create the controlled properties file
-* <code>RemovePropertiesControlResourceCommand</code> which define the command to delete the controlled properties file
-* <code>ControlPropertiesCommand</code> which define the command to manage the internationalization entries to move into the controlled properties
-
-The notation and the internationalization preference storage are managed by:
-* <code>InternationalizationAnnotationControlParticipant</code> for the participant (uncontrolled is not needed because the parent is priority)
-* <code>InternationalizationAnnotationCommand</code> which define the command to create the internationalization preference into the controlled notation file
-
-== Specificities ==
-=== Loading properties resources ===
-The properties resources are loaded and managed by the <code>UMLInternationalizationModelResource</code> class.
-This <code>UMLInternationalizationModelResource</code> class inherit from <code>InternationalizationModelResource</code> from infra plugins.
-The load is managed as 2 steps:
-# Load the file and read the content to create the <code>InternationalizationLibrary</code> with diagrams and tables labels reconciliation with existing diagrams and tables.
-# Loop on content to resolve the UML dependencies in properties files to reference the existing UML objects.
-
-So, after the load, the resolveable properties are managed as UML object, diagram or table as key of <code>InternationalizationLibrary</code>
-
-=== InternationalizationUMLItemProviderAdapterFactory ===
-The <code>InternationalizationUMLItemProviderAdapterFactory</code> extends <code>UMLItemProviderAdapterFactory</code> and allows to redefine the ItemProvider of UML elements to get the Papyrus internationalization getLabel instead of UML getLabel.
-
-If an ItemProvider of UML element needs to be redefined, the ItemProviderAdapterFactory must ihnerit from this class instead of <code>UMLItemProviderAdapterFactory</code>.
-
-=== Diagram and Table owner QualifiedName ===
-The diagrams and the tables are managed in the infra plugins, however, the owner of the diagram or table must be serialized in the properties file by its QualifiedName. So the owner QualifiedName is managed by the class <code>QualifiedNameUtils</code> and calculated manually.
-
-=== Editors ===
-The diagrams and tables are managed by the internationalization. To do this, the diagram and table editor must inherit from <code>IInternationalizationEditor</code> which allows to modify part name and refresh the editor with the label.
-If any new editor is comming with internationalization management, this one must ihnerit from <code>IInternationalizationEditor</code> too. \ No newline at end of file

Back to the top