diff --git a/platform/core-api/src/com/intellij/openapi/editor/Document.java b/platform/core-api/src/com/intellij/openapi/editor/Document.java index 893a1e2ae81f..883fc21b3c2b 100644 --- a/platform/core-api/src/com/intellij/openapi/editor/Document.java +++ b/platform/core-api/src/com/intellij/openapi/editor/Document.java @@ -225,7 +225,9 @@ public interface Document extends UserDataHolder { * @param endOffset the end offset for the range of text covered by the marker. * @return the marker instance. */ - @NotNull RangeMarker createRangeMarker(int startOffset, int endOffset); + default @NotNull RangeMarker createRangeMarker(int startOffset, int endOffset) { + return createRangeMarker(startOffset, endOffset, false); + } /** * Creates a range marker which points to the specified range of text in the document and diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java index d24eb4ae8b94..7faeb44ad7f6 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java @@ -419,12 +419,6 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx { return end0 > start1; } - @Override - @NotNull - public RangeMarker createRangeMarker(int startOffset, int endOffset) { - return createRangeMarker(startOffset, endOffset, false); - } - @Override @NotNull public RangeMarker createRangeMarker(int startOffset, int endOffset, boolean surviveOnExternalChange) { diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/FrozenDocument.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/FrozenDocument.java index aa9bc61895ae..52d9f17b3ed1 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/FrozenDocument.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/FrozenDocument.java @@ -196,12 +196,6 @@ public class FrozenDocument implements DocumentEx { return myStamp; } - @NotNull - @Override - public RangeMarker createRangeMarker(int startOffset, int endOffset) { - throw new UnsupportedOperationException(); - } - @NotNull @Override public RangeMarker createRangeMarker(int startOffset, int endOffset, boolean surviveOnExternalChange) { diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/BaseDocumentAdapter.kt b/platform/platform-impl/src/com/intellij/openapi/editor/BaseDocumentAdapter.kt index eeac5aef8dbd..7cfccb7b12ee 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/BaseDocumentAdapter.kt +++ b/platform/platform-impl/src/com/intellij/openapi/editor/BaseDocumentAdapter.kt @@ -36,8 +36,6 @@ abstract class BaseDocumentAdapter : UserDataHolderBase(), Document { throw UnsupportedOperationException("Not implemented") } - override fun createRangeMarker(startOffset: Int, endOffset: Int): RangeMarker = throw UnsupportedOperationException("Not implemented") - override fun createRangeMarker(startOffset: Int, endOffset: Int, surviveOnExternalChange: Boolean): RangeMarker { throw UnsupportedOperationException("Not implemented") }