Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2007-01-25 05:03:13 -0500
committerAnton Leherbauer2007-01-25 05:03:13 -0500
commitdc1b1b8a53cfb7904e81baa26fb7b8377b4affa5 (patch)
tree390efab8fddb21b3d305e8e8aac4c234dcd46dc7 /core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
parent24f59a092f7724dfe058fa6894f95e7cf1bb047a (diff)
downloadorg.eclipse.cdt-dc1b1b8a53cfb7904e81baa26fb7b8377b4affa5.tar.gz
org.eclipse.cdt-dc1b1b8a53cfb7904e81baa26fb7b8377b4affa5.tar.xz
org.eclipse.cdt-dc1b1b8a53cfb7904e81baa26fb7b8377b4affa5.zip
Formatter improvements and fixes
Content assist: Add support for context information (parameter hints)
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp')
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
index a48488347f2..97138157acc 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
@@ -3,3 +3,10 @@
*/
#include <math.h>
class Point {public:Point(double xc, double yc) : x(xc), y(yc) {}double distance(const Point& other) const;int compareX(const Point& other) const;double x;double y;};double Point::distance(const Point& other) const {double dx = x - other.x;double dy = y - other.y;return sqrt(dx * dx + dy * dy);}int Point::compareX(const Point& other) const {if (x < other.x) {return -1;} else if (x > other.x) {return 1;} else {return 0;}}namespace FOO {int foo(int bar) const {switch (bar) {case 0:++bar;break;case 1:--bar;default: {bar += bar;break;}}}} // end namespace FOO
+/*
+ * Line Wrapping
+ */
+int array[]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1000, 2000, 3000, 4000, 5000};
+int compare(int argument, int otherArgument) {return argument+otherArgument > argument*otherArgument+1000000 ? 100000+50000 : 200000-30000;}
+class Other {static void bar(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) {}};
+void foo() {Other::bar(100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000);}

Back to the top