Eclipse Configuration HowTo¶
We have issues with removing trailing spaces at Eclipse. Eclipse adds spaces between methods. Since we cannot fix this issue, we either ask you to use IntelliJ or to review each commit not to include unnecessary spaces.
This howto is based on [Eclipse IDE for Java EE Developers]. First of all, generate a war to have all dependencies fetched by maven.
Recommended plugins¶
AnyEdit for ensuring that tabs are always used
Configure: Window -> Preferences -> General / Editors / AnyEdit Tools -> “Auto - Convert EXCLUSION file list” -> “Add filter” -> “*.java”, “Convert…”: 4 spaces for a tab
Optional plugins¶
Make Winery projects known to Eclipse¶
Import all projects
Use “Existing Maven Projects”.
mvn eclips:m2eclipse
currently does not enable “maven” in eclipse.
At
org.eclipse.winery.repository
andorg.eclipse.winery.topologymodeler
:Right click -> Properties -> JavaScript -> Include Path -> Source -> Expand folder -> Select “Excluded” -> “Edit…”
Exclusion Patterns: Add multiple -> Select “3rd party” -> “OK”
Exclusion Patterns: Add multiple -> Select “components” -> “OK”
“Finish” -> “OK”
Setup Tomcat¶
Open servers window: Window -> Show View -> Other -> Server -> Servers
New server wizard… -> Apache -> Tomcat v7.0 Server -> Next -> Winery -> Add -> Finish
Rename the Server to “Apache Tomcat v7.0”
Now you can see the Tomcat v7.0 Server at localhost [Stopped, Republish] in your server window. Select it and click on the green play button in the window.
Now, Winery can be viewed at http://localhost:8080/winery-ui/
Setup Code Style¶
Java -> Code Style -> Clean Up: cleanup.xml Formatter -> formatter_settings.xml Code Templates: codetemplates.xml
Java -> Editor -> Templates: java_editor_templates.xml
Save Actions: follow eclipse_save_actions*.png:
Further hints¶
The repository location can be changed:
Copy winery.properties
to path-to-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\winery
.