Skip to content

Commit

Permalink
Fix setup issues (#893)
Browse files Browse the repository at this point in the history
* Fixes #890, #891, #892

* Cleaned

* Update pom.xml

* Cleaned
  • Loading branch information
SimonCockx authored Jan 7, 2025
1 parent 3c5751f commit 45f08d8
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ build.acceleo
.DS_Store
plugin.xml_gen
**/*.iml
.checkstyle
.classpath
rosetta-profiling/dependency-reduced-pom.xml
rosetta-profiling/reports/
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
value="com.google.inject.Inject, com.google.inject.name.Named, com.google.inject.Provider" />
</module>
</module>
<module name="BeforeExecutionExclusionFileFilter">
<!-- Exclude any generated source folders -->
<property name="fileNamePattern" value=".*-gen/.*$" />
</module>
</module>
10 changes: 10 additions & 0 deletions rosetta-ide/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-lang/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-maven-plugin/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-profiling/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-runtime/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-testing/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-tools/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
10 changes: 10 additions & 0 deletions rosetta-xcore-plugin-dependencies/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Custom" location="/com.regnosys.rosetta.parent/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Custom" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
2 changes: 1 addition & 1 deletion rosetta-xcore-plugin-dependencies/.project
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
<filteredResources>
<filter>
Expand Down

0 comments on commit 45f08d8

Please sign in to comment.