diff --git a/.gitignore b/.gitignore index 5c71c9b05..13b94d1d7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ build.acceleo .DS_Store plugin.xml_gen **/*.iml -.checkstyle .classpath rosetta-profiling/dependency-reduced-pom.xml rosetta-profiling/reports/ diff --git a/README.md b/README.md index 820742253..0f3c7d44d 100644 --- a/README.md +++ b/README.md @@ -77,18 +77,22 @@ To build the project, run `mvn clean install`. ### 2. Setting things up in Eclipse #### Install Eclipse IDE for Java and DSL Developers -Install the latest version of the "Eclipse IDE for Java and DSL Developers" using the [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer). +Install version `2022-06` of the "Eclipse IDE for Java and DSL Developers" using the [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer). Make sure to install version `2022-06`! Later versions dropped support for Java 8 Xtend files, which we need. You might have to enable "Advanced Mode" in the settings of the Eclipse Installer to install a specific version. + +#### Configure Eclipse with the right version of Java +Xtend files cannot be build with any Java version later than 17. In Eclipse, go to Settings... > Java > Installed JREs and make sure the checked JRE points to a Java version of 17. #### Install the Checkstyle plugin We use [Checkstyle](https://checkstyle.sourceforge.io/) for enforcing good coding practices. The Eclipse plugin for Checkstyle can be found here: [https://checkstyle.org/eclipse-cs/#!/](https://checkstyle.org/eclipse-cs/#!/). -#### Setup the project -1. **Open the project in Eclipse**: File > Open Projects from File System..., select the right folder, click Finish. -2. **Update Maven dependencies**: right click on the `com.regnosys.rosetta.parent` project > Maven > Update project... and finish. +#### Open the project in Eclipse +Go to Import... > Existing Maven Project, select the right folder, click Finish. ##### Troubleshooting Make sure you have successfully run `mvn clean install`. (see section 1 of this guide) +If there is any `bin` folders in the root of any submodule, delete it. These folders might be generated if the project is not configured correctly as a Maven project. + If you're seeing 1000+ errors in the "Problems" window of Eclipse, try the following. 1. Disable auto-building. (Project > Build automatically) 2. Close Eclipse and open it again. diff --git a/checkstyle.xml b/checkstyle.xml index fd5f8f2f9..36f220adb 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -25,4 +25,8 @@ value="com.google.inject.Inject, com.google.inject.name.Named, com.google.inject.Provider" /> + + + + diff --git a/rosetta-ide/.checkstyle b/rosetta-ide/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-ide/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-lang/.checkstyle b/rosetta-lang/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-lang/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-maven-plugin/.checkstyle b/rosetta-maven-plugin/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-maven-plugin/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-profiling/.checkstyle b/rosetta-profiling/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-profiling/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-runtime/.checkstyle b/rosetta-runtime/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-runtime/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-testing/.checkstyle b/rosetta-testing/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-testing/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-tools/.checkstyle b/rosetta-tools/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-tools/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-xcore-plugin-dependencies/.checkstyle b/rosetta-xcore-plugin-dependencies/.checkstyle new file mode 100644 index 000000000..5af5eb6e9 --- /dev/null +++ b/rosetta-xcore-plugin-dependencies/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/rosetta-xcore-plugin-dependencies/.project b/rosetta-xcore-plugin-dependencies/.project index 7cb4c6b41..2a768ce16 100644 --- a/rosetta-xcore-plugin-dependencies/.project +++ b/rosetta-xcore-plugin-dependencies/.project @@ -29,8 +29,8 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature - net.sf.eclipsecs.core.CheckstyleNature org.eclipse.xtext.ui.shared.xtextNature + net.sf.eclipsecs.core.CheckstyleNature