NetBeans plugin which integrates the eclipse code formatter
Java HTML Batchfile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
nbproject
release/modules/ext
src
test
.gitignore
Eclipse Public License - Version 1.0.htm
README.md
build.xml
manifest.mf

README.md

Donate

Eclipse Java Code Formatter for NetBeans

Download is available

This plugin helps you to apply to a common code style in a team of Eclipse JDT and NetBeans IDE users. The original formatting engine of Eclipse is embedded and allows you to format the sourcecode the same way as your Eclipse co-workers do. You only have to provide an Eclipse formatter configuration file.

Known issue: When the Eclipse formatter is used the line-breakpoints at the formatted lines are lost. Class/Method/Field breakpoints will be preserved.

Features:

  • Global configuration and project specific configuration
  • On save action (Disabled by default)
  • Shows the used formatter as notification (Enabled by default)
  • Supports profiles (since 1.6)
  • Supports format of selected text (since 1.7)
  • Preserve breakpoints (experimental) (since 1.8)
  • Code templates for @formatter:on/off (since 1.9)
  • Supports Workspace Mechanic configuration file (since 1.10)
  • Support configuration from .settings/org.eclipse.jdt.core.prefs (absolute and relative paths) (since 1.10)
  • On save action: Introduced option for formatting only the changed lines (since 1.10)
  • Support configuration of linefeed (since 1.10)
  • Support configuration of source level (since 1.10)
  • Support for macro invocation (since 1.12)


Updates in 1.12.1.46 - 4.6 Fork:

  • [Feature 84]: Provide support for Eclipse Neon 4.6 1a
  • [Bugfix 88]: Fixed: Keyboard shortcut does not format non java files

Updates in 1.12.0:

  • [Feature 86]: Allow action to be invoked via macro

Updates in 1.11.0:

  • [Feature 78]: Support formatting using Eclipse 4.5.2 Mars.2
  • [Bugfix 74]: Fixed: Minor UI issues in options dialog
  • [Bugfix 80]: Fixed: Prevent "URI is not hierarchical" exception
  • [Bugfix 77]: Fixed: Exception, when using third-party Java code formatter in configuation file

Updates in 1.10.2:

  • [Feature 61]: Support Workspace Mechanic configuration file (*.epf)
  • [Feature 67]: Support configuration via /.settings/org.eclipse.jdt.core.prefs or absolute path to org.eclipse.jdt.core.prefs
  • [Feature 68]: Reduce download size by 77% by repacking jars with pack200
  • [Feature 70]: On save action: Introduced option for formatting only the changed lines
  • [Feature 71]: Support configuration of linefeed
  • [Feature 23]: Support configuration of source level
  • [Feature 37]: Fallback to NB formatter, if file isn't a java file
  • [Bugfix 73]: Selection in undocked windows is not respected, when called via keyboard

Updates in 1.9:

Updates in 1.8.0.6:

  • [Bugfix 57]: Fixed: java.lang.IllegalArgumentException: bad position and run parts in EDT
  • [Bugfix 4]: Fixed: option panel isn't found by searching for "eclipse"

Updates in 1.8.0.5:

  • [Bugfix 56]: Fixed: Format on Save - Changed files remain modified after saving them in Java Editor
  • [Bugfix 55]: Fixed: "URI is not hierarchical" error message on calling format - add logging for this error

Updates in 1.8.0.4:

  • [Feature 47]: Preserve Class/Method/Field breakpoints (experimental, can be disabled in options)
  • [Bugfix 53]: Fixed: Do not remove linebreakpoint, if line is not included in selection
  • [Bugfix 52]: Fixed: Cannot assign shortcut for "Format with Eclipse Formatter" action
  • [Task 46]: Update to use eclipse formatter libs from eclipse 4.4
  • [Task 48]: Support only NetBeans 7.4 and above
  • [Task 49]: Add donation button
  • [Task 50]: Add link to github/homepage

Updates in 1.7.1:

  • [Bugfix 41]: Fixed: NPE when configuration file not found

Updates in 1.7:

Updates in 1.6.1:

  • [Bugfix 34]: Fixed: NPE while saving options when no profile is set

Updates in 1.6:

  • [Task 30]: Update to Eclipse formatter jars from Eclipse Kepler 4.3
  • [Feature 31]: First profile in file is always used - support selection of profile
  • [Feature 21]: Project specific options: Show link to global options

Updates in 1.5:

  • [Bugfix 18]: Fixed: Formatting with eclipse formatter introduces empty document in undo manager
  • [Task 27]: Provide a signed package for the PPUC

Updates in 1.4.1:

  • [Bugfix 25]: Fixed: Configured formatter.xml isn't used

Updates in 1.4:

Note:

Please note that this plugin only provides support for formatting. Eclipse users may miss the application of save-actions like "adding @Override annotations" or "member sort order". Such AST-based transformations are not provided by this plugin. The plugin also won't format source code with guarded sections - like the Java sources generated by the NetBeans GUI builder.

Licensing

Provide defects, request for enhancements and feedback at https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues

Compatible to NetBeans 8.0.2+ and JDK7+.

btn_donate_SM.gif