• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. OpenJFX
  4. Code Style Rules

Page History

Versions Compared

Old Version 5

changes.mady.by.user Steve Northover

Saved on Oct 01, 2014

compared with

New Version 6

changes.mady.by.user Kevin Rushforth

Saved on Aug 25, 2016

  • Previous Change: Difference between versions 4 and 5
  • Next Change: Difference between versions 6 and 7
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Our guidelines are based on the Java Code Conventions, although we do not follow it strictly, except for those white-space rules that jcheck enforeces. The Java Code Conventions were drawn up at the dawn of time and are in sore need of a revision! For example 80-character line lengths was probably good advice in 1996, but in 2013 we have w-i-d-e monitors and we also like descriptive method and variable names. This leads to long lines and horrible wrapping when limited to 80 characters!.

This document captures what rules we use. Any violations of these rules should be corrected either during a code review, or when discovered. By having a single consistent set of rules that we apply throughout the codebase, we make it easier to:

...

Not everybody will like all of the code style rules, but hopefully most people will like most of them. More important, by following these rules we will have a consistent codebase with all the aforementioned benefits. This is a "living document" and will be amended as we go along. When new issues arise, we will add them to this list.

Whitespace

As mentioned above, some of the white-space rules are enforced by jcheck. The rest are conventions to which we should all strive to adhere.

Enforced by jcheck

  1. No trailing whitespace. Most (all?) IDEs can be configured to automatically trim trailing whitespace
  2. Use Spaces not Tabs.TABs.
  3. Use Unix-style (LF) line endings. No DOS-style (CR-LF) line endings.

Encouraged by Convention

  1. Use 4 space indentation
  2. Keep the single empty Use a single new-line at the end of every file
  3. Insert a space blank line between the Copyright notice and the package statement
  4. Insert a space blank line between the package statement and any import statements
  5. There should be one space blank line between the last import statement and the class documentation...
Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 140, "requestCorrelationId": "f18b5c6c36115264"}