Changes
Page history
Update Building Headless RCP XText Application: Part II
authored
May 09, 2022
by
Serafim Simonov
Show whitespace changes
Inline
Side-by-side
Building-Headless-RCP-XText-Application:-Part-II.md
View page @
804c0c29
# Create Your simple plugin.
# Create Your simple plugin.
1.
Create class
`MyGenerator`
in
`org.xtext.example.mydsl.cli`
1.
Open pluginx.xml in org.xtext.example.mydsl.cli
2.
Switch to Dependencies
3.
Add following required plugins:
-
org.eclipse.core.runtime
-
org.eclipse.emf.ecore
-
org.eclipse.xtext
-
org.xtext.example.mydsl
4.
Add following imported packages:
-
com.google.inject,
5.
Create class
`MyGenerator`
in
`org.xtext.example.mydsl.cli`
```
Java
```
Java
...
@@ -69,7 +81,7 @@ public class MyGenerator {
...
@@ -69,7 +81,7 @@ public class MyGenerator {
```
```
2
.
Change the implementaiton of the Application class like shown below.
6
.
Change the implementaiton of the Application class like shown below.
```
Java
```
Java
package org.xtext.example.mydsl.cli;
package org.xtext.example.mydsl.cli;
...
@@ -129,12 +141,18 @@ public class Application implements IApplication {
...
@@ -129,12 +141,18 @@ public class Application implements IApplication {
## Configure product
## Configure product
1.
Open org.xtext.example.mydsl.product
1.
Open org.xtext.example.mydsl.product
2.
Chose Contents tab
2.
In overview fill out Version and Name field.
3.
Add
`org.xtext.example.mydsl.cli`
3.
In product definition:
4.
Click add requiered.
-
`new`
5.
Add javax.annotations plugin if it is not in the list.
-
`Defining Plu-In`
: org.xtext.example.mydsl.product
6.
Select
`Configuration`
tab
-
`Application`
: org.xtext.example.mydsl.cli.application
7.
Click
`Add Recommended`
in
`Start Levels`
menu
-
Click finish
4.
Chose Contents tab
5.
Add
`org.xtext.example.mydsl.cli`
6.
Click add requiered.
7.
Add javax.annotations plugin if it is not in the list.
8.
Select
`Configuration`
tab
9.
Click
`Add Recommended`
in
`Start Levels`
menu
Run -Dmaven.repo.local=.m2/repository package
Run -Dmaven.repo.local=.m2/repository package