Lines 9618-9624
Link Here
|
9618 |
} |
9618 |
} |
9619 |
|
9619 |
|
9620 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=208541 |
9620 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=208541 |
9621 |
public void test688() { |
9621 |
public void test688a() { |
9622 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9622 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9623 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9623 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9624 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9624 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
Lines 9628-9633
Link Here
|
9628 |
runTest(codeFormatter, "test688", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9628 |
runTest(codeFormatter, "test688", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9629 |
} |
9629 |
} |
9630 |
|
9630 |
|
|
|
9631 |
public void test688b() { |
9632 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9633 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9634 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9635 |
IRegion[] regions = new IRegion[] { |
9636 |
new Region(18, 49) |
9637 |
}; |
9638 |
runTest(codeFormatter, "test688", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9639 |
} |
9640 |
|
9631 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=208541 |
9641 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=208541 |
9632 |
public void test689() { |
9642 |
public void test689() { |
9633 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9643 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
Lines 9695-9698
Link Here
|
9695 |
}; |
9705 |
}; |
9696 |
runTest(codeFormatter, "test693", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9706 |
runTest(codeFormatter, "test693", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9697 |
} |
9707 |
} |
|
|
9708 |
|
9709 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=213283 |
9710 |
public void test694a() { |
9711 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9712 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9713 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9714 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9715 |
IRegion[] regions = new IRegion[] { |
9716 |
new Region(33, 32) |
9717 |
}; |
9718 |
runTest(codeFormatter, "test694", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9719 |
} |
9720 |
|
9721 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=213283 |
9722 |
public void test694b() { |
9723 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9724 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9725 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9726 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9727 |
IRegion[] regions = new IRegion[] { |
9728 |
new Region(33, 33) |
9729 |
}; |
9730 |
runTest(codeFormatter, "test694", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9731 |
} |
9732 |
|
9733 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=213284 |
9734 |
public void test695() { |
9735 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9736 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9737 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9738 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9739 |
IRegion[] regions = new IRegion[] { |
9740 |
new Region(59, 1) |
9741 |
}; |
9742 |
runTest(codeFormatter, "test695", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9743 |
} |
9744 |
|
9745 |
// variation on bugs 208541, 213283, 213284 |
9746 |
public void test696a() { |
9747 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9748 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9749 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9750 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9751 |
IRegion[] regions = new IRegion[] { |
9752 |
new Region(17, 56) |
9753 |
}; |
9754 |
runTest(codeFormatter, "test696a", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9755 |
} |
9756 |
|
9757 |
// variation on bugs 208541, 213283, 213284 |
9758 |
public void test696b() { |
9759 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9760 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9761 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9762 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9763 |
IRegion[] regions = new IRegion[] { |
9764 |
new Region(17, 57) |
9765 |
}; |
9766 |
runTest(codeFormatter, "test696b", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9767 |
} |
9768 |
|
9769 |
// variation on bugs 208541, 213283, 213284 |
9770 |
public void test697a() { |
9771 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9772 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9773 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9774 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9775 |
IRegion[] regions = new IRegion[] { |
9776 |
new Region(17, 55) // end of line selection |
9777 |
}; |
9778 |
runTest(codeFormatter, "test697", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9779 |
} |
9780 |
|
9781 |
// variation on bugs 208541, 213283, 213284 |
9782 |
public void test697b() { |
9783 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9784 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9785 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9786 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9787 |
IRegion[] regions = new IRegion[] { |
9788 |
new Region(17, 56) // end of line selection + 1 |
9789 |
}; |
9790 |
runTest(codeFormatter, "test697", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9791 |
} |
9792 |
|
9793 |
// variation on bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=208541 |
9794 |
// public void testONLY_698() { |
9795 |
// final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9796 |
// DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9797 |
// preferences.line_separator = "\n";//$NON-NLS-1$ |
9798 |
// DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9799 |
// IRegion[] regions = new IRegion[] { |
9800 |
// new Region(17, 40) // partial line selection |
9801 |
// }; |
9802 |
// runTest(codeFormatter, "test698", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9803 |
// } |
9804 |
|
9805 |
// variation on bugs 208541, 213283, 213284 |
9806 |
public void test699() { |
9807 |
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); |
9808 |
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); |
9809 |
preferences.line_separator = "\n";//$NON-NLS-1$ |
9810 |
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); |
9811 |
IRegion[] regions = new IRegion[] { |
9812 |
new Region(0, 78) // nothing selected --> format all |
9813 |
}; |
9814 |
runTest(codeFormatter, "test699", "A.java", CodeFormatter.K_UNKNOWN, 0, false, regions, "\n");//$NON-NLS-1$ //$NON-NLS-2$ |
9815 |
} |
9698 |
} |
9816 |
} |