Please note that the latest supported eclipse IDE to use is Photon:
https://www.eclipse.org/smarthome/documentation/development/ide.html
Newer versions have among others problem with using the configured formatting of java.
Unfortunately the openHAB documentation lacks somewhat behind in this area.
Edit: The advice I posted is outdated so I’m striking it through to avoid people from follow the wrong advice if they find this post