@@ -63,20 +63,28 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit
6363
6464
6565 /** The partitioner's scanner */
66+ @ Deprecated
6667 protected IPartitionTokenScanner fScanner ;
6768 /** The legal content types of this partitioner */
69+ @ Deprecated
6870 protected String [] fLegalContentTypes ;
6971 /** The partitioner's document */
72+ @ Deprecated
7073 protected IDocument fDocument ;
7174 /** The document length before a document change occurred */
75+ @ Deprecated
7276 protected int fPreviousDocumentLength ;
7377 /** The position updater used to for the default updating of partitions */
78+ @ Deprecated
7479 protected DefaultPositionUpdater fPositionUpdater ;
7580 /** The offset at which the first changed partition starts */
81+ @ Deprecated
7682 protected int fStartOffset ;
7783 /** The offset at which the last changed partition ends */
84+ @ Deprecated
7885 protected int fEndOffset ;
7986 /**The offset at which a partition has been deleted */
87+ @ Deprecated
8088 protected int fDeleteOffset ;
8189 /**
8290 * The position category this partitioner uses to store the document's partitioning information.
@@ -101,23 +109,27 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit
101109 * @param scanner the scanner this partitioner is supposed to use
102110 * @param legalContentTypes the legal content types of this partitioner
103111 */
112+ @ Deprecated
104113 public DefaultPartitioner (IPartitionTokenScanner scanner , String [] legalContentTypes ) {
105114 fScanner = scanner ;
106115 fLegalContentTypes = TextUtilities .copy (legalContentTypes );
107116 fPositionCategory = CONTENT_TYPES_CATEGORY + hashCode ();
108117 fPositionUpdater = new DefaultPositionUpdater (fPositionCategory );
109118 }
110119
120+ @ Deprecated
111121 @ Override
112122 public String [] getManagingPositionCategories () {
113123 return new String [] { fPositionCategory };
114124 }
115125
126+ @ Deprecated
116127 @ Override
117128 public void connect (IDocument document ) {
118129 connect (document , false );
119130 }
120131
132+ @ Deprecated
121133 @ Override
122134 public void connect (IDocument document , boolean delayInitialization ) {
123135 Assert .isNotNull (document );
@@ -135,6 +147,7 @@ public void connect(IDocument document, boolean delayInitialization) {
135147 /*
136148 * @since 3.1
137149 */
150+ @ Deprecated
138151 protected final void checkInitialization () {
139152 if (!fIsInitialized ) {
140153 initialize ();
@@ -144,6 +157,7 @@ protected final void checkInitialization() {
144157 /**
145158 * Performs the initial partitioning of the partitioner's document.
146159 */
160+ @ Deprecated
147161 protected void initialize () {
148162 fIsInitialized = true ;
149163 fScanner .setRange (fDocument , 0 , fDocument .getLength ());
@@ -168,6 +182,7 @@ protected void initialize() {
168182 }
169183 }
170184
185+ @ Deprecated
171186 @ Override
172187 public void disconnect () {
173188
@@ -180,6 +195,7 @@ public void disconnect() {
180195 }
181196 }
182197
198+ @ Deprecated
183199 @ Override
184200 public void documentAboutToBeChanged (DocumentEvent e ) {
185201 if (fIsInitialized ) {
@@ -193,6 +209,7 @@ public void documentAboutToBeChanged(DocumentEvent e) {
193209 }
194210 }
195211
212+ @ Deprecated
196213 @ Override
197214 public boolean documentChanged (DocumentEvent e ) {
198215 if (fIsInitialized ) {
@@ -258,6 +275,7 @@ private IRegion createRegion() {
258275 }
259276 }
260277
278+ @ Deprecated
261279 @ Override
262280 public IRegion documentChanged2 (DocumentEvent e ) {
263281
@@ -397,6 +415,7 @@ public IRegion documentChanged2(DocumentEvent e) {
397415 * @param offset the offset for which to search the closest position
398416 * @return the closest position in the partitioner's category
399417 */
418+ @ Deprecated
400419 protected TypedPosition findClosestPosition (int offset ) {
401420
402421 try {
@@ -428,6 +447,7 @@ protected TypedPosition findClosestPosition(int offset) {
428447 }
429448
430449
450+ @ Deprecated
431451 @ Override
432452 public String getContentType (int offset ) {
433453 checkInitialization ();
@@ -440,6 +460,7 @@ public String getContentType(int offset) {
440460 return IDocument .DEFAULT_CONTENT_TYPE ;
441461 }
442462
463+ @ Deprecated
443464 @ Override
444465 public ITypedRegion getPartition (int offset ) {
445466 checkInitialization ();
@@ -490,11 +511,13 @@ public ITypedRegion getPartition(int offset) {
490511 return new TypedRegion (0 , fDocument .getLength (), IDocument .DEFAULT_CONTENT_TYPE );
491512 }
492513
514+ @ Deprecated
493515 @ Override
494516 public ITypedRegion [] computePartitioning (int offset , int length ) {
495517 return computePartitioning (offset , length , false );
496518 }
497519
520+ @ Deprecated
498521 @ Override
499522 public String [] getLegalContentTypes () {
500523 return TextUtilities .copy (fLegalContentTypes );
@@ -506,6 +529,7 @@ public String[] getLegalContentTypes() {
506529 * @param contentType the content type to check
507530 * @return <code>true</code> if the content type is a legal content type
508531 */
532+ @ Deprecated
509533 protected boolean isSupportedContentType (String contentType ) {
510534 if (contentType != null ) {
511535 for (String fLegalContentType : fLegalContentTypes ) {
@@ -526,6 +550,7 @@ protected boolean isSupportedContentType(String contentType) {
526550 * @param token the token whose content type is to be determined
527551 * @return the token's content type
528552 */
553+ @ Deprecated
529554 protected String getTokenContentType (IToken token ) {
530555 Object data = token .getData ();
531556 if (data instanceof String ) {
@@ -536,11 +561,13 @@ protected String getTokenContentType(IToken token) {
536561
537562 /* zero-length partition support */
538563
564+ @ Deprecated
539565 @ Override
540566 public String getContentType (int offset , boolean preferOpenPartitions ) {
541567 return getPartition (offset , preferOpenPartitions ).getType ();
542568 }
543569
570+ @ Deprecated
544571 @ Override
545572 public ITypedRegion getPartition (int offset , boolean preferOpenPartitions ) {
546573 ITypedRegion region = getPartition (offset );
@@ -558,6 +585,7 @@ public ITypedRegion getPartition(int offset, boolean preferOpenPartitions) {
558585 return region ;
559586 }
560587
588+ @ Deprecated
561589 @ Override
562590 public ITypedRegion [] computePartitioning (int offset , int length , boolean includeZeroLengthPartitions ) {
563591 checkInitialization ();
@@ -681,6 +709,7 @@ private int getFirstIndexStartingAfterOffset(Position[] positions, int offset) {
681709 return j ;
682710 }
683711
712+ @ Deprecated
684713 @ Override
685714 public void startRewriteSession (DocumentRewriteSession session ) throws IllegalStateException {
686715 if (fActiveRewriteSession != null ) {
@@ -689,13 +718,15 @@ public void startRewriteSession(DocumentRewriteSession session) throws IllegalSt
689718 fActiveRewriteSession = session ;
690719 }
691720
721+ @ Deprecated
692722 @ Override
693723 public void stopRewriteSession (DocumentRewriteSession session ) {
694724 if (fActiveRewriteSession == session ) {
695725 flushRewriteSession ();
696726 }
697727 }
698728
729+ @ Deprecated
699730 @ Override
700731 public DocumentRewriteSession getActiveRewriteSession () {
701732 return fActiveRewriteSession ;
@@ -706,6 +737,7 @@ public DocumentRewriteSession getActiveRewriteSession() {
706737 *
707738 * @since 3.1
708739 */
740+ @ Deprecated
709741 protected final void flushRewriteSession () {
710742 fActiveRewriteSession = null ;
711743
0 commit comments