Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Replace(int offset, int newOffset, int length, String text) {
*
* @param source the source text store
*/
@Deprecated
public SequentialRewriteTextStore(ITextStore source) {
fReplaceList= new LinkedList<>();
fSource= source;
Expand All @@ -69,11 +70,13 @@ public SequentialRewriteTextStore(ITextStore source) {
*
* @return the source store of this rewrite store
*/
@Deprecated
public ITextStore getSourceStore() {
commit();
return fSource;
}

@Deprecated
@Override
public void replace(int offset, int length, String text) {
if (text == null) {
Expand Down Expand Up @@ -113,12 +116,14 @@ public void replace(int offset, int length, String text) {
}
}

@Deprecated
@Override
public void set(String text) {
fSource.set(text);
fReplaceList.clear();
}

@Deprecated
@Override
public String get(int offset, int length) {

Expand Down Expand Up @@ -178,6 +183,7 @@ private static final int getDelta(Replace replace) {
return replace.newOffset - replace.offset + replace.text.length() - replace.length;
}

@Deprecated
@Override
public char get(int offset) {
if (fReplaceList.isEmpty()) {
Expand Down Expand Up @@ -216,6 +222,7 @@ public char get(int offset) {
}
}

@Deprecated
@Override
public int getLength() {
if (fReplaceList.isEmpty()) {
Expand All @@ -229,6 +236,7 @@ public int getLength() {
/**
* Disposes this rewrite store.
*/
@Deprecated
public void dispose() {
fReplaceList= null;
fSource= null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,28 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit


/** The partitioner's scanner */
@Deprecated
protected IPartitionTokenScanner fScanner;
/** The legal content types of this partitioner */
@Deprecated
protected String[] fLegalContentTypes;
/** The partitioner's document */
@Deprecated
protected IDocument fDocument;
/** The document length before a document change occurred */
@Deprecated
protected int fPreviousDocumentLength;
/** The position updater used to for the default updating of partitions */
@Deprecated
protected DefaultPositionUpdater fPositionUpdater;
/** The offset at which the first changed partition starts */
@Deprecated
protected int fStartOffset;
/** The offset at which the last changed partition ends */
@Deprecated
protected int fEndOffset;
/**The offset at which a partition has been deleted */
@Deprecated
protected int fDeleteOffset;
/**
* The position category this partitioner uses to store the document's partitioning information.
Expand All @@ -101,23 +109,27 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit
* @param scanner the scanner this partitioner is supposed to use
* @param legalContentTypes the legal content types of this partitioner
*/
@Deprecated
public DefaultPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
fScanner= scanner;
fLegalContentTypes= TextUtilities.copy(legalContentTypes);
fPositionCategory= CONTENT_TYPES_CATEGORY + hashCode();
fPositionUpdater= new DefaultPositionUpdater(fPositionCategory);
}

@Deprecated
@Override
public String[] getManagingPositionCategories() {
return new String[] { fPositionCategory };
}

@Deprecated
@Override
public void connect(IDocument document) {
connect(document, false);
}

@Deprecated
@Override
public void connect(IDocument document, boolean delayInitialization) {
Assert.isNotNull(document);
Expand All @@ -135,6 +147,7 @@ public void connect(IDocument document, boolean delayInitialization) {
/*
* @since 3.1
*/
@Deprecated
protected final void checkInitialization() {
if (!fIsInitialized) {
initialize();
Expand All @@ -144,6 +157,7 @@ protected final void checkInitialization() {
/**
* Performs the initial partitioning of the partitioner's document.
*/
@Deprecated
protected void initialize() {
fIsInitialized= true;
fScanner.setRange(fDocument, 0, fDocument.getLength());
Expand All @@ -168,6 +182,7 @@ protected void initialize() {
}
}

@Deprecated
@Override
public void disconnect() {

Expand All @@ -180,6 +195,7 @@ public void disconnect() {
}
}

@Deprecated
@Override
public void documentAboutToBeChanged(DocumentEvent e) {
if (fIsInitialized) {
Expand All @@ -193,6 +209,7 @@ public void documentAboutToBeChanged(DocumentEvent e) {
}
}

@Deprecated
@Override
public boolean documentChanged(DocumentEvent e) {
if (fIsInitialized) {
Expand Down Expand Up @@ -258,6 +275,7 @@ private IRegion createRegion() {
}
}

@Deprecated
@Override
public IRegion documentChanged2(DocumentEvent e) {

Expand Down Expand Up @@ -397,6 +415,7 @@ public IRegion documentChanged2(DocumentEvent e) {
* @param offset the offset for which to search the closest position
* @return the closest position in the partitioner's category
*/
@Deprecated
protected TypedPosition findClosestPosition(int offset) {

try {
Expand Down Expand Up @@ -428,6 +447,7 @@ protected TypedPosition findClosestPosition(int offset) {
}


@Deprecated
@Override
public String getContentType(int offset) {
checkInitialization();
Expand All @@ -440,6 +460,7 @@ public String getContentType(int offset) {
return IDocument.DEFAULT_CONTENT_TYPE;
}

@Deprecated
@Override
public ITypedRegion getPartition(int offset) {
checkInitialization();
Expand Down Expand Up @@ -490,11 +511,13 @@ public ITypedRegion getPartition(int offset) {
return new TypedRegion(0, fDocument.getLength(), IDocument.DEFAULT_CONTENT_TYPE);
}

@Deprecated
@Override
public ITypedRegion[] computePartitioning(int offset, int length) {
return computePartitioning(offset, length, false);
}

@Deprecated
@Override
public String[] getLegalContentTypes() {
return TextUtilities.copy(fLegalContentTypes);
Expand All @@ -506,6 +529,7 @@ public String[] getLegalContentTypes() {
* @param contentType the content type to check
* @return <code>true</code> if the content type is a legal content type
*/
@Deprecated
protected boolean isSupportedContentType(String contentType) {
if (contentType != null) {
for (String fLegalContentType : fLegalContentTypes) {
Expand All @@ -526,6 +550,7 @@ protected boolean isSupportedContentType(String contentType) {
* @param token the token whose content type is to be determined
* @return the token's content type
*/
@Deprecated
protected String getTokenContentType(IToken token) {
Object data= token.getData();
if (data instanceof String) {
Expand All @@ -536,11 +561,13 @@ protected String getTokenContentType(IToken token) {

/* zero-length partition support */

@Deprecated
@Override
public String getContentType(int offset, boolean preferOpenPartitions) {
return getPartition(offset, preferOpenPartitions).getType();
}

@Deprecated
@Override
public ITypedRegion getPartition(int offset, boolean preferOpenPartitions) {
ITypedRegion region= getPartition(offset);
Expand All @@ -558,6 +585,7 @@ public ITypedRegion getPartition(int offset, boolean preferOpenPartitions) {
return region;
}

@Deprecated
@Override
public ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions) {
checkInitialization();
Expand Down Expand Up @@ -681,6 +709,7 @@ private int getFirstIndexStartingAfterOffset(Position[] positions, int offset) {
return j;
}

@Deprecated
@Override
public void startRewriteSession(DocumentRewriteSession session) throws IllegalStateException {
if (fActiveRewriteSession != null) {
Expand All @@ -689,13 +718,15 @@ public void startRewriteSession(DocumentRewriteSession session) throws IllegalSt
fActiveRewriteSession= session;
}

@Deprecated
@Override
public void stopRewriteSession(DocumentRewriteSession session) {
if (fActiveRewriteSession == session) {
flushRewriteSession();
}
}

@Deprecated
@Override
public DocumentRewriteSession getActiveRewriteSession() {
return fActiveRewriteSession;
Expand All @@ -706,6 +737,7 @@ public DocumentRewriteSession getActiveRewriteSession() {
*
* @since 3.1
*/
@Deprecated
protected final void flushRewriteSession() {
fActiveRewriteSession= null;

Expand Down
Loading
Loading