ckeditor / ckeditor4-java-core

The development repository of CKEditor 4 for Java (core).
Other
5 stars 9 forks source link

Define code style #2

Open AnnaTomanek opened 9 years ago

AnnaTomanek commented 9 years ago

For CKEditor and JavaScript we have the code style defined.

We need to have this for the Java project, too, to be consistent and so that everyone could set one's IDE of choice in the same way and not mangle code formatting.

jswiderski commented 9 years ago

Additional things to research:

jswiderski commented 9 years ago

Code should be formatted the say way as code in CKEditor - https://github.com/ckeditor/ckeditor-boilerplate/blob/master/.jscsrc.

There will be no problem with Eclipse as its code formatting plugin is very powerful. There might be a problem with NetBeans however since Eclipse Project formatting can be exported to XML file, we could try searching for some NetBeans plugin that will use that file and apply correct formatting e.g. http://plugins.netbeans.org/plugin/50877/eclipse-code-formatter-for-java.

File with Code format will be included into _dev folder which should not be included into maven build.

jswiderski commented 9 years ago

Plugins works great but we need to mention this in documentation thus I'm leaving it open.

First of all, you need to install the plugin (can be done through Netbeans). Second need to know how to format the code. To do that, you can: