Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 64641 Details for
Bug 177796
[preferences] Add new options to 'code formatter' to expose constant from bug 20793
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_177796.txt (text/plain), 6.92 KB, created by
Olivier Thomann
on 2007-04-23 14:37:16 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-04-23 14:37:16 EDT
Size:
6.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java,v >retrieving revision 1.19 >diff -u -r1.19 FormatterMessages.java >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java 16 Apr 2007 08:54:09 -0000 1.19 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java 23 Apr 2007 18:36:36 -0000 >@@ -359,7 +359,10 @@ > public static String CommentsTabPage_new_line_after_param_tags; > public static String CommentsTabPage_group3_title; > public static String CommentsTabPage_group4_title; >+ public static String CommentsTabPage_group5_title; > public static String CommentsTabPage_line_width; >+ public static String CommentsTabPage_never_indent_block_comments_on_first_column; >+ public static String CommentsTabPage_never_indent_line_comments_on_first_column; > public static String ControlStatementsTabPage_preview_header; > public static String ControlStatementsTabPage_general_group_title; > public static String ControlStatementsTabPage_general_group_insert_new_line_before_else_statements; >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties,v >retrieving revision 1.68 >diff -u -r1.68 FormatterMessages.properties >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties 16 Apr 2007 08:54:09 -0000 1.68 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties 23 Apr 2007 18:36:36 -0000 >@@ -405,6 +405,10 @@ > > CommentsTabPage_group4_title=Block comment settings > >+CommentsTabPage_group5_title=Indentation settings >+CommentsTabPage_never_indent_block_comments_on_first_column=Never indent block comment on first column >+CommentsTabPage_never_indent_line_comments_on_first_column=Never indent line comment on first column >+ > ControlStatementsTabPage_preview_header=If...else > ControlStatementsTabPage_general_group_title=General > ControlStatementsTabPage_general_group_insert_new_line_before_else_statements=Insert new line before '&else' in an 'if' statement >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java,v >retrieving revision 1.20 >diff -u -r1.20 CommentsTabPage.java >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java 16 Apr 2007 08:54:09 -0000 1.20 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java 23 Apr 2007 18:36:36 -0000 >@@ -109,7 +109,15 @@ > "/**\n" + //$NON-NLS-1$ > " * This is the comment for the example interface.\n" + //$NON-NLS-1$ > " */\n" + //$NON-NLS-1$ >- " interface Example {" + //$NON-NLS-1$ >+ " interface Example {\n" + //$NON-NLS-1$ >+ "// This is a long comment that should be split in multiple line comments in case the line comment formatting is enabled\n" + //$NON-NLS-1$ >+ "int foo3();\n" + //$NON-NLS-1$ >+ "/*\n" + //$NON-NLS-1$ >+ "*\n" + //$NON-NLS-1$ >+ "* These possibilities include:\n" + //$NON-NLS-1$ >+ "* <ul><li>Formatting of header comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + //$NON-NLS-1$ >+ "*/\n" + //$NON-NLS-1$ >+ "int foo4();\n" + //$NON-NLS-1$ > " /**\n" + //$NON-NLS-1$ > " *\n" + //$NON-NLS-1$ > " * These possibilities include:\n" + //$NON-NLS-1$ >@@ -133,7 +141,7 @@ > " * @param b The second parameter.\n" + //$NON-NLS-1$ > " * @return The result of the foo operation, usually within 0 and 1000.\n" + //$NON-NLS-1$ > " */" + //$NON-NLS-1$ >- " int foo(int a, int b);" + //$NON-NLS-1$ >+ " int foo(int a, int b);\n" + //$NON-NLS-1$ > "}"; //$NON-NLS-1$ > > private CompilationUnitPreview fPreview; >@@ -162,13 +170,21 @@ > final CheckboxPreference nlParam= createPrefInsert(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_new_line_after_param_tags, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INSERT_NEW_LINE_FOR_PARAMETER); > final CheckboxPreference blankLinesJavadoc= createPrefTrueFalse(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_clear_blank_lines, DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT); > >- // javadoc and block comment settings >+ // block comment settings > final Group blockSettingsGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group4_title); > final CheckboxPreference blankLinesBlock= createPrefTrueFalse(blockSettingsGroup, numColumns, FormatterMessages.CommentsTabPage_remove_blank_block_comment_lines, DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT); > >- final Group widthGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group3_title); >+ final Group widthGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group3_title); > final NumberPreference lineWidth= createNumberPref(widthGroup, numColumns, FormatterMessages.CommentsTabPage_line_width, DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_LENGTH, 0, 9999); > >+ // Indentation comment settings >+ final Group indentationSettingsGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group5_title); >+ >+ // indentation for block comment >+ createPrefTrueFalse(indentationSettingsGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_block_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN); >+ // indentation for line comment >+ createPrefTrueFalse(indentationSettingsGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_line_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN); >+ > ArrayList javaDocMaster= new ArrayList(); > javaDocMaster.add(javadoc); > javaDocMaster.add(header); >@@ -195,12 +211,11 @@ > new Controller(indentMasters, indentSlaves) { > protected boolean areSlavesEnabled() { > return (javadoc.getChecked() || header.getChecked()) && indentJavadoc.getChecked(); >- } >+ } > }.update(null, null); > > ArrayList blockMasters= new ArrayList(); > blockMasters.add(blockComment); >- blockMasters.add(header); > > ArrayList blockSlaves= new ArrayList(); > blockSlaves.add(blockSettingsGroup); >@@ -217,7 +232,7 @@ > ArrayList lineWidthSlaves= new ArrayList(); > lineWidthSlaves.add(widthGroup); > lineWidthSlaves.add(lineWidth); >- >+ > new OrController(lineWidthMasters, lineWidthSlaves); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 177796
:
61130
|
64641
|
64761
|
64763