1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 250969 - Code Formatter removes necessary whitespaces

This commit is contained in:
Anton Leherbauer 2008-10-17 09:19:49 +00:00
parent 2dd772835a
commit f9a7cd90e1
2 changed files with 21 additions and 1 deletions

View file

@ -1708,6 +1708,7 @@ public class Scribe {
fSkippedIndentations++;
}
if (offset > currentPosition) {
space();
printRaw(currentPosition, offset - currentPosition);
scanner.resetTo(offset, scannerEndPosition - 1);
}

View file

@ -853,4 +853,23 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
//#define FUNCTION_NAME myFunc
//#define VARIABLE_NAME myVar
//
//void FUNCTION_NAME( void );
//void FUNCTION_NAME( void )
//{
//int VARIABLE_NAME;
//}
//#define FUNCTION_NAME myFunc
//#define VARIABLE_NAME myVar
//
//void FUNCTION_NAME(void);
//void FUNCTION_NAME(void) {
// int VARIABLE_NAME;
//}
public void testPreserveNecessarySpace_Bug250969() throws Exception {
assertFormatterResult();
}
}