[579604] Eliminate need for org.apache.commons.lang
diff --git a/examples/org.eclipse.ocl.examples.emf.validation.validity.ui/META-INF/MANIFEST.MF b/examples/org.eclipse.ocl.examples.emf.validation.validity.ui/META-INF/MANIFEST.MF
index 2e48702..d5673b6 100644
--- a/examples/org.eclipse.ocl.examples.emf.validation.validity.ui/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.ocl.examples.emf.validation.validity.ui/META-INF/MANIFEST.MF
@@ -18,8 +18,7 @@
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Import-Package: org.apache.commons.lang,
- org.apache.log4j;version="[1.2.15,2.0.0)"
+Import-Package: org.apache.log4j;version="[1.2.15,2.0.0)"
Export-Package: org.eclipse.ocl.examples.emf.validation.validity.ui.actions,
org.eclipse.ocl.examples.emf.validation.validity.ui.filters,
org.eclipse.ocl.examples.emf.validation.validity.ui.locator,
diff --git a/examples/org.eclipse.ocl.examples.emf.validation.validity/META-INF/MANIFEST.MF b/examples/org.eclipse.ocl.examples.emf.validation.validity/META-INF/MANIFEST.MF
index 390c4e4..ae7cdbc 100644
--- a/examples/org.eclipse.ocl.examples.emf.validation.validity/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.ocl.examples.emf.validation.validity/META-INF/MANIFEST.MF
@@ -9,6 +9,7 @@
Bundle-Activator: org.eclipse.ocl.examples.emf.validation.validity.plugin.ValidityPlugin$Implementation
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.emf.ecore;bundle-version="[2.7.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.codegen;bundle-version="[2.7.0,3.0.0)",
org.eclipse.emf.ecore.edit;bundle-version="[2.7.0,3.0.0)",
org.eclipse.ocl.pivot;bundle-version="[1.0.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -22,6 +23,5 @@
org.eclipse.ocl.examples.emf.validation.validity.util,
org.eclipse.ocl.examples.emf.validation.validity.utilities
Bundle-ActivationPolicy: lazy
-Import-Package: org.apache.commons.lang,
- org.apache.log4j;version="[1.2.15,2.0.0)"
+Import-Package: org.apache.log4j;version="[1.2.15,2.0.0)"
Automatic-Module-Name: org.eclipse.ocl.examples.emf.validation.validity
diff --git a/examples/org.eclipse.ocl.examples.emf.validation.validity/src/org/eclipse/ocl/examples/emf/validation/validity/export/HTMLExporter.java b/examples/org.eclipse.ocl.examples.emf.validation.validity/src/org/eclipse/ocl/examples/emf/validation/validity/export/HTMLExporter.java
index f3a726b..77510a1 100644
--- a/examples/org.eclipse.ocl.examples.emf.validation.validity/src/org/eclipse/ocl/examples/emf/validation/validity/export/HTMLExporter.java
+++ b/examples/org.eclipse.ocl.examples.emf.validation.validity/src/org/eclipse/ocl/examples/emf/validation/validity/export/HTMLExporter.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
- * Obeo - initial API and implementation
+ * Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.ocl.examples.emf.validation.validity.export;
@@ -16,8 +16,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-
-import org.apache.commons.lang.StringEscapeUtils;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
@@ -34,7 +33,7 @@
{
public static final @NonNull String EXPORTER_TYPE = "html";
public static final @NonNull HTMLExporter INSTANCE = new HTMLExporter();
-
+
private void appendTitlesTable(@NonNull Appendable s) throws IOException {
s.append("\t\t\t<tr>\n");
s.append("\t\t\t\t<td><b>Resource</b></td>\n");
@@ -66,15 +65,15 @@
+ "</td>\n");
}
s.append("\t\t\t\t<td>" + severity + "</td>\n");
- s.append("\t\t\t\t<td>" + StringEscapeUtils.escapeHtml(getMessage(node.getWorstResult())) + "</td>\n");
+ s.append("\t\t\t\t<td>" + CodeGenUtil.xmlEscapeEncode(getMessage(node.getWorstResult())) + "</td>\n");
s.append("\t\t\t</tr>\n");
}
-
+
/**
* Returns a stream containing the initial contents to be given to new
* exported validation results file resource instances.
- *
- * @throws IOException
+ *
+ * @throws IOException
*/
@Override
public void createContents(@NonNull Appendable html, @NonNull RootNode rootNode, @Nullable String exportedFileName) throws IOException {
@@ -133,12 +132,12 @@
html.append("\t\t\t\t<td><b>Number of Success: </b></td>\n");
html.append("\t\t\t\t<td>" + validationSuccess.size() + "</td>\n");
html.append("\t\t\t</tr>\n");
-
+
html.append("\t\t\t<tr>\n");
html.append("\t\t\t\t<td><b>Number of Infos: </b></td>\n");
html.append("\t\t\t\t<td>" + validationInfos.size() + "</td>\n");
html.append("\t\t\t</tr>\n");
-
+
html.append("\t\t\t<tr>\n");
html.append("\t\t\t\t<td><b>Number of Warnings: </b></td>\n");
html.append("\t\t\t\t<td>" + validationWarnings.size() + "</td>\n");
@@ -148,7 +147,7 @@
html.append("\t\t\t\t<td><b>Number of Errors: </b></td>\n");
html.append("\t\t\t\t<td>" + validationErrors.size() + "</td>\n");
html.append("\t\t\t</tr>\n");
-
+
html.append("\t\t\t<tr>\n");
html.append("\t\t\t\t<td><b>Number of Failures: </b></td>\n");
html.append("\t\t\t\t<td>" + validationFailures.size() + "</td>\n");
@@ -215,7 +214,8 @@
html.append("</body>\n");
html.append("</html>\n");
}
-
+
+ @Override
public @NonNull String getExporterType() { return EXPORTER_TYPE; }
@Override
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.ocl.examples.xtext.tests/META-INF/MANIFEST.MF
index be2ac69..ed6ca03 100644
--- a/tests/org.eclipse.ocl.examples.xtext.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/META-INF/MANIFEST.MF
@@ -75,7 +75,6 @@
org.eclipse.ocl.examples.xtext.tests.noreflectioncompany.util,
org.eclipse.ocl.examples.xtext.tests.noreflectioncompany.validation
Import-Package: com.google.common.collect,
- org.apache.commons.lang,
org.apache.log4j;version="[1.2.15,2.0.0)",
org.apache.log4j.spi;version="[1.2.15,2.0.0)",
org.eclipse.xtext.xbase.lib;bundle-version="[2.9.0,3.0.0)",