|
|
## Create standard Xtext Project.
|
|
|
|
|
|
1. File -> New -> Project... -> Xtext -> XText Project
|
|
|
2. Choose the name, in this tutorial we use the default name proposed automatically by the XText wizard.
|
|
|
2. Set the name as it is proposed automatically by the wizard.
|
|
|
3. Set Java 11 as Execution Environment.
|
|
|
4. Click next.
|
|
|
5. Preferred Build System must be Maven, Build Language Server can be set to None, since it is not in the scope of this tutorial.
|
... | ... | @@ -9,18 +9,18 @@ |
|
|
7. (Optional)Unfold `org.xtext.example.mydsl.parent` project in the project explorer. It contains several children with the prefix `org.xtext.example.mydsl`. This step is not necessary
|
|
|
if your project explorer uses flat Project Presentation.
|
|
|
9. In `org.xtext.example.mydsl.target` open the `org.xtext.example.mydsl.target.target`.
|
|
|
10. Click reload. Wait until the count of plugins is not shown near each location website.
|
|
|
10. Click reload. Wait until the count of plugins is shown near each location website.
|
|
|
10. Select `https://download.eclipse.org/releases/2022-03 606` and click `Edit`tab.
|
|
|
11. Uncheck `Group by category`. Search for `Eclipse Platform Launcher Executables`and select the found entry. Click `Finish`. Do not forget to save the changes.
|
|
|
|
|
|
|
|
|
## Create Empty Plugin-Project.
|
|
|
## ConfigurePlugin-Project.
|
|
|
|
|
|
1. File -> New -> Project... -> Plugin Development -> Plugin Project
|
|
|
2. Set name to your.prefix.cli (in this tutorial org.xtext.example.mydsl.cli).
|
|
|
2. Set name to org.xtext.example.mydsl.cli .
|
|
|
3. Uncheck `This Project will make contributions to the UI` and set `Create a rich client application` to `yes`
|
|
|
4. Click next.
|
|
|
5. Choose `Headles Hello RCP` template and click `finish`
|
|
|
5. Choose `Headles Hello RCP` template and click `finish`.
|
|
|
6. Create a pom.xml with the following content.
|
|
|
|
|
|
|
... | ... | @@ -39,14 +39,14 @@ if your project explorer uses flat Project Presentation. |
|
|
</project>
|
|
|
|
|
|
```
|
|
|
## Create empty project.
|
|
|
## Configure product project.
|
|
|
1. File -> New -> Other -> General -> Project
|
|
|
2 Set project name to project.prefix.product (in this tutorial: org.xtext.example.mydsl.product).
|
|
|
2. Now we need to create a product file. Right click on the project -> New -> Other -> Plugin Development-> Product Configuration
|
|
|
3. In the wizard select, `Create a configuration file with basic settings `
|
|
|
4. Set file name to org.xtext.example.mydsl.product
|
|
|
5. Click Finish
|
|
|
6. Create pom with the content shown below
|
|
|
2 Set project name to org.xtext.example.mydsl.product.
|
|
|
3. Create a product file. Right click on the project -> New -> Other -> Plugin Development-> Product Configuration
|
|
|
4. In the wizard select, `Create a configuration file with basic settings `
|
|
|
5. Set file name to org.xtext.example.mydsl.product
|
|
|
6. Click Finish
|
|
|
7. Create pom with the following content.
|
|
|
|
|
|
```
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
... | ... | @@ -103,7 +103,7 @@ if your project explorer uses flat Project Presentation. |
|
|
</project>
|
|
|
|
|
|
```
|
|
|
7. Create META-INF folder and put MANIFEST.MF with this content into it.
|
|
|
7. Create META-INF folder and put MANIFEST.MF with the following content.
|
|
|
|
|
|
```
|
|
|
Manifest-Version: 1.0
|
... | ... | @@ -117,12 +117,12 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11 |
|
|
|
|
|
```
|
|
|
|
|
|
## Make Plugin project and product project children of parent
|
|
|
## Make Plugin and Product projects children of the org.xtext.example.mydsl.parent
|
|
|
1. Remove all projects from the Eclipse (do not delete the on disk!) and close it.
|
|
|
2. Navigate to the directory of your eclipse workspace.
|
|
|
3. Put the folders asociated with the plugin and product projects inside the parent folder of the XText project.
|
|
|
4. Open the parent folder and edit the pom file inside. You must add the plugin project to the list of the modules of the XText child projects:
|
|
|
|
|
|
3. Put the folders associated with the plugin and product projects inside the parent folder of the XText project.
|
|
|
4. Open the parent folder and edit the pom file inside. You must add the plugin project to the list of the modules of the XText child projects.
|
|
|
In the pom.xml you must find where all children modules are listed and add the plugin and product projects to the list.
|
|
|
```
|
|
|
<modules>
|
|
|
<module>org.xtext.example.mydsl</module>
|
... | ... | @@ -138,4 +138,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11 |
|
|
```
|
|
|
|
|
|
5. Start eclipse and import the XText project as Maven project.
|
|
|
You should see in the project explorer that the plugin and prodct projects are now seen as children of org.xtext.example.mydsl.parent project. |
|
|
You should see in the project explorer that the plugin and product projects are now seen as children of org.xtext.example.mydsl.parent project. |