Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-pmc] API approval: new method + new constant on ToolFactory

Request to approve new API that prevents existing code generators (like 
EMF, AST Rewrite, templates) from being potentially broken by the two new 
code formatter options:
org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN
org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN

GOALS/BENEFITS:

These two options might have bad side effects on existing code generators. 
The generated code might looks awkwards when the new options are enabled.
The bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185928 described the 
issue. See comment 1 
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=185928#c1).
The patch consists in three parts:
- preserving the old behavior (the old API is calling the new one with all 
bits off)
- disabling the new options by default
- adding the new API + new constant to enable the new options

CORRESPONDING BUG(S): 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=185928

RISKS:

None. The old API would ignore the new options and therefore align with 
what used to be done. The usage of the new API will allow third parties to 
decide if they want to enable the new options or not.

PERFORMANCE IMPACTS:

No performance impact.

Olivier


Back to the top