Skip to main content

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

+1. This was long debated within JDT parties. Without this fix, the
potential ripple of the new options of the contract change is fairly
troublesome.
Beyond that, the new API allows to be built upon in the future, where more
formatting options may start reusing information available in formatted
source (e.g. line separators).



                                                                           
             Olivier Thomann                                               
             <Olivier_Thomann@                                             
             ca.ibm.com>                                                To 
             Sent by:                  eclipse-pmc@xxxxxxxxxxx             
             eclipse-pmc-bounc                                          cc 
             es@xxxxxxxxxxx                                                
                                                                   Subject 
                                       [eclipse-pmc] API approval: new     
             05/22/2007 07:37          method + new constant on            
             PM                        ToolFactory                         
                                                                           
                                                                           
             Please respond to                                             
             eclipse-pmc@eclip                                             
                  se.org                                                   
                                                                           
                                                                           




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
_______________________________________________
eclipse-pmc mailing list
eclipse-pmc@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipse-pmc




Back to the top