1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fixed a typo.

This commit is contained in:
Sergey Prigogin 2009-06-27 20:04:16 +00:00
parent 6a9e1ff1dd
commit eff76a45d1

View file

@ -2198,35 +2198,35 @@ public class DefaultCodeFormatterConstants {
* @param wrapStyle the given wrapping style * @param wrapStyle the given wrapping style
* @param indentStyle the given indent style * @param indentStyle the given indent style
* *
* @return the new alignement value * @return the new alignment value
*/ */
public static String createAlignmentValue(boolean forceSplit, int wrapStyle, int indentStyle) { public static String createAlignmentValue(boolean forceSplit, int wrapStyle, int indentStyle) {
int alignmentValue = 0; int alignmentValue = 0;
switch(wrapStyle) { switch (wrapStyle) {
case WRAP_COMPACT : case WRAP_COMPACT:
alignmentValue |= Alignment.M_COMPACT_SPLIT; alignmentValue |= Alignment.M_COMPACT_SPLIT;
break; break;
case WRAP_COMPACT_FIRST_BREAK : case WRAP_COMPACT_FIRST_BREAK:
alignmentValue |= Alignment.M_COMPACT_FIRST_BREAK_SPLIT; alignmentValue |= Alignment.M_COMPACT_FIRST_BREAK_SPLIT;
break; break;
case WRAP_NEXT_PER_LINE : case WRAP_NEXT_PER_LINE:
alignmentValue |= Alignment.M_NEXT_PER_LINE_SPLIT; alignmentValue |= Alignment.M_NEXT_PER_LINE_SPLIT;
break; break;
case WRAP_NEXT_SHIFTED : case WRAP_NEXT_SHIFTED:
alignmentValue |= Alignment.M_NEXT_SHIFTED_SPLIT; alignmentValue |= Alignment.M_NEXT_SHIFTED_SPLIT;
break; break;
case WRAP_ONE_PER_LINE : case WRAP_ONE_PER_LINE:
alignmentValue |= Alignment.M_ONE_PER_LINE_SPLIT; alignmentValue |= Alignment.M_ONE_PER_LINE_SPLIT;
break; break;
} }
if (forceSplit) { if (forceSplit) {
alignmentValue |= Alignment.M_FORCE; alignmentValue |= Alignment.M_FORCE;
} }
switch(indentStyle) { switch (indentStyle) {
case INDENT_BY_ONE : case INDENT_BY_ONE:
alignmentValue |= Alignment.M_INDENT_BY_ONE; alignmentValue |= Alignment.M_INDENT_BY_ONE;
break; break;
case INDENT_ON_COLUMN : case INDENT_ON_COLUMN:
alignmentValue |= Alignment.M_INDENT_ON_COLUMN; alignmentValue |= Alignment.M_INDENT_ON_COLUMN;
} }
return String.valueOf(alignmentValue); return String.valueOf(alignmentValue);
@ -2350,15 +2350,15 @@ public class DefaultCodeFormatterConstants {
try { try {
int existingValue = Integer.parseInt(value) & Alignment.SPLIT_MASK; int existingValue = Integer.parseInt(value) & Alignment.SPLIT_MASK;
switch(existingValue) { switch(existingValue) {
case Alignment.M_COMPACT_SPLIT : case Alignment.M_COMPACT_SPLIT:
return WRAP_COMPACT; return WRAP_COMPACT;
case Alignment.M_COMPACT_FIRST_BREAK_SPLIT : case Alignment.M_COMPACT_FIRST_BREAK_SPLIT:
return WRAP_COMPACT_FIRST_BREAK; return WRAP_COMPACT_FIRST_BREAK;
case Alignment.M_NEXT_PER_LINE_SPLIT : case Alignment.M_NEXT_PER_LINE_SPLIT:
return WRAP_NEXT_PER_LINE; return WRAP_NEXT_PER_LINE;
case Alignment.M_NEXT_SHIFTED_SPLIT : case Alignment.M_NEXT_SHIFTED_SPLIT:
return WRAP_NEXT_SHIFTED; return WRAP_NEXT_SHIFTED;
case Alignment.M_ONE_PER_LINE_SPLIT : case Alignment.M_ONE_PER_LINE_SPLIT:
return WRAP_ONE_PER_LINE; return WRAP_ONE_PER_LINE;
default: default:
return WRAP_NO_SPLIT; return WRAP_NO_SPLIT;
@ -2419,11 +2419,11 @@ public class DefaultCodeFormatterConstants {
throw WRONG_ARGUMENT; throw WRONG_ARGUMENT;
} }
switch(indentStyle) { switch(indentStyle) {
case INDENT_BY_ONE : case INDENT_BY_ONE:
case INDENT_DEFAULT : case INDENT_DEFAULT:
case INDENT_ON_COLUMN : case INDENT_ON_COLUMN:
break; break;
default : default:
throw WRONG_ARGUMENT; throw WRONG_ARGUMENT;
} }
try { try {
@ -2431,10 +2431,10 @@ public class DefaultCodeFormatterConstants {
// clear existing indent bits // clear existing indent bits
existingValue &= ~(Alignment.M_INDENT_BY_ONE | Alignment.M_INDENT_ON_COLUMN); existingValue &= ~(Alignment.M_INDENT_BY_ONE | Alignment.M_INDENT_ON_COLUMN);
switch(indentStyle) { switch(indentStyle) {
case INDENT_BY_ONE : case INDENT_BY_ONE:
existingValue |= Alignment.M_INDENT_BY_ONE; existingValue |= Alignment.M_INDENT_BY_ONE;
break; break;
case INDENT_ON_COLUMN : case INDENT_ON_COLUMN:
existingValue |= Alignment.M_INDENT_ON_COLUMN; existingValue |= Alignment.M_INDENT_ON_COLUMN;
} }
return String.valueOf(existingValue); return String.valueOf(existingValue);
@ -2466,13 +2466,13 @@ public class DefaultCodeFormatterConstants {
if (value == null) { if (value == null) {
throw WRONG_ARGUMENT; throw WRONG_ARGUMENT;
} }
switch(wrappingStyle) { switch (wrappingStyle) {
case WRAP_COMPACT : case WRAP_COMPACT:
case WRAP_COMPACT_FIRST_BREAK : case WRAP_COMPACT_FIRST_BREAK:
case WRAP_NEXT_PER_LINE : case WRAP_NEXT_PER_LINE:
case WRAP_NEXT_SHIFTED : case WRAP_NEXT_SHIFTED:
case WRAP_NO_SPLIT : case WRAP_NO_SPLIT:
case WRAP_ONE_PER_LINE : case WRAP_ONE_PER_LINE:
break; break;
default: default:
throw WRONG_ARGUMENT; throw WRONG_ARGUMENT;
@ -2481,20 +2481,20 @@ public class DefaultCodeFormatterConstants {
int existingValue = Integer.parseInt(value); int existingValue = Integer.parseInt(value);
// clear existing split bits // clear existing split bits
existingValue &= ~(Alignment.SPLIT_MASK); existingValue &= ~(Alignment.SPLIT_MASK);
switch(wrappingStyle) { switch (wrappingStyle) {
case WRAP_COMPACT : case WRAP_COMPACT:
existingValue |= Alignment.M_COMPACT_SPLIT; existingValue |= Alignment.M_COMPACT_SPLIT;
break; break;
case WRAP_COMPACT_FIRST_BREAK : case WRAP_COMPACT_FIRST_BREAK:
existingValue |= Alignment.M_COMPACT_FIRST_BREAK_SPLIT; existingValue |= Alignment.M_COMPACT_FIRST_BREAK_SPLIT;
break; break;
case WRAP_NEXT_PER_LINE : case WRAP_NEXT_PER_LINE:
existingValue |= Alignment.M_NEXT_PER_LINE_SPLIT; existingValue |= Alignment.M_NEXT_PER_LINE_SPLIT;
break; break;
case WRAP_NEXT_SHIFTED : case WRAP_NEXT_SHIFTED:
existingValue |= Alignment.M_NEXT_SHIFTED_SPLIT; existingValue |= Alignment.M_NEXT_SHIFTED_SPLIT;
break; break;
case WRAP_ONE_PER_LINE : case WRAP_ONE_PER_LINE:
existingValue |= Alignment.M_ONE_PER_LINE_SPLIT; existingValue |= Alignment.M_ONE_PER_LINE_SPLIT;
break; break;
} }