View | Details | Raw Unified | Return to bug 311582 | Differences between
and this patch

Collapse All | Expand All

(-)buildnotes_jdt-core.html (+19 lines)
Lines 48-53 Link Here
48
<br>Project org.eclipse.jdt.core v_A50
48
<br>Project org.eclipse.jdt.core v_A50
49
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A50">cvs</a>).
49
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A50">cvs</a>).
50
<h2>What's new in this drop</h2>
50
<h2>What's new in this drop</h2>
51
<ul>
52
<li>
53
Added a new preference to switch on/off the usage of the disabling/enabling tags of the formatter.
54
<p>
55
This new preference is controlled with the option:</p>
56
<code>DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS</code>
57
<pre>
58
/**
59
 * FORMATTER / Option to use the disabling and enabling tags defined respectively by the {@link #FORMATTER_DISABLING_TAG} and the {@link #FORMATTER_ENABLING_TAG} options.
60
 *     - option id:         "org.eclipse.jdt.core.formatter.use_on_off_tags"
61
 *     - possible values:   TRUE / FALSE
62
 *     - default:           FALSE
63
 * 
64
 * @since 3.6
65
 */
66
</pre>
67
See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311582">311582</a> for more details.
68
</li>
69
</ul>
51
70
52
<h3>Problem Reports Fixed</h3>
71
<h3>Problem Reports Fixed</h3>
53
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302295">302295</a>
72
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302295">302295</a>
(-)formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java (-3 / +14 lines)
Lines 860-869 Link Here
860
	public static final String FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.continuation_indentation_for_array_initializer";	//$NON-NLS-1$
860
	public static final String FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.continuation_indentation_for_array_initializer";	//$NON-NLS-1$
861
	/**
861
	/**
862
	 * <pre>
862
	 * <pre>
863
	 * FORMATTER / Option to use the disabling and enabling tags defined respectively by the {@link #FORMATTER_DISABLING_TAG} and the {@link #FORMATTER_ENABLING_TAG} options.
864
	 *     - option id:         "org.eclipse.jdt.core.formatter.use_on_off_tags"
865
	 *     - possible values:   TRUE / FALSE
866
	 *     - default:           FALSE
867
	 * </pre>
868
	 * @since 3.6
869
	 */
870
	public static final String FORMATTER_USE_ON_OFF_TAGS = JavaCore.PLUGIN_ID + ".formatter.use_on_off_tags";	//$NON-NLS-1$
871
	/**
872
	 * <pre>
863
	 * FORMATTER / Option to define the tag to put in a comment to disable the formatting.
873
	 * FORMATTER / Option to define the tag to put in a comment to disable the formatting.
864
	 * See the {@link #FORMATTER_ENABLING_TAG} option to re-enable it.
874
	 *     - option id:         "org.eclipse.jdt.core.formatter.disabling_tag"
865
	 *     - possible values:   String, with constraints mentioned below
875
	 *     - possible values:   String, with constraints mentioned below
866
	 *     - default:           ""
876
	 *     - default:           ""
877
	 * 
878
	 * See the {@link #FORMATTER_ENABLING_TAG} option to re-enable it.
867
	 * </pre>
879
	 * </pre>
868
	 * 
880
	 * 
869
	 * <p>
881
	 * <p>
Lines 945-952 Link Here
945
	public static final String FORMATTER_DISABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.disabling_tag";	//$NON-NLS-1$
957
	public static final String FORMATTER_DISABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.disabling_tag";	//$NON-NLS-1$
946
	/**
958
	/**
947
	 * <pre>
959
	 * <pre>
948
	 * FORMATTER / Option to define the tag to put in a comment to re-enable the
960
	 * FORMATTER / Option to define the tag to put in a comment to re-enable the formatting after it has been disabled (see {@link #FORMATTER_DISABLING_TAG})
949
	 * formatting after it has been disabled (see {@link #FORMATTER_DISABLING_TAG})
950
	 *     - option id:         "org.eclipse.jdt.core.formatter.enabling_tag"
961
	 *     - option id:         "org.eclipse.jdt.core.formatter.enabling_tag"
951
	 *     - possible values:   String, with constraints mentioned below
962
	 *     - possible values:   String, with constraints mentioned below
952
	 *     - default:           ""
963
	 *     - default:           ""
(-)formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java (+8 lines)
Lines 117-122 Link Here
117
	public boolean comment_insert_new_line_for_parameter;
117
	public boolean comment_insert_new_line_for_parameter;
118
	public int comment_line_length;
118
	public int comment_line_length;
119
119
120
	public boolean use_tags;
120
	public char[] disabling_tag;
121
	public char[] disabling_tag;
121
	public char[] enabling_tag;
122
	public char[] enabling_tag;
122
123
Lines 618-623 Link Here
618
		options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, this.wrap_before_binary_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
619
		options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, this.wrap_before_binary_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
619
		options.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, this.disabling_tag == null ? Util.EMPTY_STRING : new String(this.disabling_tag));
620
		options.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, this.disabling_tag == null ? Util.EMPTY_STRING : new String(this.disabling_tag));
620
		options.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, this.enabling_tag == null ? Util.EMPTY_STRING : new String(this.enabling_tag));
621
		options.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, this.enabling_tag == null ? Util.EMPTY_STRING : new String(this.enabling_tag));
622
		options.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, this.use_tags ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
621
		return options;
623
		return options;
622
	}
624
	}
623
625
Lines 1955-1960 Link Here
1955
		if (wrapBeforeBinaryOperatorOption != null) {
1957
		if (wrapBeforeBinaryOperatorOption != null) {
1956
			this.wrap_before_binary_operator = DefaultCodeFormatterConstants.TRUE.equals(wrapBeforeBinaryOperatorOption);
1958
			this.wrap_before_binary_operator = DefaultCodeFormatterConstants.TRUE.equals(wrapBeforeBinaryOperatorOption);
1957
		}
1959
		}
1960
		final Object useTags = settings.get(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS);
1961
		if (useTags != null) {
1962
			this.use_tags = DefaultCodeFormatterConstants.TRUE.equals(useTags);
1963
		}
1958
		final Object disableTagOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG);
1964
		final Object disableTagOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG);
1959
		if (disableTagOption != null) {
1965
		if (disableTagOption != null) {
1960
			if (disableTagOption instanceof String) {
1966
			if (disableTagOption instanceof String) {
Lines 2299-2304 Link Here
2299
		this.tab_char = TAB; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49081
2305
		this.tab_char = TAB; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49081
2300
		this.use_tabs_only_for_leading_indentations = false;
2306
		this.use_tabs_only_for_leading_indentations = false;
2301
		this.wrap_before_binary_operator = true;
2307
		this.wrap_before_binary_operator = true;
2308
		this.use_tags = false;
2302
	}
2309
	}
2303
2310
2304
	public void setEclipseDefaultSettings() {
2311
	public void setEclipseDefaultSettings() {
Lines 2570-2574 Link Here
2570
		this.tab_char = MIXED;
2577
		this.tab_char = MIXED;
2571
		this.use_tabs_only_for_leading_indentations = false;
2578
		this.use_tabs_only_for_leading_indentations = false;
2572
		this.wrap_before_binary_operator = true;
2579
		this.wrap_before_binary_operator = true;
2580
		this.use_tags = false;
2573
	}
2581
	}
2574
}
2582
}
(-)formatter/org/eclipse/jdt/internal/formatter/Scribe.java (-12 / +15 lines)
Lines 106-112 Link Here
106
	int blank_lines_between_import_groups = -1;
106
	int blank_lines_between_import_groups = -1;
107
107
108
	/** disabling */
108
	/** disabling */
109
	boolean editsEnabled = true;
109
	boolean editsEnabled;
110
	boolean useTags;
110
111
111
	/* Comments formatting */
112
	/* Comments formatting */
112
	private static final int INCLUDE_BLOCK_COMMENTS = CodeFormatter.F_INCLUDE_COMMENTS | CodeFormatter.K_MULTI_LINE_COMMENT;
113
	private static final int INCLUDE_BLOCK_COMMENTS = CodeFormatter.F_INCLUDE_COMMENTS | CodeFormatter.K_MULTI_LINE_COMMENT;
Lines 1382-1402 Link Here
1382
	}
1383
	}
1383
1384
1384
	private void initializeScanner(long sourceLevel, DefaultCodeFormatterOptions preferences) {
1385
	private void initializeScanner(long sourceLevel, DefaultCodeFormatterOptions preferences) {
1385
		this.disablingTag = preferences.disabling_tag;
1386
		this.useTags = preferences.use_tags;
1386
		this.enablingTag = preferences.enabling_tag;
1387
		char[][] taskTags = null;
1387
		char[][] taskTags;
1388
		if (this.useTags) {
1388
		if (this.disablingTag == null) {
1389
			this.disablingTag = preferences.disabling_tag;
1389
			if (this.enablingTag == null) {
1390
			this.enablingTag = preferences.enabling_tag;
1390
				taskTags = null;
1391
			if (this.disablingTag == null) {
1392
				if (this.enablingTag != null) {
1393
					taskTags = new char[][] { this.enablingTag };
1394
				}
1395
			} else if (this.enablingTag == null) {
1396
				taskTags = new char[][] { this.disablingTag };
1391
			} else {
1397
			} else {
1392
				taskTags = new char[][] { this.enablingTag };
1398
				taskTags = new char[][] { this.disablingTag, this.enablingTag };
1393
			}
1399
			}
1394
		} else if (this.enablingTag == null) {
1395
			taskTags = new char[][] { this.disablingTag };
1396
		} else {
1397
			taskTags = new char[][] { this.disablingTag, this.enablingTag };
1398
		}
1400
		}
1399
		this.scanner = new Scanner(true, true, false/*nls*/, sourceLevel/*sourceLevel*/, taskTags, null/*taskPriorities*/, true/*taskCaseSensitive*/);
1401
		this.scanner = new Scanner(true, true, false/*nls*/, sourceLevel/*sourceLevel*/, taskTags, null/*taskPriorities*/, true/*taskCaseSensitive*/);
1402
		this.editsEnabled = true;
1400
	}
1403
	}
1401
1404
1402
	private void initFormatterCommentParser() {
1405
	private void initFormatterCommentParser() {
(-)src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java (+21 lines)
Lines 101-106 Link Here
101
	);
101
	);
102
}
102
}
103
public void testBug027079a1() throws JavaModelException {
103
public void testBug027079a1() throws JavaModelException {
104
	this.formatterPrefs.use_tags = true;
104
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
105
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
105
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
106
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
106
	String source =
107
	String source =
Lines 130-135 Link Here
130
	);
131
	);
131
}
132
}
132
public void testBug027079a2() throws JavaModelException {
133
public void testBug027079a2() throws JavaModelException {
134
	this.formatterPrefs.use_tags = true;
133
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
135
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
134
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
136
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
135
	String source =
137
	String source =
Lines 159-164 Link Here
159
	);
161
	);
160
}
162
}
161
public void testBug027079a3() throws JavaModelException {
163
public void testBug027079a3() throws JavaModelException {
164
	this.formatterPrefs.use_tags = true;
162
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
165
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
163
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
166
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
164
	String source =
167
	String source =
Lines 188-193 Link Here
188
	);
191
	);
189
}
192
}
190
public void testBug027079a4() throws JavaModelException {
193
public void testBug027079a4() throws JavaModelException {
194
	this.formatterPrefs.use_tags = true;
191
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
195
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
192
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
196
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
193
	String source =
197
	String source =
Lines 218-223 Link Here
218
	);
222
	);
219
}
223
}
220
public void testBug027079b() throws JavaModelException {
224
public void testBug027079b() throws JavaModelException {
225
	this.formatterPrefs.use_tags = true;
221
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
226
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
222
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
227
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
223
	String source =
228
	String source =
Lines 256-261 Link Here
256
	);
261
	);
257
}
262
}
258
public void testBug027079c() throws JavaModelException {
263
public void testBug027079c() throws JavaModelException {
264
	this.formatterPrefs.use_tags = true;
259
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
265
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
260
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
266
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
261
	String source =
267
	String source =
Lines 305-310 Link Here
305
	);
311
	);
306
}
312
}
307
public void testBug027079c2() throws JavaModelException {
313
public void testBug027079c2() throws JavaModelException {
314
	this.formatterPrefs.use_tags = true;
308
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
315
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
309
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
316
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
310
	String source =
317
	String source =
Lines 352-357 Link Here
352
	);
359
	);
353
}
360
}
354
public void testBug027079d() throws JavaModelException {
361
public void testBug027079d() throws JavaModelException {
362
	this.formatterPrefs.use_tags = true;
355
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
363
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
356
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
364
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
357
	String source =
365
	String source =
Lines 386-391 Link Here
386
		true/*repeat*/);
394
		true/*repeat*/);
387
}
395
}
388
public void testBug027079d2() throws JavaModelException {
396
public void testBug027079d2() throws JavaModelException {
397
	this.formatterPrefs.use_tags = true;
389
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
398
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
390
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
399
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
391
	String source =
400
	String source =
Lines 420-425 Link Here
420
		true/*repeat*/);
429
		true/*repeat*/);
421
}
430
}
422
public void testBug027079d3() throws JavaModelException {
431
public void testBug027079d3() throws JavaModelException {
432
	this.formatterPrefs.use_tags = true;
423
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
433
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
424
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
434
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
425
	String source =
435
	String source =
Lines 454-459 Link Here
454
		true/*repeat*/);
464
		true/*repeat*/);
455
}
465
}
456
public void testBug027079d4() throws JavaModelException {
466
public void testBug027079d4() throws JavaModelException {
467
	this.formatterPrefs.use_tags = true;
457
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
468
	this.formatterPrefs.disabling_tag = "disable-formatter".toCharArray();
458
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
469
	this.formatterPrefs.enabling_tag = "enable-formatter".toCharArray();
459
	String source =
470
	String source =
Lines 488-493 Link Here
488
		true/*repeat*/);
499
		true/*repeat*/);
489
}
500
}
490
public void testBug027079e() throws JavaModelException {
501
public void testBug027079e() throws JavaModelException {
502
	this.formatterPrefs.use_tags = true;
491
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
503
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
492
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
504
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
493
	String source =
505
	String source =
Lines 517-522 Link Here
517
	);
529
	);
518
}
530
}
519
public void testBug027079f() throws JavaModelException {
531
public void testBug027079f() throws JavaModelException {
532
	this.formatterPrefs.use_tags = true;
520
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
533
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
521
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
534
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
522
	String source =
535
	String source =
Lines 546-551 Link Here
546
	);
559
	);
547
}
560
}
548
public void testBug027079f2() throws JavaModelException {
561
public void testBug027079f2() throws JavaModelException {
562
	this.formatterPrefs.use_tags = true;
549
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
563
	this.formatterPrefs.disabling_tag = "format: off".toCharArray();
550
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
564
	this.formatterPrefs.enabling_tag = "format: on".toCharArray();
551
	String source =
565
	String source =
Lines 575-580 Link Here
575
	);
589
	);
576
}
590
}
577
public void testBug027079f3() throws JavaModelException {
591
public void testBug027079f3() throws JavaModelException {
592
	this.formatterPrefs.use_tags = true;
578
	this.formatterPrefs.disabling_tag = "    format:  	  off    ".toCharArray();
593
	this.formatterPrefs.disabling_tag = "    format:  	  off    ".toCharArray();
579
	this.formatterPrefs.enabling_tag = "	format:	  	on	".toCharArray();
594
	this.formatterPrefs.enabling_tag = "	format:	  	on	".toCharArray();
580
	String source =
595
	String source =
Lines 604-609 Link Here
604
	);
619
	);
605
}
620
}
606
public void testBug027079f4() throws JavaModelException {
621
public void testBug027079f4() throws JavaModelException {
622
	this.formatterPrefs.use_tags = true;
607
	this.formatterPrefs.disabling_tag = "    format:  	  off    ".toCharArray();
623
	this.formatterPrefs.disabling_tag = "    format:  	  off    ".toCharArray();
608
	this.formatterPrefs.enabling_tag = "	format:	  	on	".toCharArray();
624
	this.formatterPrefs.enabling_tag = "	format:	  	on	".toCharArray();
609
	String source =
625
	String source =
Lines 5839-5844 Link Here
5839
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=304529"
5855
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=304529"
5840
 */
5856
 */
5841
public void testBug304529() {
5857
public void testBug304529() {
5858
	this.formatterPrefs.use_tags = true;
5842
	this.formatterPrefs.disabling_tag = "off".toCharArray();
5859
	this.formatterPrefs.disabling_tag = "off".toCharArray();
5843
	this.formatterPrefs.enabling_tag = null;
5860
	this.formatterPrefs.enabling_tag = null;
5844
	String source =
5861
	String source =
Lines 5851-5856 Link Here
5851
	formatSource(source);
5868
	formatSource(source);
5852
}
5869
}
5853
public void testBug304529b() {
5870
public void testBug304529b() {
5871
	this.formatterPrefs.use_tags = true;
5854
	this.formatterPrefs.disabling_tag = null;
5872
	this.formatterPrefs.disabling_tag = null;
5855
	this.formatterPrefs.enabling_tag = "on".toCharArray();
5873
	this.formatterPrefs.enabling_tag = "on".toCharArray();
5856
	String source =
5874
	String source =
Lines 5871-5876 Link Here
5871
}
5889
}
5872
public void testBug304529c() {
5890
public void testBug304529c() {
5873
	this.formatterPrefs = null;
5891
	this.formatterPrefs = null;
5892
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, DefaultCodeFormatterConstants.TRUE);
5874
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "off");
5893
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "off");
5875
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "");
5894
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "");
5876
	String source =
5895
	String source =
Lines 5884-5889 Link Here
5884
}
5903
}
5885
public void testBug304529d() {
5904
public void testBug304529d() {
5886
	this.formatterPrefs = null;
5905
	this.formatterPrefs = null;
5906
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, DefaultCodeFormatterConstants.TRUE);
5887
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "");
5907
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "");
5888
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "on");
5908
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "on");
5889
	String source =
5909
	String source =
Lines 5904-5909 Link Here
5904
}
5924
}
5905
public void testBug304529e() {
5925
public void testBug304529e() {
5906
	this.formatterPrefs = null;
5926
	this.formatterPrefs = null;
5927
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, DefaultCodeFormatterConstants.TRUE);
5907
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "off");
5928
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "off");
5908
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "on");
5929
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "on");
5909
	String source =
5930
	String source =
(-)src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java (+1 lines)
Lines 6262-6267 Link Here
6262
 */
6262
 */
6263
public void testBug305281() {
6263
public void testBug305281() {
6264
	this.formatterPrefs = null;
6264
	this.formatterPrefs = null;
6265
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, DefaultCodeFormatterConstants.TRUE);
6265
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "format: OFF");
6266
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, "format: OFF");
6266
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "format: ON");
6267
	this.formatterOptions.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, "format: ON");
6267
	String source = 
6268
	String source = 

Return to bug 311582