Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2007-10-23 07:31:30 -0400
committerAnton Leherbauer2007-10-23 07:31:30 -0400
commitf9aaf04e880b70f94e0135ac63798d02ffc92218 (patch)
treec8602a08cf505b6ea1e1922c8464cd0e95f9b1b6
parent57d7ac7888e316b046f5928795adb6707aea85f7 (diff)
downloadorg.eclipse.cdt-f9aaf04e880b70f94e0135ac63798d02ffc92218.tar.gz
org.eclipse.cdt-f9aaf04e880b70f94e0135ac63798d02ffc92218.tar.xz
org.eclipse.cdt-f9aaf04e880b70f94e0135ac63798d02ffc92218.zip
Fix for 206829: Can't create a newline in some cpp files
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java
index 1ca0c439f28..650fd0e790d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java
@@ -664,15 +664,9 @@ public final class CIndenter {
if (CCorePlugin.SPACE.equals(fPrefs.prefTabChar)) {
tabs= 0;
spaces= missing;
- } else if (CCorePlugin.TAB.equals(fPrefs.prefTabChar)) {
- tabs= tabSize > 0 ? missing / tabSize : 0;
- spaces= tabSize > 0 ? missing % tabSize : missing;
- } else if (DefaultCodeFormatterConstants.MIXED.equals(fPrefs.prefTabChar)) {
+ } else {
tabs= tabSize > 0 ? missing / tabSize : 0;
spaces= tabSize > 0 ? missing % tabSize : missing;
- } else {
- Assert.isTrue(false);
- return null;
}
for (int i= 0; i < tabs; i++)
buffer.append('\t');
@@ -1408,6 +1402,7 @@ public final class CIndenter {
return false;
default:
+ // programming error
Assert.isTrue(false);
return false;
}
@@ -1538,6 +1533,7 @@ public final class CIndenter {
return pos; // restore
default:
+ // programming error
Assert.isTrue(false);
return -1; // dummy
}

Back to the top