KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > preferences > formatter > ProfileVersioner


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.ui.preferences.formatter;
13
14 import java.util.Iterator JavaDoc;
15 import java.util.Map JavaDoc;
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 JavaDoc CODE_FORMATTER_PROFILE_KIND= "CodeFormatterProfile"; //$NON-NLS-1$
28

29     private static final int VERSION_1= 1; // < 20040113 (includes M6)
30
private static final int VERSION_2= 2; // before renaming almost all
31
private static final int VERSION_3= 3; // after renaming almost all
32
private static final int VERSION_4= 4;
33     private static final int VERSION_5= 5; // after splitting of FORMATTER_INDENT_BLOCK_STATEMENTS
34
private static final int VERSION_6= 6; // after splitting of new_line_in_control_statements
35
private static final int VERSION_7= 7; // after moving comment formatter to JDT Core
36
private static final int VERSION_8= 8; // fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=89739
37
private static final int VERSION_9= 9; // after storing project profile names in preferences
38
private static final int VERSION_10= 10; // splitting options for annotation types
39
private static final int VERSION_11= 11; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=49412
40

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     /**
52      * {@inheritDoc}
53      */

54     public String JavaDoc getProfileKind() {
55         return CODE_FORMATTER_PROFILE_KIND;
56     }
57
58     public void update(CustomProfile profile) {
59         final Map JavaDoc oldSettings= profile.getSettings();
60         Map JavaDoc newSettings= updateAndComplete(oldSettings, profile.getVersion());
61         profile.setVersion(CURRENT_VERSION);
62         profile.setSettings(newSettings);
63     }
64     
65     private static Map JavaDoc updateAndComplete(Map JavaDoc oldSettings, int version) {
66         final Map JavaDoc 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 JavaDoc iter= oldSettings.keySet().iterator(); iter.hasNext(); ) {
98                 final String JavaDoc key= (String JavaDoc)iter.next();
99                 if (!newSettings.containsKey(key))
100                     continue;
101                 
102                 final String JavaDoc value= (String JavaDoc)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     /**
114      * Updates the map to use the latest the source compliance
115      * @param map The map to update
116      */

117     public static void setLatestCompliance(Map JavaDoc map) {
118         JavaModelUtil.set50CompilanceOptions(map);
119     }
120         
121     private static void version1to2(final Map JavaDoc 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", //$NON-NLS-1$
133
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 JavaDoc settings, String JavaDoc oldKey, String JavaDoc [] oldValues,
156         String JavaDoc newKey, String JavaDoc [] newValues) {
157
158         if (!settings.containsKey(oldKey))
159             return;
160         
161         final String JavaDoc value= ((String JavaDoc)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 JavaDoc settings, String JavaDoc existingKey, String JavaDoc newKey) {
175         checkAndReplace(settings, existingKey, new String JavaDoc [] {newKey});
176     }
177     
178     private static void checkAndReplace(Map JavaDoc settings, String JavaDoc oldKey, String JavaDoc newKey) {
179         checkAndReplace(settings, oldKey, new String JavaDoc [] {newKey});
180     }
181     
182     private static void checkAndReplace(Map JavaDoc settings, String JavaDoc oldKey, String JavaDoc newKey1, String JavaDoc newKey2) {
183         checkAndReplace(settings, oldKey, new String JavaDoc [] {newKey1, newKey2});
184     }
185
186     private static void checkAndReplace(Map JavaDoc settings, String JavaDoc oldKey, String JavaDoc [] newKeys) {
187         if (!settings.containsKey(oldKey))
188             return;
189         
190         final String JavaDoc value= (String JavaDoc)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 JavaDoc settings, String JavaDoc oldKey, String JavaDoc newKey) {
201         if (!settings.containsKey(oldKey))
202             return;
203         
204         String JavaDoc value= (String JavaDoc)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 JavaDoc 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 JavaDoc [] {FORMATTER_NO_ALIGNMENT, FORMATTER_MULTICOLUMN},
497             DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS, new String JavaDoc [] {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 JavaDoc oldSettings) {
527         checkAndReplace(oldSettings,
528             "org.eclipse.jdt.core.align_type_members_on_columns", //$NON-NLS-1$
529
DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS);
530         
531         checkAndReplace(oldSettings,
532             "org.eclipse.jdt.core.formatter.insert_space_after_comma__in_superinterfaces", //$NON-NLS-1$
533
DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_SUPERINTERFACES);
534
535         checkAndReplace(oldSettings,
536             "org.eclipse.jdt.core.formatter.insert_space_before_comma__in_superinterfaces", //$NON-NLS-1$
537
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", //$NON-NLS-1$
541
DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION);
542     }
543     
544     private static void version4to5(Map JavaDoc oldSettings) {
545         checkAndReplace(oldSettings,
546             "org.eclipse.jdt.core.formatter.indent_block_statements", //$NON-NLS-1$
547
new String JavaDoc[] { DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY, DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BLOCK });
548     }
549     
550     private static void version5to6(Map JavaDoc oldSettings) {
551         checkAndReplace(oldSettings,
552             "org.eclipse.jdt.core.formatter.insert_new_line_in_control_statements", //$NON-NLS-1$
553
new String JavaDoc[] {
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 JavaDoc 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 JavaDoc 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 JavaDoc oldSettings) {
585         checkAndReplace(oldSettings,
586                 FORMATTER_COMMENT_FORMAT2,
587                 new String JavaDoc[] {
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 JavaDoc[] {
594                     DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT,
595                     DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT,
596                 });
597     }
598     
599     /* old format constant values */
600
601     private static final String JavaDoc FORMATTER_METHOD_DECLARATION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.method_declaration_arguments_alignment"; //$NON-NLS-1$
602
private static final String JavaDoc FORMATTER_MESSAGE_SEND_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.message_send_arguments_alignment"; //$NON-NLS-1$
603
private static final String JavaDoc FORMATTER_MESSAGE_SEND_SELECTOR_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.message_send_selector_alignment"; //$NON-NLS-1$
604
private static final String JavaDoc FORMATTER_QUALIFIED_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.qualified_allocation_expression_arguments_alignment"; //$NON-NLS-1$
605
private static final String JavaDoc FORMATTER_TYPE_DECLARATION_SUPERCLASS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_declaration_superclass_alignment"; //$NON-NLS-1$
606
private static final String JavaDoc FORMATTER_TYPE_DECLARATION_SUPERINTERFACES_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_declaration_superinterfaces_alignment"; //$NON-NLS-1$
607
private static final String JavaDoc FORMATTER_METHOD_THROWS_CLAUSE_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.method_throws_clause_alignment"; //$NON-NLS-1$
608
private static final String JavaDoc FORMATTER_CONDITIONAL_EXPRESSION_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.conditional_expression_alignment"; //$NON-NLS-1$
609
private static final String JavaDoc FORMATTER_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.allocation_expression_arguments_alignment"; //$NON-NLS-1$
610
private static final String JavaDoc FORMATTER_COMPACT_IF_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.compact_if_alignment"; //$NON-NLS-1$
611
private static final String JavaDoc FORMATTER_ARRAY_INITIALIZER_EXPRESSIONS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.array_initializer_expressions_alignment"; //$NON-NLS-1$
612
private static final String JavaDoc FORMATTER_BINARY_EXPRESSION_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.binary_expression_alignment"; //$NON-NLS-1$
613
private static final String JavaDoc FORMATTER_EXPLICIT_CONSTRUCTOR_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.explicit_constructor_arguments_alignment"; //$NON-NLS-1$
614
private static final String JavaDoc FORMATTER_ANONYMOUS_TYPE_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.anonymous_type_declaration_brace_position"; //$NON-NLS-1$
615
private static final String JavaDoc FORMATTER_ARRAY_INITIALIZER_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.array_initializer_brace_position"; //$NON-NLS-1$
616
private static final String JavaDoc FORMATTER_BLOCK_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.block_brace_position"; //$NON-NLS-1$
617
private static final String JavaDoc FORMATTER_METHOD_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.method_declaration_brace_position"; //$NON-NLS-1$
618
private static final String JavaDoc FORMATTER_TYPE_DECLARATION_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.type_declaration_brace_position"; //$NON-NLS-1$
619
private static final String JavaDoc FORMATTER_SWITCH_BRACE_POSITION = JavaCore.PLUGIN_ID + ".formatter.switch_brace_position"; //$NON-NLS-1$
620
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_constructor_arguments"; //$NON-NLS-1$
621
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_messagesend_arguments"; //$NON-NLS-1$
622
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_open_paren_in_parenthesized_expression"; //$NON-NLS-1$
623
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_opening_paren_in_message_send"; //$NON-NLS-1$
624
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_closing_paren_in_message_send"; //$NON-NLS-1$
625
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_constructor_arguments"; //$NON-NLS-1$
626
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_messagesend_arguments"; //$NON-NLS-1$
627
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_message_send"; //$NON-NLS-1$
628
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_closing_paren"; //$NON-NLS-1$
629
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_FIRST_ARGUMENT = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_first_argument"; //$NON-NLS-1$
630
private static final String JavaDoc FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_arguments"; //$NON-NLS-1$
631
private static final String JavaDoc FORMATTER_INSERT_SPACE_WITHIN_MESSAGE_SEND = JavaCore.PLUGIN_ID + ".formatter.insert_space_within_message_send"; //$NON-NLS-1$
632
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_BLOCK_CLOSE_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_block_close_brace"; //$NON-NLS-1$
633
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_ANONYMOUS_TYPE_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_anonymous_type_open_brace"; //$NON-NLS-1$
634
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_BLOCK_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_block_open_brace"; //$NON-NLS-1$
635
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_CATCH_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_catch_expression"; //$NON-NLS-1$
636
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_CONSTRUCTOR_DECLARATION_OPEN_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_constructor_declaration_open_paren"; //$NON-NLS-1$
637
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_FIRST_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_first_initializer"; //$NON-NLS-1$
638
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_FOR_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_for_paren"; //$NON-NLS-1$
639
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_IF_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_if_condition"; //$NON-NLS-1$
640
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_METHOD_DECLARATION_OPEN_PAREN = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_method_declaration_open_paren"; //$NON-NLS-1$
641
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_METHOD_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_method_open_brace"; //$NON-NLS-1$
642
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_OPEN_PAREN_IN_PARENTHESIZED_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_open_paren_in_parenthesized_expression"; //$NON-NLS-1$
643
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_SWITCH_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_switch_condition"; //$NON-NLS-1$
644
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_SWITCH_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_switch_open_brace"; //$NON-NLS-1$
645
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_SYNCHRONIZED_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_synchronized_condition"; //$NON-NLS-1$
646
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_TYPE_OPEN_BRACE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_type_open_brace"; //$NON-NLS-1$
647
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_WHILE_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_while_condition"; //$NON-NLS-1$
648
private static final String JavaDoc FORMATTER_INSERT_SPACE_BETWEEN_BRACKETS_IN_ARRAY_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_brackets_in_array_reference";//$NON-NLS-1$
649
private static final String JavaDoc FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_array_initializer"; //$NON-NLS-1$
650
private static final String JavaDoc FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_MESSAGESEND_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_between_empty_messagesend_arguments"; //$NON-NLS-1$
651
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_CATCH_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_catch_expression"; //$NON-NLS-1$
652
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_FOR_PARENS = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_for_parens"; //$NON-NLS-1$
653
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_IF_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_if_condition"; //$NON-NLS-1$
654
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_SWITCH_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_switch_condition"; //$NON-NLS-1$
655
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_SYNCHRONIZED_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_synchronized_condition"; //$NON-NLS-1$
656
private static final String JavaDoc FORMATTER_INSERT_SPACE_IN_WHILE_CONDITION = JavaCore.PLUGIN_ID + ".formatter.insert_space_in_while_condition"; //$NON-NLS-1$
657
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_bracket_in_array_reference";//$NON-NLS-1$
658
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_BRACKET_IN_ARRAY_TYPE_REFERENCE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_bracket_in_array_type_reference"; //$NON-NLS-1$
659
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATORS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_assignment_operators"; //$NON-NLS-1$
660
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATORS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_assignment_operators"; //$NON-NLS-1$
661
private static final String JavaDoc FORMATTER_FORMAT_GUARDIAN_CLAUSE_ON_ONE_LINE = JavaCore.PLUGIN_ID + ".formatter.format_guardian_clause_on_one_line"; //$NON-NLS-1$
662
private static final String JavaDoc FORMATTER_ARRAY_INITIALIZER_CONTINUATION_INDENTATION = JavaCore.PLUGIN_ID + ".formatter.array_initializer_continuation_indentation"; //$NON-NLS-1$
663
private static final String JavaDoc FORMATTER_TYPE_MEMBER_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.type_member_alignment"; //$NON-NLS-1$
664
private static final String JavaDoc FORMATTER_MULTICOLUMN = "256"; //$NON-NLS-1$
665
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_method_throws"; //$NON-NLS-1$
666
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_method_throws"; //$NON-NLS-1$
667
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_method_arguments"; //$NON-NLS-1$
668
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_method_arguments"; //$NON-NLS-1$
669
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_explicitconstructorcall_arguments"; //$NON-NLS-1$
670
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_EXPLICITCONSTRUCTORCALL_ARGUMENTS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_explicitconstructorcall_arguments"; //$NON-NLS-1$
671
private static final String JavaDoc FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_constructor_throws"; //$NON-NLS-1$
672
private static final String JavaDoc FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_THROWS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_constructor_throws"; //$NON-NLS-1$
673
private static final String JavaDoc FORMATTER_NO_ALIGNMENT = "0";//$NON-NLS-1$
674
private static final String JavaDoc FORMATTER_COMMENT_FORMAT2= JavaCore.PLUGIN_ID + ".formatter.comment.format_comments"; //$NON-NLS-1$
675
private static final String JavaDoc FORMATTER_COMMENT_CLEAR_BLANK_LINES= JavaCore.PLUGIN_ID + ".formatter.comment.clear_blank_lines"; //$NON-NLS-1$
676

677     // Old comment formatter constants
678
private static final String JavaDoc FORMATTER_COMMENT_FORMATSOURCE= "comment_format_source_code"; //$NON-NLS-1$
679
private static final String JavaDoc FORMATTER_COMMENT_INDENTPARAMETERDESCRIPTION= "comment_indent_parameter_description"; //$NON-NLS-1$
680
private static final String JavaDoc FORMATTER_COMMENT_FORMATHEADER= "comment_format_header"; //$NON-NLS-1$
681
private static final String JavaDoc FORMATTER_COMMENT_INDENTROOTTAGS= "comment_indent_root_tags"; //$NON-NLS-1$
682
private static final String JavaDoc FORMATTER_COMMENT_FORMAT= "comment_format_comments"; //$NON-NLS-1$
683
private static final String JavaDoc FORMATTER_COMMENT_NEWLINEFORPARAMETER= "comment_new_line_for_parameter"; //$NON-NLS-1$
684
private static final String JavaDoc FORMATTER_COMMENT_SEPARATEROOTTAGS= "comment_separate_root_tags"; //$NON-NLS-1$
685
private static final String JavaDoc FORMATTER_COMMENT_CLEARBLANKLINES= "comment_clear_blank_lines"; //$NON-NLS-1$
686
private static final String JavaDoc FORMATTER_COMMENT_LINELENGTH= "comment_line_length"; //$NON-NLS-1$
687
private static final String JavaDoc FORMATTER_COMMENT_FORMATHTML= "comment_format_html"; //$NON-NLS-1$
688

689  }
690
Popular Tags