Skip to content

Commit e111ba6

Browse files
authored
Merge pull request #212 from ipa320/CodeGeneratorRos2
Add ROS 2 code generator plugin
2 parents 8278237 + 0638c08 commit e111ba6

File tree

19 files changed

+1345
-1
lines changed

19 files changed

+1345
-1
lines changed

plugins/de.fraunhofer.ipa.ros.feature/feature.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,11 @@ POSSIBILITY OF SUCH DAMAGE.
145145
id="de.fraunhofer.ipa.ros.sirius"
146146
version="3.0.0.qualifier"/>
147147

148+
<plugin
149+
id="de.fraunhofer.ipa.roscode.generator"
150+
download-size="0"
151+
install-size="0"
152+
version="3.0.0.qualifier"
153+
unpack="false"/>
154+
148155
</feature>

plugins/de.fraunhofer.ipa.ros.parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<module>../de.fraunhofer.ipa.ros2.xtext.ui</module>
3131
<module>../de.fraunhofer.ipa.ros.edit</module>
3232
<module>../de.fraunhofer.ipa.ros.editor</module>
33+
<module>../de.fraunhofer.ipa.roscode.generator</module>
3334
<!--module>../de.fraunhofer.ipa.rossystem.model.combination</module-->
3435
<!--module>../de.fraunhofer.ipa.ros.model.spec.check</module-->
35-
<!--module>../de.fraunhofer.ipa.roscode.generator</module-->
3636
<!--module>../de.fraunhofer.ipa.ros.observer.generator</module-->
3737
<!--module>../de.fraunhofer.ipa.ros.xtext.tests</module-->
3838

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="src" path="xtend-gen"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>de.fraunhofer.ipa.roscode.generator</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.ManifestBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.pde.SchemaBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
<nature>org.eclipse.pde.PluginNature</nature>
33+
</natures>
34+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=19
4+
org.eclipse.jdt.core.compiler.compliance=19
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.source=19
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: %pluginName
4+
Bundle-SymbolicName: de.fraunhofer.ipa.roscode.generator;singleton:=true
5+
Bundle-Version: 3.0.0.qualifier
6+
Bundle-Vendor: %providerName
7+
Export-Package: de.fraunhofer.ipa.roscode.generator
8+
Bundle-RequiredExecutionEnvironment: JavaSE-19
9+
Import-Package: javax.inject;version="1.0.0",
10+
org.eclipse.ui.handlers,
11+
org.eclipse.xtext.ui.resource
12+
Bundle-ActivationPolicy: lazy
13+
Bundle-Activator: de.fraunhofer.ipa.roscode.generator.Activator
14+
Require-Bundle: org.eclipse.xtext.builder,
15+
org.eclipse.xtext.ui,
16+
de.fraunhofer.ipa.ros2.xtext;bundle-version="3.0.0",
17+
de.fraunhofer.ipa.ros2.xtext.ide;bundle-version="3.0.0",
18+
de.fraunhofer.ipa.ros2.xtext.ui;bundle-version="3.0.0",
19+
de.fraunhofer.ipa.ros.xtext;bundle-version="3.0.0",
20+
de.fraunhofer.ipa.ros.xtext.ide;bundle-version="3.0.0",
21+
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="3.0.0",
22+
de.fraunhofer.ipa.ros;bundle-version="3.0.0",
23+
de.fraunhofer.ipa.ros.edit;bundle-version="3.0.0",
24+
de.fraunhofer.ipa.ros.editor;bundle-version="3.0.0"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source.. = src/,\
2+
xtend-gen/
3+
bin.includes = .,\
4+
META-INF/,\
5+
plugin.xml
6+
bin.excludes = **/*.mwe2,\
7+
**/*.xtend
8+
additional.bundles = org.eclipse.xtext.xbase,\
9+
org.eclipse.xtext.common.types,\
10+
org.eclipse.xtext.xtext.generator,\
11+
org.eclipse.emf.codegen.ecore,\
12+
org.eclipse.emf.mwe.utils,\
13+
org.eclipse.emf.mwe2.lib,\
14+
org.objectweb.asm,\
15+
org.apache.commons.logging,\
16+
org.apache.log4j,\
17+
com.ibm.icu
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<?eclipse version="3.4"?>
3+
<plugin>
4+
<!-- <extension
5+
point="org.eclipse.ui.handlers">
6+
<handler
7+
class="de.fraunhofer.ipa.roscode.generator.RosCodeGeneratorExecutableExtensionFactory:de.fraunhofer.ipa.roscode.generator.GenerationHandler"
8+
commandId="de.fraunhofer.ipa.roscode.generator.command">
9+
</handler>
10+
</extension>
11+
12+
<extension
13+
point="org.eclipse.ui.commands">
14+
<command
15+
id="de.fraunhofer.ipa.roscode.generator.command"
16+
name="Generate ROS code">
17+
</command>
18+
</extension>
19+
<extension
20+
point="org.eclipse.ui.menus">
21+
<menuContribution
22+
allPopups="false"
23+
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
24+
<command
25+
commandId="de.fraunhofer.ipa.roscode.generator.command"
26+
>
27+
<visibleWhen
28+
checkEnabled="false">
29+
<and>
30+
<with
31+
variable="selection">
32+
<count
33+
value="1">
34+
</count>
35+
</with>
36+
<iterate
37+
ifEmpty="false">
38+
<test
39+
property="org.eclipse.core.resources.extension"
40+
value="ros">
41+
</test>
42+
</iterate>
43+
</and>
44+
</visibleWhen>
45+
</command>
46+
</menuContribution>
47+
</extension>-->
48+
49+
50+
<!-- ROS2 cpp code generator for nodes -->
51+
52+
<extension
53+
point="org.eclipse.ui.handlers">
54+
<handler
55+
class="de.fraunhofer.ipa.roscode.generator.RosCodeGeneratorExecutableExtensionFactory:de.fraunhofer.ipa.roscode.generator.GenerationRos2CppHandler"
56+
commandId="de.fraunhofer.ipa.ros2cppcode.generator.command">
57+
</handler>
58+
</extension>
59+
60+
<extension
61+
point="org.eclipse.ui.commands">
62+
<command
63+
id="de.fraunhofer.ipa.ros2cppcode.generator.command"
64+
name="Generate ROS 2 Cpp code">
65+
</command>
66+
</extension>
67+
<extension
68+
point="org.eclipse.ui.menus">
69+
<menuContribution
70+
allPopups="false"
71+
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
72+
<command
73+
commandId="de.fraunhofer.ipa.ros2cppcode.generator.command"
74+
>
75+
<visibleWhen
76+
checkEnabled="false">
77+
<and>
78+
<with
79+
variable="selection">
80+
<count
81+
value="1">
82+
</count>
83+
</with>
84+
<iterate
85+
ifEmpty="false">
86+
<test
87+
property="org.eclipse.core.resources.extension"
88+
value="ros2">
89+
</test>
90+
</iterate>
91+
</and>
92+
</visibleWhen>
93+
</command>
94+
</menuContribution>
95+
</extension>
96+
97+
98+
<!-- ROS2 python code generator for nodes -->
99+
<extension
100+
point="org.eclipse.ui.handlers">
101+
<handler
102+
class="de.fraunhofer.ipa.roscode.generator.RosCodeGeneratorExecutableExtensionFactory:de.fraunhofer.ipa.roscode.generator.GenerationRos2PythonHandler"
103+
commandId="de.fraunhofer.ipa.ros2pythoncode.generator.command">
104+
</handler>
105+
</extension>
106+
107+
<extension
108+
point="org.eclipse.ui.commands">
109+
<command
110+
id="de.fraunhofer.ipa.ros2pythoncode.generator.command"
111+
name="Generate ROS 2 Python code">
112+
</command>
113+
</extension>
114+
<extension
115+
point="org.eclipse.ui.menus">
116+
<menuContribution
117+
allPopups="false"
118+
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
119+
<command
120+
commandId="de.fraunhofer.ipa.ros2pythoncode.generator.command"
121+
>
122+
<visibleWhen
123+
checkEnabled="false">
124+
<and>
125+
<with
126+
variable="selection">
127+
<count
128+
value="1">
129+
</count>
130+
</with>
131+
<iterate
132+
ifEmpty="false">
133+
<test
134+
property="org.eclipse.core.resources.extension"
135+
value="ros2">
136+
</test>
137+
</iterate>
138+
</and>
139+
</visibleWhen>
140+
</command>
141+
</menuContribution>
142+
</extension>
143+
144+
</plugin>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>de.fraunhofer.ipa.ros</groupId>
6+
<artifactId>de.fraunhofer.ipa.ros.parent</artifactId>
7+
<version>3.0.0-SNAPSHOT</version>
8+
<relativePath>../de.fraunhofer.ipa.ros.parent/pom.xml</relativePath>
9+
</parent>
10+
<artifactId>de.fraunhofer.ipa.roscode.generator</artifactId>
11+
<packaging>eclipse-plugin</packaging>
12+
13+
<build>
14+
<plugins>
15+
<plugin>
16+
<groupId>org.eclipse.xtend</groupId>
17+
<artifactId>xtend-maven-plugin</artifactId>
18+
</plugin>
19+
<plugin>
20+
<groupId>org.apache.maven.plugins</groupId>
21+
<artifactId>maven-clean-plugin</artifactId>
22+
<executions>
23+
<execution>
24+
<id>xtend-gen-clean</id>
25+
<phase>clean</phase>
26+
</execution>
27+
</executions>
28+
</plugin>
29+
</plugins>
30+
</build>
31+
</project>

0 commit comments

Comments
 (0)