1 11 12 package org.eclipse.jdt.internal.ui.preferences.formatter; 13 14 import java.util.Iterator ; 15 import java.util.Map ; 16 17 import org.eclipse.jdt.core.JavaCore; 18 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; 19 20 import org.eclipse.jdt.internal.corext.util.JavaModelUtil; 21 22 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.CustomProfile; 23 24 25 public class ProfileVersioner implements IProfileVersioner { 26 27 public static final String CODE_FORMATTER_PROFILE_KIND= "CodeFormatterProfile"; 29 private static final int VERSION_1= 1; private static final int VERSION_2= 2; private static final int VERSION_3= 3; private static final int VERSION_4= 4; 33 private static final int VERSION_5= 5; private static final int VERSION_6= 6; private static final int VERSION_7= 7; private static final int VERSION_8= 8; private static final int VERSION_9= 9; private static final int VERSION_10= 10; private static final int VERSION_11= 11; 41 private static final int CURRENT_VERSION= VERSION_11; 42 43 public int getFirstVersion() { 44 return VERSION_1; 45 } 46 47 public int getCurrentVersion() { 48 return CURRENT_VERSION; 49 } 50 51 54 public String getProfileKind() { 55 return CODE_FORMATTER_PROFILE_KIND; 56 } 57 58 public void update(CustomProfile profile) { 59 final Map oldSettings= profile.getSettings(); 60 Map newSettings= updateAndComplete(oldSettings, profile.getVersion()); 61 profile.setVersion(CURRENT_VERSION); 62 profile.setSettings(newSettings); 63 } 64 65 private static Map updateAndComplete(Map oldSettings, int version) { 66 final Map newSettings= FormatterProfileManager.getDefaultSettings(); 67 68 switch (version) { 69 70 case VERSION_1: 71 version1to2(oldSettings); 72 73 case VERSION_2: 74 version2to3(oldSettings); 75 76 case VERSION_3: 77 version3to4(oldSettings); 78 79 case VERSION_4: 80 version4to5(oldSettings); 81 82 case VERSION_5: 83 version5to6(oldSettings); 84 85 case VERSION_6: 86 version6to7(oldSettings); 87 88 case VERSION_7: 89 case VERSION_8: 90 case VERSION_9: 91 version9to10(oldSettings); 92 93 case VERSION_10 : 94 version10to11(oldSettings); 95 96 default: 97 for (final Iterator iter= oldSettings.keySet().iterator(); iter.hasNext(); ) { 98 final String key= (String )iter.next(); 99 if (!newSettings.containsKey(key)) 100 continue; 101 102 final String value= (String )oldSettings.get(key); 103 if (value != null) { 104 newSettings.put(key, value); 105 } 106 } 107 108 } 109 setLatestCompliance(newSettings); 110 return newSettings; 111 } 112 113 117 public static void setLatestCompliance(Map map) { 118 JavaModelUtil.set50CompilanceOptions(map); 119 } 120 121 private static void version1to2(final Map oldSettings) { 122 checkAndReplace(oldSettings, 123 FORMATTER_INSERT_SPACE_WITHIN_MESSAGE_SEND, 124 FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_MESSAGE_SEND, 125 FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_MESSAGE_SEND); 126 127 checkAndReplace(oldSettings, 128 FORMATTER_INSERT_SPACE_AFTER_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION, 129 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION); 130 131 checkAndReplace(oldSettings, 132 JavaCore.PLUGIN_ID + ".formatter.inset_space_between_empty_arguments", FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARGUMENTS); 134 135 checkAndReplace(oldSettings, 136 FORMATTER_INSERT_SPACE_BEFORE_METHOD_DECLARATION_OPEN_PAREN, 137 FORMATTER_INSERT_SPACE_BEFORE_CONSTRUCTOR_DECLARATION_OPEN_PAREN); 138 139 checkAndReplace(oldSettings, 140 FORMATTER_INSERT_SPACE_AFTER_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION, 141 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION); 142 } 143 144 public static int getVersionStatus(CustomProfile profile) { 145 final int version= profile.getVersion(); 146 if (version < CURRENT_VERSION) 147 return -1; 148 else if (version > CURRENT_VERSION) 149 return 1; 150 else 151 return 0; 152 } 153 154 155 private static void mapOldValueRangeToNew(Map settings, String oldKey, String [] oldValues, 156 String newKey, String [] newValues) { 157 158 if (!settings.containsKey(oldKey)) 159 return; 160 161 final String value= ((String )settings.get(oldKey)); 162 163 if (value == null) 164 return; 165 166 for (int i = 0; i < oldValues.length; i++) { 167 if (value.equals(oldValues[i])) { 168 settings.put(newKey, newValues[i]); 169 } 170 } 171 172 } 173 174 private static void duplicate(Map settings, String existingKey, String newKey) { 175 checkAndReplace(settings, existingKey, new String [] {newKey}); 176 } 177 178 private static void checkAndReplace(Map settings, String oldKey, String newKey) { 179 checkAndReplace(settings, oldKey, new String [] {newKey}); 180 } 181 182 private static void checkAndReplace(Map settings, String oldKey, String newKey1, String newKey2) { 183 checkAndReplace(settings, oldKey, new String [] {newKey1, newKey2}); 184 } 185 186 private static void checkAndReplace(Map settings, String oldKey, String [] newKeys) { 187 if (!settings.containsKey(oldKey)) 188 return; 189 190 final String value= (String )settings.get(oldKey); 191 192 if (value == null) 193 return; 194 195 for (int i = 0; i < newKeys.length; i++) { 196 settings.put(newKeys[i], value); 197 } 198 } 199 200 private static void checkAndReplaceBooleanWithINSERT(Map settings, String oldKey, String newKey) { 201 if (!settings.containsKey(oldKey)) 202 return; 203 204 String value= (String )settings.get(oldKey); 205 206 if (value == null) 207 return; 208 209 if (DefaultCodeFormatterConstants.TRUE.equals(value)) 210 value= JavaCore.INSERT; 211 else 212 value= JavaCore.DO_NOT_INSERT; 213 214 settings.put(newKey, value); 215 } 216 217 218 private static void version2to3(Map oldSettings) { 219 220 checkAndReplace(oldSettings, 221 FORMATTER_ARRAY_INITIALIZER_CONTINUATION_INDENTATION, 222 DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER); 223 224 checkAndReplace(oldSettings, 225 FORMATTER_INSERT_SPACE_AFTER_BLOCK_CLOSE_BRACE, 226 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_BRACE_IN_BLOCK); 227 228 checkAndReplace(oldSettings, 229 FORMATTER_INSERT_SPACE_IN_CATCH_EXPRESSION, 230 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_CATCH, 231 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_CATCH); 232 233 checkAndReplace(oldSettings, 234 FORMATTER_INSERT_SPACE_IN_FOR_PARENS, 235 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_FOR, 236 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_FOR); 237 238 checkAndReplace(oldSettings, 239 FORMATTER_INSERT_SPACE_IN_IF_CONDITION, 240 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_IF, 241 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_IF); 242 243 checkAndReplace(oldSettings, 244 FORMATTER_INSERT_SPACE_IN_SWITCH_CONDITION, 245 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_SWITCH, 246 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_SWITCH); 247 248 checkAndReplace(oldSettings, 249 FORMATTER_INSERT_SPACE_IN_SYNCHRONIZED_CONDITION, 250 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_SYNCHRONIZED, 251 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_SYNCHRONIZED); 252 253 checkAndReplace(oldSettings, 254 FORMATTER_INSERT_SPACE_IN_WHILE_CONDITION, 255 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_WHILE, 256 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_WHILE); 257 258 checkAndReplace(oldSettings, 259 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_ARGUMENTS, 260 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_PARAMETERS); 261 262 checkAndReplace(oldSettings, 263 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_MESSAGESEND_ARGUMENTS, 264 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_INVOCATION_ARGUMENTS); 265 266 checkAndReplace(oldSettings, 267 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_ARGUMENTS, 268 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_PARAMETERS); 269 270 checkAndReplace(oldSettings, 271 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_ARGUMENTS, 272 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_DECLARATION_PARAMETERS); 273 274 checkAndReplace(oldSettings, 275 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_THROWS, 276 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_THROWS); 277 278 checkAndReplace(oldSettings, 279 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_THROWS, 280 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_DECLARATION_THROWS); 281 282 checkAndReplace(oldSettings, 283 FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_MESSAGE_SEND, 284 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION); 285 286 checkAndReplace(oldSettings, 287 FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_MESSAGE_SEND, 288 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION); 289 290 checkAndReplace(oldSettings, 291 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_ARGUMENTS, 292 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_DECLARATION_PARAMETERS); 293 294 checkAndReplace(oldSettings, 295 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_THROWS, 296 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_THROWS); 297 298 checkAndReplace(oldSettings, 299 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_THROWS, 300 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_DECLARATION_THROWS); 301 302 checkAndReplace(oldSettings, 303 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS, 304 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_EXPLICIT_CONSTRUCTOR_CALL_ARGUMENTS); 305 306 checkAndReplace(oldSettings, 307 FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS, 308 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICIT_CONSTRUCTOR_CALL_ARGUMENTS); 309 310 311 checkAndReplace(oldSettings, 312 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MESSAGESEND_ARGUMENTS, 313 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_INVOCATION_ARGUMENTS); 314 315 checkAndReplace(oldSettings, 316 FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_ARGUMENTS, 317 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_DECLARATION_PARAMETERS); 318 319 checkAndReplace(oldSettings, 320 FORMATTER_INSERT_SPACE_BEFORE_FIRST_ARGUMENT, 321 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_CONSTRUCTOR_DECLARATION, 322 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_DECLARATION); 323 324 checkAndReplace(oldSettings, 325 FORMATTER_INSERT_SPACE_BEFORE_MESSAGE_SEND, 326 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION); 327 328 checkAndReplace(oldSettings, 329 FORMATTER_INSERT_SPACE_BEFORE_ANONYMOUS_TYPE_OPEN_BRACE, 330 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ANONYMOUS_TYPE_DECLARATION); 331 332 checkAndReplace(oldSettings, 333 FORMATTER_INSERT_SPACE_BEFORE_BLOCK_OPEN_BRACE, 334 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_BLOCK); 335 336 checkAndReplace(oldSettings, 337 FORMATTER_INSERT_SPACE_BEFORE_CATCH_EXPRESSION, 338 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CATCH); 339 340 checkAndReplace(oldSettings, 341 FORMATTER_INSERT_SPACE_BEFORE_METHOD_OPEN_BRACE, 342 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_METHOD_DECLARATION, 343 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_CONSTRUCTOR_DECLARATION); 344 345 checkAndReplace(oldSettings, 346 FORMATTER_INSERT_SPACE_BEFORE_CONSTRUCTOR_DECLARATION_OPEN_PAREN, 347 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CONSTRUCTOR_DECLARATION); 348 349 checkAndReplace(oldSettings, 350 FORMATTER_INSERT_SPACE_BEFORE_FIRST_INITIALIZER, 351 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER); 352 353 checkAndReplace(oldSettings, 354 FORMATTER_INSERT_SPACE_BEFORE_FOR_PAREN, 355 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_FOR); 356 357 checkAndReplace(oldSettings, 358 FORMATTER_INSERT_SPACE_BEFORE_IF_CONDITION, 359 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_IF); 360 361 checkAndReplace(oldSettings, 362 FORMATTER_INSERT_SPACE_BEFORE_MESSAGE_SEND, 363 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION); 364 365 checkAndReplace(oldSettings, 366 FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN, 367 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_DECLARATION, 368 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_CONSTRUCTOR_DECLARATION); 369 370 checkAndReplace(oldSettings, 371 FORMATTER_INSERT_SPACE_BEFORE_METHOD_DECLARATION_OPEN_PAREN, 372 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_DECLARATION); 373 374 checkAndReplace(oldSettings, 375 FORMATTER_INSERT_SPACE_BEFORE_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION, 376 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION); 377 378 checkAndReplace(oldSettings, 379 FORMATTER_INSERT_SPACE_BEFORE_SWITCH_CONDITION, 380 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SWITCH); 381 382 checkAndReplace(oldSettings, 383 FORMATTER_INSERT_SPACE_BEFORE_SWITCH_OPEN_BRACE, 384 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_SWITCH); 385 386 checkAndReplace(oldSettings, 387 FORMATTER_INSERT_SPACE_BEFORE_SYNCHRONIZED_CONDITION, 388 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SYNCHRONIZED); 389 390 checkAndReplace(oldSettings, 391 FORMATTER_INSERT_SPACE_BEFORE_TYPE_OPEN_BRACE, 392 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_TYPE_DECLARATION); 393 394 checkAndReplace(oldSettings, 395 FORMATTER_INSERT_SPACE_BEFORE_WHILE_CONDITION, 396 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_WHILE); 397 398 checkAndReplace(oldSettings, 399 FORMATTER_INSERT_SPACE_BETWEEN_BRACKETS_IN_ARRAY_REFERENCE, 400 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACKET_IN_ARRAY_REFERENCE, 401 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACKET_IN_ARRAY_REFERENCE); 402 403 checkAndReplace(oldSettings, 404 FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARGUMENTS, 405 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION, 406 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_CONSTRUCTOR_DECLARATION); 407 408 checkAndReplace(oldSettings, 409 FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARRAY_INITIALIZER, 410 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_BRACES_IN_ARRAY_INITIALIZER); 411 412 checkAndReplace(oldSettings, 413 FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_MESSAGESEND_ARGUMENTS, 414 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION); 415 416 checkAndReplace(oldSettings, 417 FORMATTER_FORMAT_GUARDIAN_CLAUSE_ON_ONE_LINE, 418 DefaultCodeFormatterConstants.FORMATTER_KEEP_GUARDIAN_CLAUSE_ON_ONE_LINE); 419 420 checkAndReplace(oldSettings, 421 FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_REFERENCE, 422 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_REFERENCE); 423 424 checkAndReplace(oldSettings, 425 FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_TYPE_REFERENCE, 426 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_TYPE_REFERENCE); 427 428 checkAndReplace(oldSettings, 429 FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATORS, 430 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR); 431 432 checkAndReplace(oldSettings, 433 FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATORS, 434 DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATOR); 435 436 checkAndReplace(oldSettings, 437 FORMATTER_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT, 438 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION); 439 440 checkAndReplace(oldSettings, 441 FORMATTER_COMPACT_IF_ALIGNMENT, 442 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF); 443 444 checkAndReplace(oldSettings, 445 FORMATTER_MESSAGE_SEND_ARGUMENTS_ALIGNMENT , 446 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION); 447 448 checkAndReplace(oldSettings, 449 FORMATTER_QUALIFIED_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT , 450 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION); 451 452 checkAndReplace(oldSettings, 453 FORMATTER_BINARY_EXPRESSION_ALIGNMENT, 454 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION); 455 456 checkAndReplace(oldSettings, 457 FORMATTER_COMPACT_IF_ALIGNMENT, 458 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF); 459 460 checkAndReplace(oldSettings, 461 FORMATTER_CONDITIONAL_EXPRESSION_ALIGNMENT, 462 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION); 463 464 checkAndReplace(oldSettings, 465 FORMATTER_ARRAY_INITIALIZER_EXPRESSIONS_ALIGNMENT, 466 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER); 467 468 checkAndReplace(oldSettings, 469 FORMATTER_METHOD_DECLARATION_ARGUMENTS_ALIGNMENT, 470 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION, 471 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION); 472 473 checkAndReplace(oldSettings, 474 FORMATTER_MESSAGE_SEND_SELECTOR_ALIGNMENT, 475 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SELECTOR_IN_METHOD_INVOCATION); 476 477 checkAndReplace(oldSettings, 478 FORMATTER_TYPE_DECLARATION_SUPERCLASS_ALIGNMENT, 479 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SUPERCLASS_IN_TYPE_DECLARATION); 480 481 checkAndReplace(oldSettings, 482 FORMATTER_TYPE_DECLARATION_SUPERINTERFACES_ALIGNMENT, 483 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SUPERINTERFACES_IN_TYPE_DECLARATION); 484 485 checkAndReplace(oldSettings, 486 FORMATTER_METHOD_THROWS_CLAUSE_ALIGNMENT, 487 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION, 488 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_CONSTRUCTOR_DECLARATION); 489 490 checkAndReplace(oldSettings, 491 FORMATTER_EXPLICIT_CONSTRUCTOR_ARGUMENTS_ALIGNMENT, 492 DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL); 493 494 495 mapOldValueRangeToNew(oldSettings, 496 FORMATTER_TYPE_MEMBER_ALIGNMENT, new String [] {FORMATTER_NO_ALIGNMENT, FORMATTER_MULTICOLUMN}, 497 DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS, new String [] {DefaultCodeFormatterConstants.FALSE, DefaultCodeFormatterConstants.TRUE}); 498 499 500 checkAndReplace(oldSettings, 501 FORMATTER_ANONYMOUS_TYPE_DECLARATION_BRACE_POSITION, 502 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION); 503 504 checkAndReplace(oldSettings, 505 FORMATTER_ARRAY_INITIALIZER_BRACE_POSITION, 506 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER); 507 508 checkAndReplace(oldSettings, 509 FORMATTER_BLOCK_BRACE_POSITION, 510 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK); 511 512 checkAndReplace(oldSettings, 513 FORMATTER_METHOD_DECLARATION_BRACE_POSITION, 514 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION); 515 516 checkAndReplace(oldSettings, 517 FORMATTER_TYPE_DECLARATION_BRACE_POSITION, 518 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION); 519 520 checkAndReplace(oldSettings, 521 FORMATTER_SWITCH_BRACE_POSITION, 522 DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH); 523 524 } 525 526 private static void version3to4(Map oldSettings) { 527 checkAndReplace(oldSettings, 528 "org.eclipse.jdt.core.align_type_members_on_columns", DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS); 530 531 checkAndReplace(oldSettings, 532 "org.eclipse.jdt.core.formatter.insert_space_after_comma__in_superinterfaces", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_SUPERINTERFACES); 534 535 checkAndReplace(oldSettings, 536 "org.eclipse.jdt.core.formatter.insert_space_before_comma__in_superinterfaces", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_SUPERINTERFACES); 538 539 checkAndReplace(oldSettings, 540 "org.eclipse.jdt.core.formatter.insert_space_between_empty_arguments_in_method_invocation", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION); 542 } 543 544 private static void version4to5(Map oldSettings) { 545 checkAndReplace(oldSettings, 546 "org.eclipse.jdt.core.formatter.indent_block_statements", new String [] { DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY, DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BLOCK }); 548 } 549 550 private static void version5to6(Map oldSettings) { 551 checkAndReplace(oldSettings, 552 "org.eclipse.jdt.core.formatter.insert_new_line_in_control_statements", new String [] { 554 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT, 555 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT, 556 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT, 557 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT 558 }); 559 } 560 561 private static void version6to7(Map oldSettings) { 562 checkAndReplace(oldSettings, FORMATTER_COMMENT_FORMAT, FORMATTER_COMMENT_FORMAT2); 563 checkAndReplace(oldSettings, FORMATTER_COMMENT_FORMATHEADER, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER); 564 checkAndReplace(oldSettings, FORMATTER_COMMENT_FORMATSOURCE, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_SOURCE); 565 checkAndReplace(oldSettings, FORMATTER_COMMENT_INDENTPARAMETERDESCRIPTION, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION); 566 checkAndReplace(oldSettings, FORMATTER_COMMENT_INDENTROOTTAGS, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_ROOT_TAGS); 567 checkAndReplace(oldSettings, FORMATTER_COMMENT_LINELENGTH, DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_LENGTH); 568 checkAndReplace(oldSettings, FORMATTER_COMMENT_CLEARBLANKLINES, FORMATTER_COMMENT_CLEAR_BLANK_LINES); 569 checkAndReplace(oldSettings, FORMATTER_COMMENT_FORMATHTML, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HTML); 570 571 checkAndReplaceBooleanWithINSERT(oldSettings, FORMATTER_COMMENT_NEWLINEFORPARAMETER, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INSERT_NEW_LINE_FOR_PARAMETER); 572 checkAndReplaceBooleanWithINSERT(oldSettings, FORMATTER_COMMENT_SEPARATEROOTTAGS, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INSERT_EMPTY_LINE_BEFORE_ROOT_TAGS); 573 } 574 575 private static void version9to10(Map oldSettings) { 576 duplicate(oldSettings, 577 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION, 578 DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANNOTATION_DECLARATION); 579 duplicate(oldSettings, 580 DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_TYPE_HEADER, 581 DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ANNOTATION_DECLARATION_HEADER); 582 } 583 584 private static void version10to11(Map oldSettings) { 585 checkAndReplace(oldSettings, 586 FORMATTER_COMMENT_FORMAT2, 587 new String [] { 588 DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT, 589 DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT, 590 DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT 591 }); 592 checkAndReplace(oldSettings, FORMATTER_COMMENT_CLEAR_BLANK_LINES, 593 new String [] { 594 DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT, 595 DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT, 596 }); 597 } 598 599 600 601 private static final String FORMATTER_METHOD_DECLARATION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.method_declaration_arguments_alignment"; private static final String FORMATTER_MESSAGE_SEND_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.message_send_arguments_alignment"; private static final String FORMATTER_MESSAGE_SEND_SELECTOR_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.message_send_selector_alignment"; private static final String FORMATTER_QUALIFIED_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.qualified_allocation_expression_arguments_alignment"; private static final String FORMATTER_TYPE_DECLARATION_SUPERCLASS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_declaration_superclass_alignment"; private static final String FORMATTER_TYPE_DECLARATION_SUPERINTERFACES_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_declaration_superinterfaces_alignment"; private static final String FORMATTER_METHOD_THROWS_CLAUSE_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.method_throws_clause_alignment"; private static final String FORMATTER_CONDITIONAL_EXPRESSION_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.conditional_expression_alignment"; private static final String FORMATTER_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.allocation_expression_arguments_alignment"; private static final String FORMATTER_COMPACT_IF_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.compact_if_alignment"; private static final String FORMATTER_ARRAY_INITIALIZER_EXPRESSIONS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.array_initializer_expressions_alignment"; private static final String FORMATTER_BINARY_EXPRESSION_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.binary_expression_alignment"; private static final String FORMATTER_EXPLICIT_CONSTRUCTOR_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.explicit_constructor_arguments_alignment"; private static final String FORMATTER_ANONYMOUS_TYPE_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.anonymous_type_declaration_brace_position"; private static final String FORMATTER_ARRAY_INITIALIZER_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.array_initializer_brace_position"; private static final String FORMATTER_BLOCK_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.block_brace_position"; private static final String FORMATTER_METHOD_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.method_declaration_brace_position"; private static final String FORMATTER_TYPE_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.type_declaration_brace_position"; private static final String FORMATTER_SWITCH_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.switch_brace_position"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_constructor_arguments"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_messagesend_arguments"; private static final String FORMATTER_INSERT_SPACE_AFTER_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_open_paren_in_parenthesized_expression"; private static final String FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_opening_paren_in_message_send"; private static final String FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_closing_paren_in_message_send"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_constructor_arguments"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_messagesend_arguments"; private static final String FORMATTER_INSERT_SPACE_BEFORE_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_message_send"; private static final String FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_closing_paren"; private static final String FORMATTER_INSERT_SPACE_BEFORE_FIRST_ARGUMENT = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_first_argument"; private static final String FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_arguments"; private static final String FORMATTER_INSERT_SPACE_WITHIN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_within_message_send"; private static final String FORMATTER_INSERT_SPACE_AFTER_BLOCK_CLOSE_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_block_close_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_ANONYMOUS_TYPE_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_anonymous_type_open_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_BLOCK_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_block_open_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_CATCH_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_catch_expression"; private static final String FORMATTER_INSERT_SPACE_BEFORE_CONSTRUCTOR_DECLARATION_OPEN_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_constructor_declaration_open_paren"; private static final String FORMATTER_INSERT_SPACE_BEFORE_FIRST_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_first_initializer"; private static final String FORMATTER_INSERT_SPACE_BEFORE_FOR_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_for_paren"; private static final String FORMATTER_INSERT_SPACE_BEFORE_IF_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_if_condition"; private static final String FORMATTER_INSERT_SPACE_BEFORE_METHOD_DECLARATION_OPEN_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_method_declaration_open_paren"; private static final String FORMATTER_INSERT_SPACE_BEFORE_METHOD_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_method_open_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_open_paren_in_parenthesized_expression"; private static final String FORMATTER_INSERT_SPACE_BEFORE_SWITCH_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_switch_condition"; private static final String FORMATTER_INSERT_SPACE_BEFORE_SWITCH_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_switch_open_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_SYNCHRONIZED_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_synchronized_condition"; private static final String FORMATTER_INSERT_SPACE_BEFORE_TYPE_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_type_open_brace"; private static final String FORMATTER_INSERT_SPACE_BEFORE_WHILE_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_while_condition"; private static final String FORMATTER_INSERT_SPACE_BETWEEN_BRACKETS_IN_ARRAY_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_brackets_in_array_reference"; private static final String FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_array_initializer"; private static final String FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_messagesend_arguments"; private static final String FORMATTER_INSERT_SPACE_IN_CATCH_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_catch_expression"; private static final String FORMATTER_INSERT_SPACE_IN_FOR_PARENS = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_for_parens"; private static final String FORMATTER_INSERT_SPACE_IN_IF_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_if_condition"; private static final String FORMATTER_INSERT_SPACE_IN_SWITCH_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_switch_condition"; private static final String FORMATTER_INSERT_SPACE_IN_SYNCHRONIZED_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_synchronized_condition"; private static final String FORMATTER_INSERT_SPACE_IN_WHILE_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_while_condition"; private static final String FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_bracket_in_array_reference"; private static final String FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_TYPE_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_bracket_in_array_type_reference"; private static final String FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATORS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_assignment_operators"; private static final String FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATORS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_assignment_operators"; private static final String FORMATTER_FORMAT_GUARDIAN_CLAUSE_ON_ONE_LINE = JavaCore.PLUGIN_ID + ".formatter.format_guardian_clause_on_one_line"; private static final String FORMATTER_ARRAY_INITIALIZER_CONTINUATION_INDENTATION = JavaCore.PLUGIN_ID + ".formatter.array_initializer_continuation_indentation"; private static final String FORMATTER_TYPE_MEMBER_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_member_alignment"; private static final String FORMATTER_MULTICOLUMN = "256"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_method_throws"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_method_throws"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_method_arguments"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_method_arguments"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_explicitconstructorcall_arguments"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_explicitconstructorcall_arguments"; private static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_constructor_throws"; private static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_constructor_throws"; private static final String FORMATTER_NO_ALIGNMENT = "0"; private static final String FORMATTER_COMMENT_FORMAT2= JavaCore.PLUGIN_ID + ".formatter.comment.format_comments"; private static final String FORMATTER_COMMENT_CLEAR_BLANK_LINES= JavaCore.PLUGIN_ID + ".formatter.comment.clear_blank_lines"; 677 private static final String FORMATTER_COMMENT_FORMATSOURCE= "comment_format_source_code"; private static final String FORMATTER_COMMENT_INDENTPARAMETERDESCRIPTION= "comment_indent_parameter_description"; private static final String FORMATTER_COMMENT_FORMATHEADER= "comment_format_header"; private static final String FORMATTER_COMMENT_INDENTROOTTAGS= "comment_indent_root_tags"; private static final String FORMATTER_COMMENT_FORMAT= "comment_format_comments"; private static final String FORMATTER_COMMENT_NEWLINEFORPARAMETER= "comment_new_line_for_parameter"; private static final String FORMATTER_COMMENT_SEPARATEROOTTAGS= "comment_separate_root_tags"; private static final String FORMATTER_COMMENT_CLEARBLANKLINES= "comment_clear_blank_lines"; private static final String FORMATTER_COMMENT_LINELENGTH= "comment_line_length"; private static final String FORMATTER_COMMENT_FORMATHTML= "comment_format_html"; 689 } 690 | Popular Tags |