Skip to content

Commit aff1ccc

Browse files
committed
Mark DefaultPartitioner for removal
FastPartitioner is the replacement since Eclipse 3.1. Organized tests: * mark DefaultPartitionerTest as deprecated * renamed DefaultPartitionerZeroLengthTest to match the fact that it uses FastPartitioner
1 parent 75f86b9 commit aff1ccc

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

bundles/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitioner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2005 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -40,7 +40,7 @@
4040
* </ul>
4141
* <p>
4242
* Clients may implement this interface and its extension interfaces or use the standard
43-
* implementation <code>DefaultPartitioner</code>.
43+
* implementation <code>FastPartitioner</code>.
4444
* </p>
4545
*
4646
* @see org.eclipse.jface.text.IDocumentPartitionerExtension

bundles/org.eclipse.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2007 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -37,8 +37,6 @@
3737
import org.eclipse.jface.text.TypedPosition;
3838
import org.eclipse.jface.text.TypedRegion;
3939

40-
41-
4240
/**
4341
* A standard implementation of a document partitioner. It uses a partition
4442
* token scanner to scan the document and to determine the document's
@@ -53,7 +51,7 @@
5351
* @since 3.14
5452
* @deprecated As of 3.1, replaced by {@link org.eclipse.jface.text.rules.FastPartitioner} instead
5553
*/
56-
@Deprecated
54+
@Deprecated(forRemoval= true, since="2025-03")
5755
public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartitionerExtension, IDocumentPartitionerExtension2, IDocumentPartitionerExtension3 {
5856

5957
/**

tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/JFaceTextTestSuite.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -26,9 +26,8 @@
2626
import org.eclipse.jface.text.tests.contentassist.IncrementalAsyncContentAssistTests;
2727
import org.eclipse.jface.text.tests.reconciler.AbstractReconcilerTest;
2828
import org.eclipse.jface.text.tests.reconciler.FastAbstractReconcilerTest;
29-
import org.eclipse.jface.text.tests.rules.DefaultPartitionerTest;
30-
import org.eclipse.jface.text.tests.rules.DefaultPartitionerZeroLengthTest;
3129
import org.eclipse.jface.text.tests.rules.FastPartitionerTest;
30+
import org.eclipse.jface.text.tests.rules.FastPartitionerZeroLengthTest;
3231
import org.eclipse.jface.text.tests.rules.ScannerColumnTest;
3332
import org.eclipse.jface.text.tests.rules.WordRuleTest;
3433
import org.eclipse.jface.text.tests.source.AnnotationRulerColumnTest;
@@ -64,8 +63,7 @@
6463
AbstractReconcilerTest.class,
6564
FastAbstractReconcilerTest.class,
6665

67-
DefaultPartitionerTest.class,
68-
DefaultPartitionerZeroLengthTest.class,
66+
FastPartitionerZeroLengthTest.class,
6967
FastPartitionerTest.class,
7068
ScannerColumnTest.class,
7169
WordRuleTest.class,

tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/DefaultPartitionerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005, 2008 IBM Corporation and others.
2+
* Copyright (c) 2005,2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,7 @@
1919
import org.eclipse.jface.text.rules.DefaultPartitioner;
2020
import org.eclipse.jface.text.rules.IPartitionTokenScanner;
2121

22+
@Deprecated
2223
public class DefaultPartitionerTest extends FastPartitionerTest {
2324
@Override
2425
protected IDocumentPartitioner createPartitioner(IPartitionTokenScanner scanner) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/**
3535
* @since 3.0
3636
*/
37-
public class DefaultPartitionerZeroLengthTest {
37+
public class FastPartitionerZeroLengthTest {
3838

3939
private static final String COMMENT= "comment";
4040
private static final String DEFAULT= IDocument.DEFAULT_CONTENT_TYPE;

0 commit comments

Comments
 (0)