diff options
author | Robin Stocker | 2014-01-27 23:38:20 +0000 |
---|---|---|
committer | Jayaprakash Arthanareeswaran | 2014-01-28 02:44:31 +0000 |
commit | ccc0792be277c61897d6812d61e917773111eeb0 (patch) | |
tree | 853eaaacd4896c27be8bebbe01c700c1de2fd7c5 | |
parent | f8b6b46eb549003d602669d933e8c4d912cfd694 (diff) | |
download | eclipse.jdt.core-ccc0792be277c61897d6812d61e917773111eeb0.tar.gz eclipse.jdt.core-ccc0792be277c61897d6812d61e917773111eeb0.tar.xz eclipse.jdt.core-ccc0792be277c61897d6812d61e917773111eeb0.zip |
Bug 49619 - [formatting] comment formatter leaves whitespace in comments
With this, the Javadoc formatter preserves a trailing space if it was
there already, but does not add a new one. Also adjusted the tests which
expected that a new trailing space was added.
Note that the block comment formatter is not fixed by this, it still has
the same problem.
Change-Id: I157a12661d5203c4a983b89ae7531d5b71b29bcd
Signed-off-by: Robin Stocker <robin@nibor.org>
52 files changed, 132 insertions, 123 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java index 029f794498..3c007c464e 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Ray V. (voidstar@gmail.com) - Contribution for bug 282988 + * Robin Stocker - Bug 49619 - [formatting] comment formatter leaves whitespace in comments *******************************************************************************/ package org.eclipse.jdt.core.tests.formatter; @@ -4727,17 +4728,17 @@ public void testBug294500a() { "\n" + "/**\n" + " * This sample produce an MalformedTreeException when formatted.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * First paragraph {@link java.lang.String </code>a simple string<code>}.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * Second paragraph.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * Third paragraph.\n" + " * </p>\n" + - " * \n" + + " *\n" + " */\n" + "public class X01 {\n" + "\n" + @@ -4762,7 +4763,7 @@ public void testBug294500b() { "\n" + "/**\n" + " * This sample produce an AIIOBE when formatting.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * First paragraph {@link java.lang.String </code>a simple string<code>}.\n" + " */\n" + @@ -4812,18 +4813,18 @@ public void testBug294618a() { " * <li>\n" + " * <p>\n" + " * First item\n" + - " * \n" + + " *\n" + " * <li>\n" + " * <p>\n" + " * Second item\n" + - " * \n" + + " *\n" + " * <li>\n" + " * <p>\n" + " * First paragraph of third item\n" + - " * \n" + + " *\n" + " * <p>\n" + " * Second paragraph of third item\n" + - " * \n" + + " *\n" + " * <blockquote>\n" + " * <table cellpadding=0 cellspacing=0 summary=\"layout\">\n" + " * <tr>\n" + @@ -5037,7 +5038,7 @@ public void testBug295175d() { " /**\n" + " * <p>\n" + " * Following p tag can miss a space before after formatting\n" + - " * \n" + + " *\n" + " * <p>\n" + " * <BR>\n" + " * <B>NOTE</B><BR>\n" + diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java index 73878dd6c4..7cf1a03fec 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Robin Stocker - Bug 49619 - [formatting] comment formatter leaves whitespace in comments *******************************************************************************/ package org.eclipse.jdt.core.tests.formatter; @@ -3499,7 +3500,7 @@ public void testBug239941() throws JavaModelException { "\n" + " /**\n" + " * Gets the signers of this class.\n" + - " * \n" + + " *\n" + " * @return the signers of this class, or null if there are no signers. In\n" + " * particular, this method returns null if this object represents a\n" + " * primitive type or void.\n" + @@ -4896,7 +4897,7 @@ public void testBug260381_wksp1_01() throws JavaModelException { " * viewer\'s functionalities must be specified. This implementation always\n" + " * returns <code>\n" + " * new String[] { IDocument.DEFAULT_CONTENT_TYPE }</code>.\n" + - " * \n" + + " *\n" + " * @param source\n" + " * the source viewer to be configured by this configuration\n" + " * @return the configured content types for the given viewer\n" + @@ -4931,10 +4932,10 @@ public void testBug260381_wksp2_01() throws JavaModelException { " * Returns the composition of two functions. For {@code f: A->B} and\n" + " * {@code g: B->C}, composition is defined as the function h such that\n" + " * {@code h(a) == g(f(a))} for each {@code a}.\n" + - " * \n" + + " *\n" + " * @see <a href=\"//en.wikipedia.org/wiki/Function_composition\"> function\n" + " * composition</a>\n" + - " * \n" + + " *\n" + " * @param g\n" + " * the second function to apply\n" + " * @param f\n" + @@ -4971,10 +4972,10 @@ public void testBug260381_wksp2_01b() throws JavaModelException { " * Returns the composition of two functions. For <code> f: A->B</code> and\n" + " * <code> g: B->C</code>, composition is defined as the function h such that\n" + " * <code> h(a) == g(f(a))</code> for each <code> a</code>.\n" + - " * \n" + + " *\n" + " * @see <a href=\"//en.wikipedia.org/wiki/Function_composition\"> function\n" + " * composition</a>\n" + - " * \n" + + " *\n" + " * @param g\n" + " * the second function to apply\n" + " * @param f\n" + @@ -5025,10 +5026,10 @@ public void testBug260381_wksp2_01c() throws JavaModelException { " * </code> for each <code>\n" + " * a\n" + " * </code>.\n" + - " * \n" + + " *\n" + " * @see <a href=\"//en.wikipedia.org/wiki/Function_composition\"> function\n" + " * composition</a>\n" + - " * \n" + + " *\n" + " * @param g\n" + " * the second function to apply\n" + " * @param f\n" + @@ -5062,7 +5063,7 @@ public void testBug260381_wksp2_02() throws JavaModelException { " /**\n" + " * Implementations of {@code computeNext} <b>must</b> invoke this method\n" + " * when there are no elements left in the iteration.\n" + - " * \n" + + " *\n" + " * @return {@code null}; a convenience so your {@link #computeNext}\n" + " * implementation can use the simple statement\n" + " * {@code return endOfData();}\n" + @@ -5112,10 +5113,10 @@ public void testBug260381_wksp2_03() throws JavaModelException { " * .put("one", 1).put("two", 2).put("three", 3).build();\n" + " * }\n" + " * </pre>\n" + - " * \n" + + " *\n" + " * For <i>small</i> immutable bimaps, the {@code ImmutableBiMap.of()}\n" + " * methods are even more convenient.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * Builder instances can be reused - it is safe to call {@link #build}\n" + " * multiple times to build multiple bimaps in series. Each bimap is a\n" + @@ -5188,7 +5189,7 @@ public void testBug260381_wksp2_04() throws JavaModelException { " * The multiset is ordered by the first occurrence of each element. For\n" + " * example, {@code ImmutableMultiset.copyOf(Arrays.asList(2, 3, 1, 3))}\n" + " * yields a multiset with elements in the order {@code 2, 3, 3, 1}.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * Note that if {@code c} is a {@code Collection<String>}, then\n" + " * {@code ImmutableMultiset.copyOf(c)} returns an\n" + @@ -5196,12 +5197,12 @@ public void testBug260381_wksp2_04() throws JavaModelException { " * {@code c}, while {@code ImmutableMultiset.of(c)} returns an\n" + " * {@code ImmutableMultiset<Collection<String>>} containing one element (the\n" + " * given collection itself).\n" + - " * \n" + + " *\n" + " * <p>\n" + " * <b>Note:</b> Despite what the method name suggests, if {@code elements}\n" + " * is an {@code ImmutableMultiset}, no copy will actually be performed, and\n" + " * the given multiset itself will be returned.\n" + - " * \n" + + " *\n" + " * @throws NullPointerException\n" + " * if any of {@code elements} is null\n" + " */\n" + @@ -5259,10 +5260,10 @@ public void testBug260381_wksp2_05() throws JavaModelException { " * to store that value in the multimap will be the result of calling the\n" + " * function on that value. Depending on the multimap implementation,\n" + " * duplicate entries (equal keys and equal values) may be collapsed.\n" + - " * \n" + + " *\n" + " * <p>\n" + " * For example,\n" + - " * \n" + + " *\n" + " * <pre class=\"code\">\n" + " * List<String> badGuys =\n" + " * Arrays.asList(\"Inky\", \"Blinky\", \"Pinky\", \"Pinky\", \"Clyde\");\n" + @@ -5271,16 +5272,16 @@ public void testBug260381_wksp2_05() throws JavaModelException { " * Multimaps.index(badGuys, stringLengthFunction, index);\n" + " * System.out.println(index);\n" + " * </pre>\n" + - " * \n" + + " *\n" + " * prints\n" + - " * \n" + + " *\n" + " * <pre class=\"code\">\n" + " * {4=[Inky], 5=[Pinky, Clyde], 6=[Blinky]}\n" + " * </pre>\n" + - " * \n" + + " *\n" + " * The {@link HashMultimap} collapses the duplicate occurrence of\n" + " * {@code (5, \"Pinky\")}.\n" + - " * \n" + + " *\n" + " * @param values\n" + " * the values to add to the multimap\n" + " * @param keyFunction\n" + @@ -5332,7 +5333,7 @@ public void testBug260381_wksp2_06() throws JavaModelException { " * the case of overflow) to the call\n" + " * {@code addAll(Collections.nCopies(element,\n" + " * occurrences))}, which would presumably perform much more poorly.\n" + - " * \n" + + " *\n" + " * @param element\n" + " * the element to add occurrences of; may be {@code null} only if\n" + " * explicitly allowed by the implementation\n" + @@ -5388,7 +5389,7 @@ public void testBug260381_wksp2_07() throws JavaModelException { " * {@code e1} and {@code e2} in the multiset. If the user attempts to add an\n" + " * element to the multiset that violates this constraint, the\n" + " * {@code add(Object)} call will throw a {@code ClassCastException}.\n" + - " * \n" + + " *\n" + " * @param comparator\n" + " * the comparator that will be used to sort this multiset. A null\n" + " * value indicates that the elements\' <i>natural ordering</i>\n" + @@ -5421,7 +5422,7 @@ public void testBug260381_wksp2_08() throws JavaModelException { " * Returns the composition of a function and a predicate. For every\n" + " * {@code x}, the generated predicate returns {@code predicate(function(x))}\n" + " * .\n" + - " * \n" + + " *\n" + " * @return the composition of the provided function and predicate\n" + " */\n" + " void foo();\n" + @@ -6712,7 +6713,7 @@ public void testBug309835_wksp1_02() { " /**\n" + " * INTERNAL USE-ONLY Generate the byte for a problem method info that\n" + " * correspond to a boggus method.\n" + - " * \n" + + " *\n" + " * @param method\n" + " * org.eclipse.jdt.internal.compiler.ast.\n" + " * AbstractMethodDeclaration\n" + @@ -6783,7 +6784,7 @@ public void testBug311864() throws JavaModelException { " /**\n" + " * Compares two property values. For font or color the <i>description</i> of\n" + " * the resource, {@link FontData} or {@link RGB}, is used for comparison.\n" + - " * \n" + + " *\n" + " * @param value1\n" + " * first property value\n" + " * @param value2\n" + diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test574/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test574/A_out.java index e6d287d1d2..750aa29443 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test574/A_out.java +++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test574/A_out.java @@ -1,6 +1,6 @@ /** * @author Zhao - * + * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */
\ No newline at end of file diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01.java index 1a69da5260..06576a7d9c 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01.java @@ -1,7 +1,7 @@ public class X01 { /** - * + * * Returns true if the operator * expects... **/ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01b.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01b.java index 74ddcc2fce..b0fd893e3e 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01b.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01b.java @@ -1,7 +1,7 @@ public class X01b { /*** - * + * * Test header/footer. */ void foo() { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01c.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01c.java index b9b615aedc..865e8bb0e8 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01c.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01c.java @@ -1,7 +1,7 @@ public class X01c { /***************************************** - * + * * Test header/footer. */ void foo() { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01d.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01d.java index 44e279e561..66b2805062 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01d.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01d.java @@ -1,7 +1,7 @@ public class X01d { /** - * + * * Test header/footer. ***/ void foo() { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01e.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01e.java index dc1bd48a52..0e771293f0 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01e.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01e.java @@ -1,7 +1,7 @@ public class X01e { /** - * + * * Test header/footer. * *****************************************/ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01f.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01f.java index c6e4e036fb..39475e7b81 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01f.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X01f.java @@ -1,7 +1,7 @@ public class X01f { /***************************************** - * + * * Returns true * *****************************************/ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X02.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X02.java index dae99f7754..1b47e78cb3 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X02.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X02.java @@ -1,7 +1,7 @@ public class X02 { /** - ** + ** ** Returns true **/ void foo() { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X03.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X03.java index 76345d67c8..0fed0c4049 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X03.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/bugs/b232285/out/X03.java @@ -1,7 +1,7 @@ public class X03 { /** - ** + ** ** Returns true if the operator * expects... **/ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/copyright/out/default/X1.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/copyright/out/default/X1.java index 3752df1b2e..e821c8c83a 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/copyright/out/default/X1.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/copyright/out/default/X1.java @@ -5,7 +5,7 @@ package test.copyright; * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: IBM Corporation - initial API and implementation */ public class X1 { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X01.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X01.java index 25809705d6..dd7fad6313 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X01.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X01.java @@ -9,7 +9,7 @@ package test.prefs.example; interface Example { /** - * + * * These possibilities include: * <ul> * <li>Formatting of header comments.</li> diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X11.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X11.java index 0a979d794c..6981ad8a83 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X11.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X11.java @@ -7,7 +7,7 @@ package test.prefs.example; * Note: do not add protected/public members to this class if you don't intend * to make them public API. * </p> - * + * * @see org.eclipse.core.runtime.content.XMLRootElementContentDescriber * @see "http://www.w3.org/TR/REC-xml *" */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X16b.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X16b.java index 586232c744..78b3b6046c 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X16b.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/default/X16b.java @@ -5,7 +5,7 @@ public class X16b { * Asserts that an argument is legal. If the given boolean is not * <code>true</code>, an <code>IllegalArgumentException</code> is thrown. * The given message is included in that exception, to aid debugging. - * + * * @param expression * the outcode of the check * @param message diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X01.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X01.java index 5fad7ef34d..abe16f6813 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X01.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X01.java @@ -9,7 +9,7 @@ package test.prefs.example; interface Example { /** - * + * * These possibilities include: * <ul> * <li>Formatting of header comments.</li> diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X16b.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X16b.java index 07e981b265..bf2461fe91 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X16b.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_descr/X16b.java @@ -5,7 +5,7 @@ public class X16b { * Asserts that an argument is legal. If the given boolean is not * <code>true</code>, an <code>IllegalArgumentException</code> is thrown. * The given message is included in that exception, to aid debugging. - * + * * @param expression * the outcode of the check * @param message diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X01.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X01.java index 7c3e25711c..a7c216adc9 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X01.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X01.java @@ -9,7 +9,7 @@ package test.prefs.example; interface Example { /** - * + * * These possibilities include: * <ul> * <li>Formatting of header comments.</li> diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X16b.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X16b.java index 845a07ecc1..61c43e70f7 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X16b.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/example/out/dont_indent_tags/X16b.java @@ -5,7 +5,7 @@ public class X16b { * Asserts that an argument is legal. If the given boolean is not * <code>true</code>, an <code>IllegalArgumentException</code> is thrown. * The given message is included in that exception, to aid debugging. - * + * * @param expression * the outcode of the check * @param message diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/clear_blank_lines/X07.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/clear_blank_lines/X07.java index 60861f3e2c..a3958e9932 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/clear_blank_lines/X07.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/clear_blank_lines/X07.java @@ -8,7 +8,7 @@ interface X07 { * <pre> * * - * + * * * public class Example { * final int a = 1; diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X02.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X02.java index 4a1514fec2..51a2d5cc79 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X02.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X02.java @@ -23,7 +23,7 @@ interface X02 { * * </pre> * - * + * * * * Descriptions of parameters and return values are best appended at end of diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X07.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X07.java index fc3e75e67b..0ce2052993 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X07.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/pre/out/default/X07.java @@ -6,7 +6,7 @@ interface X07 { * within javadoc comments: * * - * + * * * * @@ -15,7 +15,7 @@ interface X07 { * <pre> * * - * + * * * public class Example { * final int a = 1; @@ -27,7 +27,7 @@ interface X07 { * * </pre> * - * + * * * * Descriptions of parameters and return values are best appended at end of diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X04.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X04.java index fa56990392..3185b48547 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X04.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X04.java @@ -14,8 +14,8 @@ public interface X04 { * * </ul> * toto - * - * + * + * */ int foo(int a, int b); diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X05.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X05.java index c996b1aae9..ccb59812d8 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X05.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X05.java @@ -3,7 +3,7 @@ package test.html.ul; interface X05 { /** - * + * * Before P * <p> * Before UL diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X06.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X06.java index 90ebb8b394..c7b65107e3 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X06.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/html/ul/out/default/X06.java @@ -3,7 +3,7 @@ package test.html.ul; interface X06 { /** - * + * * <p> * <ul> * <li>Formatting of header comments.</li> diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/default/X02.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/default/X02.java index 37751e168c..dac6ab6653 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/default/X02.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/default/X02.java @@ -2,7 +2,7 @@ package test.tags.others; /** * @author Zhao - * + * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/dont_indent_tags/X02.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/dont_indent_tags/X02.java index 2bfdf0f310..38719de6ef 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/dont_indent_tags/X02.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/tags/others/out/dont_indent_tags/X02.java @@ -2,7 +2,7 @@ package test.tags.others; /** * @author Zhao - * + * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X06.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X06.java index dfa2744014..3d12bf551c 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X06.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X06.java @@ -4,7 +4,7 @@ public class X06 { /** * Creates the project location specification controls. - * + * * @param projectGroup * the parent composite * @param boolean - the initial enabled state of the widgets created diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X16.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X16.java index a580aec514..71cdc373a6 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X16.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X16.java @@ -6,7 +6,7 @@ public class X16 { * INTERNAL USE-ONLY Generate the byte for a problem method info that * correspond to a synthetic method that generate an access to a private * constructor. - * + * * @param methodBinding * org.eclipse.jdt.internal.compiler.nameloopkup. * SyntheticAccessMethodBinding diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X21.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X21.java index 44e4b15fc1..7db54d7e23 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X21.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X21.java @@ -6,7 +6,7 @@ public class X21 { * Returns a search pattern based on a given string pattern. The string * patterns support '*' wild-cards. The remaining parameters are used to * narrow down the type of expected results. - * + * * <br> * Examples: * <ul> @@ -48,19 +48,19 @@ public class X21 { * In case the element is a method, declarations of matching * methods in subtypes will also be found, allowing to find * declarations of abstract methods, etc.</li> - * + * * <li><code>IJavaSearchConstants.REFERENCES</code>: will search * references to the given element.</li> - * + * * <li><code>IJavaSearchConstants.ALL_OCCURRENCES</code>: will * search for either declarations or references as specified * above.</li> - * + * * <li><code>IJavaSearchConstants.IMPLEMENTORS</code>: for * interface, will find all types which implements a given * interface.</li> * </ul> - * + * * @param isCaseSensitive * indicates whether the search is case sensitive or not. * @return a search pattern on the given string pattern, or diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X23.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X23.java index 70902ca70f..a056936bfc 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X23.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X23.java @@ -69,7 +69,7 @@ public class X23 { * requesting additional information like source positions, full ASTs, * non-recursive sorting, etc.) * </p> - * + * * @param compilationUnit * the given compilation unit, which must be a working copy * @param positions diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X26.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X26.java index 557a113eeb..4260096450 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X26.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X26.java @@ -1,16 +1,16 @@ package test.wksp.eclipse; /** - * + * * A ControlEditor is a manager for a Control that appears above a composite and * tracks with the moving and resizing of that composite. It can be used to * display one control above another control. This could be used when editing a * control that does not have editing capabilities by using a text editor or for * launching a dialog by placing a button above a control. - * + * * <p> * Here is an example of using a ControlEditor: - * + * * <code><pre> * Canvas canvas = new Canvas(shell, SWT.BORDER); * canvas.setBounds(10, 10, 300, 300); diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X28d.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X28d.java index e7b9f7a545..c89d262736 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X28d.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X28d.java @@ -5,7 +5,7 @@ public class X28d { /** * Returns a complete node containing the contents of the subtree rooted at @key * in the receiver. Uses the public API. - * + * * @param key * key of subtree whose contents we want to copy. */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X32.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X32.java index 6a1535ce45..f09407c9b3 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X32.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X32.java @@ -6,7 +6,7 @@ public class X32 { * This method calls * <tt>realHandler.setURL(URL,String,String,int,String,String,String,String)</tt> * . - * + * * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" */ void foo() { diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X34.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X34.java index 049c90c4af..648c918062 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X34.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X34.java @@ -5,25 +5,25 @@ public class X34 { /** * Service property (named "service.ranking") identifying a * service's ranking number (of type <tt>java.lang.Integer</tt>). - * + * * <p> * This property may be supplied in the <tt>properties * Dictionary</tt> object passed to the * <tt>BundleContext.registerService</tt> method. - * + * * <p> * The service ranking is used by the Framework to determine the * <i>default</i> service to be returned from a call to the * {@link BundleContext#getServiceReference}method: If more than one service * implements the specified class, the <tt>ServiceReference</tt> object with * the highest ranking is returned. - * + * * <p> * The default ranking is zero (0). A service with a ranking of * <tt>Integer.MAX_VALUE</tt> is very likely to be returned as the default * service, whereas a service with a ranking of <tt>Integer.MIN_VALUE</tt> * is very unlikely to be returned. - * + * * <p> * If the supplied property value is not of type <tt>java.lang.Integer</tt>, * it is deemed to have a ranking value of zero. diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X06.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X06.java index 50deea5e6b..8f39cda3af 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X06.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X06.java @@ -4,7 +4,7 @@ public class X06 { /** * Creates the project location specification controls. - * + * * @param projectGroup * the parent composite * @param boolean - the initial enabled state of the widgets created diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X16.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X16.java index d8bd3e2c42..8f3d83d1f6 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X16.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X16.java @@ -6,7 +6,7 @@ public class X16 { * INTERNAL USE-ONLY Generate the byte for a problem method info that * correspond to a synthetic method that generate an access to a private * constructor. - * + * * @param methodBinding * org.eclipse.jdt.internal.compiler.nameloopkup. * SyntheticAccessMethodBinding diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X21.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X21.java index 0f9ef30762..5eb8e1d559 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X21.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X21.java @@ -6,7 +6,7 @@ public class X21 { * Returns a search pattern based on a given string pattern. The string * patterns support '*' wild-cards. The remaining parameters are used to * narrow down the type of expected results. - * + * * <br> * Examples: * <ul> @@ -46,17 +46,17 @@ public class X21 { * element is a method, declarations of matching methods in subtypes * will also be found, allowing to find declarations of abstract * methods, etc.</li> - * + * * <li><code>IJavaSearchConstants.REFERENCES</code>: will search * references to the given element.</li> - * + * * <li><code>IJavaSearchConstants.ALL_OCCURRENCES</code>: will search * for either declarations or references as specified above.</li> - * + * * <li><code>IJavaSearchConstants.IMPLEMENTORS</code>: for interface, * will find all types which implements a given interface.</li> * </ul> - * + * * @param isCaseSensitive * indicates whether the search is case sensitive or not. * @return a search pattern on the given string pattern, or diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X23.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X23.java index 369b9c55df..508333a976 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X23.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X23.java @@ -69,7 +69,7 @@ public class X23 { * requesting additional information like source positions, full ASTs, * non-recursive sorting, etc.) * </p> - * + * * @param compilationUnit * the given compilation unit, which must be a working copy * @param positions diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X28d.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X28d.java index 663daa194f..5ecb2c426f 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X28d.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_descr/X28d.java @@ -5,7 +5,7 @@ public class X28d { /** * Returns a complete node containing the contents of the subtree rooted at @key * in the receiver. Uses the public API. - * + * * @param key * key of subtree whose contents we want to copy. */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X06.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X06.java index 1cdd30bb00..11e6314c98 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X06.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X06.java @@ -4,7 +4,7 @@ public class X06 { /** * Creates the project location specification controls. - * + * * @param projectGroup * the parent composite * @param boolean - the initial enabled state of the widgets created diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X16.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X16.java index c44fed02dd..15e652f616 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X16.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X16.java @@ -6,7 +6,7 @@ public class X16 { * INTERNAL USE-ONLY Generate the byte for a problem method info that * correspond to a synthetic method that generate an access to a private * constructor. - * + * * @param methodBinding * org.eclipse.jdt.internal.compiler.nameloopkup. * SyntheticAccessMethodBinding diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X21.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X21.java index f3f28838ae..918e8e0f4e 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X21.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X21.java @@ -6,7 +6,7 @@ public class X21 { * Returns a search pattern based on a given string pattern. The string * patterns support '*' wild-cards. The remaining parameters are used to * narrow down the type of expected results. - * + * * <br> * Examples: * <ul> @@ -43,17 +43,17 @@ public class X21 { * declarations matching with the corresponding element. In case the element * is a method, declarations of matching methods in subtypes will also be * found, allowing to find declarations of abstract methods, etc.</li> - * + * * <li><code>IJavaSearchConstants.REFERENCES</code>: will search references * to the given element.</li> - * + * * <li><code>IJavaSearchConstants.ALL_OCCURRENCES</code>: will search for * either declarations or references as specified above.</li> - * + * * <li><code>IJavaSearchConstants.IMPLEMENTORS</code>: for interface, will * find all types which implements a given interface.</li> * </ul> - * + * * @param isCaseSensitive * indicates whether the search is case sensitive or not. * @return a search pattern on the given string pattern, or diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X23.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X23.java index b95fafc0a6..e81084b33c 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X23.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X23.java @@ -69,7 +69,7 @@ public class X23 { * requesting additional information like source positions, full ASTs, * non-recursive sorting, etc.) * </p> - * + * * @param compilationUnit * the given compilation unit, which must be a working copy * @param positions diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X28d.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X28d.java index f24280fa83..135cbb26ee 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X28d.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/eclipse/out/dont_indent_tags/X28d.java @@ -5,7 +5,7 @@ public class X28d { /** * Returns a complete node containing the contents of the subtree rooted at @key * in the receiver. Uses the public API. - * + * * @param key * key of subtree whose contents we want to copy. */ diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X03.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X03.java index 0b45c28ee1..9bb356f62b 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X03.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X03.java @@ -13,7 +13,7 @@ package test.wksp.ganymede; * </em>}</li> * </ul> * </p> - * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getAuditedMetricTarget() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='\'ecore::EDoubleObject\''" diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X04.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X04.java index bcbe4593ef..bae64e49ec 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X04.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/clear_blank_lines/X04.java @@ -5,7 +5,7 @@ package test.wksp.ganymede; * <em><b>Feature Value Spec</b></em>'. <!-- end-user-doc --> <!-- * begin-model-doc --> Value specification associated with a specific feature * <!-- end-model-doc --> - * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getFeatureValueSpec() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='ValueSpec'" diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X03.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X03.java index 1b2bf8bf0d..3ea8c45271 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X03.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X03.java @@ -3,11 +3,11 @@ package test.wksp.ganymede; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Audited Metric Target</b></em>'. <!-- end-user-doc --> - * + * * <!-- begin-model-doc --> Target metric which can be evaluated by audit rule. * The target context here is the metric rule resulting type classifier <!-- * end-model-doc --> - * + * * <p> * The following features are supported: * <ul> @@ -15,7 +15,7 @@ package test.wksp.ganymede; * </em>}</li> * </ul> * </p> - * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getAuditedMetricTarget() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='\'ecore::EDoubleObject\''" diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X04.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X04.java index b524edb175..66b7101b61 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X04.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/default/X04.java @@ -3,11 +3,11 @@ package test.wksp.ganymede; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Feature Value Spec</b></em>'. <!-- end-user-doc --> - * + * * <!-- begin-model-doc --> Value specification associated with a specific * feature <!-- end-model-doc --> - * - * + * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getFeatureValueSpec() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='ValueSpec'" diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X03.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X03.java index deea51380a..27f03dd886 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X03.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X03.java @@ -3,11 +3,11 @@ package test.wksp.ganymede; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Audited Metric Target</b></em>'. <!-- end-user-doc --> - * + * * <!-- begin-model-doc --> Target metric which can be evaluated by audit rule. * The target context here is the metric rule resulting type classifier <!-- * end-model-doc --> - * + * * <p> * The following features are supported: * <ul> @@ -15,7 +15,7 @@ package test.wksp.ganymede; * </em>}</li> * </ul> * </p> - * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getAuditedMetricTarget() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='\'ecore::EDoubleObject\''" diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X04.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X04.java index 7826e2ce6d..ae026d294b 100644 --- a/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X04.java +++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJavadoc/test/wksp/ganymede/out/dont_indent_tags/X04.java @@ -3,11 +3,11 @@ package test.wksp.ganymede; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Feature Value Spec</b></em>'. <!-- end-user-doc --> - * + * * <!-- begin-model-doc --> Value specification associated with a specific * feature <!-- end-model-doc --> - * - * + * + * * @see org.eclipse.gmf.mappings.GMFMapPackage#getFeatureValueSpec() * @model annotation= * "http://www.eclipse.org/gmf/2005/constraints/meta def='ValueSpec'" diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java index b2d59c04fe..f9e915938c 100644 --- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java +++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,6 +14,7 @@ * Ray V. (voidstar@gmail.com) - Contribution for bug 282988 * Jesper S Moller - Contribution for bug 402892 * Contribution for bug 402818 + * Robin Stocker - Bug 49619 - [formatting] comment formatter leaves whitespace in comments *******************************************************************************/ package org.eclipse.jdt.internal.formatter; @@ -3718,8 +3719,10 @@ public class Scribe implements IJavaDocTagConstants { if (linesGap > 0) { this.javadocGapLinesBuffer.setLength(0); if (lineCount > 0) { - // TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619 - this.javadocGapLinesBuffer.append( ' '); + // only add trailing space if one was there before (bug 49619) + if (this.scanner.source[start] == ' ') { + this.javadocGapLinesBuffer.append(' '); + } } for (int i = 0; i < linesGap ; i++) { if (clearBlankLines && lineCount >= newLines) { @@ -3727,9 +3730,9 @@ public class Scribe implements IJavaDocTagConstants { // so remove any remaining blanks and leave if (textEndPosition >= start) { if (output == null) { - addReplaceEdit(start, textEndPosition, this.javadocGapLinesBuffer.toString()); + addReplaceEdit(start, textEndPosition, " "); //$NON-NLS-1$ } else { - output.append(this.javadocGapLinesBuffer); + output.append(' '); } } return; @@ -3780,8 +3783,10 @@ public class Scribe implements IJavaDocTagConstants { // Insert new lines as not enough was encountered while scanning the whitespaces this.javadocGapLinesBuffer.setLength(0); if (lineCount > 0) { - // TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619 - this.javadocGapLinesBuffer.append( ' '); + // only add trailing space if one was there before (bug 49619) + if (this.scanner.source[start] == ' ') { + this.javadocGapLinesBuffer.append(' '); + } } for (int i = lineCount; i < newLines-1; i++) { printJavadocNewLine(this.javadocGapLinesBuffer); @@ -3811,8 +3816,10 @@ public class Scribe implements IJavaDocTagConstants { this.javadocGapLinesBuffer.setLength(0); if (this.scanner.linePtr > linePtr) { if (lineCount > 0) { - // TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619 - this.javadocGapLinesBuffer.append(' '); + // only add trailing space if one was there before (bug 49619) + if (this.scanner.source[start] == ' ') { + this.javadocGapLinesBuffer.append(' '); + } } this.javadocGapLinesBuffer.append(this.lineSeparator); this.column = 1; |