Community
Participate
Working Groups
Build Identifier: I20090611-1540 There is a family of "ToolFactory.create*CodeFormatter()" methods, part of which claim to honor the extension point "org.eclipse.jdt.core.codeFormatter", but the only one of them that does is "createCodeFormatter()", which is never called. Thus it is impossible to register a custom code formatter. It seems like the bugs has been there for ages - has no one ever tried to use that extension point? The fix seems obvious... Reproducible: Always Steps to Reproduce: 1. Register a custom code formatter 2. Hit Ctrl+Shift+F 3. Custom code formatter is NOT invoked (not even instantiated)
To be precise, it is source file line 169: return new DefaultCodeFormatter(currentOptions);
This extension point is deprecated as it must be defined through a deprecated interface. What you really want is a new extension point that would reflect the new way to instantiate a code formatter. This is an enhancement for 3.7.
I'm not sure if it makes sense to support "pluggable" code formatters. We have a lot of references to DefaultCodeFormatterConstants and make assumptions about how the formatter works, so I doubt you would get happy with just an extension point.
I agree with Markus. We should clarify the Javadoc and mark the extension point deprecated.
Created attachment 165534 [details] Fix Please mark the codeFormatter.exsd file as ASCII (Team > Change ASCII/Binary Property...).
Released for 3.6M7. Thanks for the patch.
Verified for 3.6M7 through code inspection
Verified.