|
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Link Here
|
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
|
|
10 |
* Ray V. (voidstar@gmail.com) - Contribution for bug 282988 |
| 10 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 11 |
package org.eclipse.jdt.internal.ui.preferences.formatter; |
12 |
package org.eclipse.jdt.internal.ui.preferences.formatter; |
| 12 |
|
13 |
|
|
Link Here
|
| 119 |
" * @return The result of the foo operation, usually within 0 and 1000.\n" + //$NON-NLS-1$ |
120 |
" * @return The result of the foo operation, usually within 0 and 1000.\n" + //$NON-NLS-1$ |
| 120 |
" */" + //$NON-NLS-1$ |
121 |
" */" + //$NON-NLS-1$ |
| 121 |
" int foo(int a, int b);\n" + //$NON-NLS-1$ |
122 |
" int foo(int a, int b);\n" + //$NON-NLS-1$ |
|
|
123 |
"}\n" +//$NON-NLS-1$ |
| 124 |
"class Test {\n" +//$NON-NLS-1$ |
| 125 |
"\t\tvoid trailingCommented() {\n" + //$NON-NLS-1$ |
| 126 |
"\t\t\t\tSystem.out.println(\"indented\");\t\t// comment\n" + //$NON-NLS-1$ |
| 127 |
"\t\t\t\tSystem.out.println(\"indent\");\t\t// comment\n" + //$NON-NLS-1$ |
| 128 |
"\t\t}\n" + //$NON-NLS-1$ |
| 122 |
"}"; //$NON-NLS-1$ |
129 |
"}"; //$NON-NLS-1$ |
| 123 |
|
130 |
|
| 124 |
private CompilationUnitPreview fPreview; |
131 |
private CompilationUnitPreview fPreview; |
|
Link Here
|
| 141 |
GridData spacerData= new GridData(0, 0); |
148 |
GridData spacerData= new GridData(0, 0); |
| 142 |
spacerData.horizontalSpan= numColumns; |
149 |
spacerData.horizontalSpan= numColumns; |
| 143 |
new Composite(globalGroup, SWT.NONE).setLayoutData(spacerData); |
150 |
new Composite(globalGroup, SWT.NONE).setLayoutData(spacerData); |
|
|
151 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_preserve_trailing_line_comment_indentation, DefaultCodeFormatterConstants.FORMATTER_COMMENT_PRESERVE_TRAILING_LINE_COMMENT_INDENTATION, false); |
| 144 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_block_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN, false); |
152 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_block_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN, false); |
| 145 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_line_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN, false); |
153 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_line_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN, false); |
| 146 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_do_not_join_lines, DefaultCodeFormatterConstants.FORMATTER_JOIN_LINES_IN_COMMENTS, true); |
154 |
createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_do_not_join_lines, DefaultCodeFormatterConstants.FORMATTER_JOIN_LINES_IN_COMMENTS, true); |