Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2015-08-20 08:09:08 +0000
committerMaxime Porhel2015-08-20 12:18:24 +0000
commit97dc40a25e3b6663f2f301bf3418865f56fd10e7 (patch)
tree603b168b76cbe80de9ab808573b852d350d2717b
parent275e24d3fc927cb4ddf2ae485be41c29af19c980 (diff)
downloadorg.eclipse.sirius-97dc40a25e3b6663f2f301bf3418865f56fd10e7.tar.gz
org.eclipse.sirius-97dc40a25e3b6663f2f301bf3418865f56fd10e7.tar.xz
org.eclipse.sirius-97dc40a25e3b6663f2f301bf3418865f56fd10e7.zip
[472057] Externalize translatable strings from org.eclipse.sirius.synchronizer
Bug: 472057 Change-Id: Id6fa0091f2a5e52682a06bf4ea7640b3c56e1a58 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html3
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile1
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/plugin.properties2
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/ModelToModelSynchronizer.java6
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/Messages.java36
7 files changed, 47 insertions, 5 deletions
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index a23bcb1abc..bf38750ba3 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -233,6 +233,9 @@
<li>
<code>org.eclipse.sirius.ecore.extender</code>
</li>
+ <li>
+ <code>org.eclipse.sirius.synchronizer</code>
+ </li>
</ul>
</li>
</ul>
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index 904654a2aa..6ba4814776 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -51,6 +51,7 @@ Additional non-breaking changes:
* <span class="label label-success">Added</span> The translation keys (and default values) have been added to all the concerned bundles, in their @plugin.properties@ file. These (translated) messages are available at runtime as static fields of new @Messages@ classes, added to all concerned bundles (always in the same package as their plug-in/activator class). The concerned bundles are:
** @org.eclipse.sirius.ext.base@
** @org.eclipse.sirius.ecore.extender@
+** @org.eclipse.sirius.synchronizer@
h4. Changes in @org.eclipse.sirius.ext.gef@
diff --git a/plugins/org.eclipse.sirius.synchronizer/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.synchronizer/.settings/org.eclipse.jdt.core.prefs
index fc8c7f3ddc..39e1d0d4d4 100644
--- a/plugins/org.eclipse.sirius.synchronizer/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.sirius.synchronizer/.settings/org.eclipse.jdt.core.prefs
@@ -32,7 +32,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
diff --git a/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
index 77972102b6..d2db807d3b 100644
--- a/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
@@ -11,6 +11,6 @@ Export-Package: org.eclipse.sirius.synchronizer;version="3.0.0",
Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.8.3",
com.google.guava;bundle-version="[11.0.2,16.0)"
Import-Package: org.eclipse.core.runtime;version="3.4.0",
- org.eclipse.sirius.ext.base;version="2.0.0"
+ org.eclipse.sirius.ext.base;version="2.1.0"
Bundle-Activator: org.eclipse.sirius.synchronizer.internal.SynchronizerPlugin$Implementation
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.synchronizer/plugin.properties b/plugins/org.eclipse.sirius.synchronizer/plugin.properties
index 4fd8131576..08e15785e5 100644
--- a/plugins/org.eclipse.sirius.synchronizer/plugin.properties
+++ b/plugins/org.eclipse.sirius.synchronizer/plugin.properties
@@ -10,3 +10,5 @@
# ====================================================================
pluginName = Sirius Model Synchronizer
providerName = Eclipse Modeling Project
+
+ModelToModelSynchronizer_synchronizationTask=Synchronization
diff --git a/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/ModelToModelSynchronizer.java b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/ModelToModelSynchronizer.java
index 765d929c2a..948874a00a 100644
--- a/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/ModelToModelSynchronizer.java
+++ b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/ModelToModelSynchronizer.java
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.sirius.synchronizer.internal.Messages;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@@ -39,7 +40,6 @@ public class ModelToModelSynchronizer {
private SignatureProvider signatureProvider;
public ModelToModelSynchronizer(SemanticPartitionInvalidator evaluator, MappingHiearchyTable table, PreRefreshStatus pre, SignatureProvider signProvider) {
- super();
this.evaluator = evaluator;
this.table = table;
this.pre = pre;
@@ -64,7 +64,7 @@ public class ModelToModelSynchronizer {
if (childSupport.some()) {
nbSteps += descriptorsToCreate.size() * 2 + descriptorsToDelete.size() + descriptorsToRefresh.size();
}
- monitor.beginTask("Synchronization", nbSteps);
+ monitor.beginTask(Messages.ModelToModelSynchronizer_synchronizationTask, nbSteps);
if (childSupport.some()) {
ChildCreationSupport containerChildSupport = childSupport.get();
for (CreatedOutput outDesc : descriptorsToDelete) {
@@ -115,7 +115,7 @@ public class ModelToModelSynchronizer {
monitor.worked(1);
}
} else {
- monitor.beginTask("Synchronization", 1);
+ monitor.beginTask(Messages.ModelToModelSynchronizer_synchronizationTask, 1);
if (childSupport.some()) {
EObject createdElement = container.getCreatedElement();
if (createdElement != null && descriptorsToRefresh.isEmpty() && !descriptorsToCreate.isEmpty()) {
diff --git a/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/Messages.java b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/Messages.java
new file mode 100644
index 0000000000..4e6b63aa22
--- /dev/null
+++ b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/Messages.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.synchronizer.internal;
+
+import org.eclipse.sirius.ext.base.I18N;
+import org.eclipse.sirius.ext.base.I18N.TranslatableMessage;
+
+/**
+ * Helper class to obtains translated strings.
+ *
+ * @author pcdavid
+ */
+public final class Messages {
+
+ static {
+ I18N.initializeMessages(Messages.class, SynchronizerPlugin.INSTANCE);
+ }
+
+ // CHECKSTYLE:OFF
+ @TranslatableMessage
+ public static String ModelToModelSynchronizer_synchronizationTask;
+
+ // CHECKSTYLE:ON
+
+ private Messages() {
+ // Prevents instanciation.
+ }
+}

Back to the top