diff options
author | Juergen Haug | 2013-03-05 14:27:38 +0000 |
---|---|---|
committer | Juergen Haug | 2013-03-06 15:04:46 +0000 |
commit | 42bb0d6e52a14fd586bac0cf85ad8c611e6e3f23 (patch) | |
tree | 2352fa3b78e5e72969a52696b5a5450034d2d40f /plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap | |
parent | 91fe7f5032f5bc365ac0530d53d67567ce932174 (diff) | |
download | org.eclipse.etrice-42bb0d6e52a14fd586bac0cf85ad8c611e6e3f23.tar.gz org.eclipse.etrice-42bb0d6e52a14fd586bac0cf85ad8c611e6e3f23.tar.xz org.eclipse.etrice-42bb0d6e52a14fd586bac0cf85ad8c611e6e3f23.zip |
[core] (Bug 398876) add documentation to Xtext generated meta
models activated xtend2 support
Change-Id: I448bc6724c3a8a6b3ba325486e1fb01b1d5f0597
Diffstat (limited to 'plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap')
3 files changed, 76 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/ETMapPostprocessor.ext b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/ETMapPostprocessor.ext new file mode 100644 index 000000000..65d3e6a2e --- /dev/null +++ b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/ETMapPostprocessor.ext @@ -0,0 +1,17 @@ +/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+import xtext;
+
+process(GeneratedMetamodel this) :
+ JAVA org.eclipse.etrice.core.etmap.postprocessing.PostprocessorController.process(org.eclipse.xtext.GeneratedMetamodel)
+;
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend new file mode 100644 index 000000000..420f9f33b --- /dev/null +++ b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend @@ -0,0 +1,37 @@ +/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.etmap.postprocessing
+
+import org.eclipse.xtext.GeneratedMetamodel
+
+import static extension org.eclipse.emf.ecore.util.EcoreUtil.*
+import static extension org.eclipse.etrice.core.postprocessing.PostprocessingHelpers.*
+
+class DocuPostprocessor {
+
+ def process(GeneratedMetamodel metamodel) {
+// var pckg = metamodel.EPackage
+//
+// var mdl = pckg.getClass("MappingModel")
+// mdl.setDocumentation(
+// '''
+// <br>
+// ''')
+//
+// mdl.getAttribute("name").setDocumentation(
+// '''
+// <br>
+// ''')
+ }
+
+}
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/PostprocessorController.java b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/PostprocessorController.java new file mode 100644 index 000000000..c7325df85 --- /dev/null +++ b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/PostprocessorController.java @@ -0,0 +1,22 @@ +/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.etmap.postprocessing;
+
+import org.eclipse.xtext.GeneratedMetamodel;
+
+public class PostprocessorController {
+
+ public static void process(GeneratedMetamodel metamodel){
+ new DocuPostprocessor().process(metamodel);
+ }
+}
|