mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-COMMUNITY-CR-1230 followup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,7 +83,17 @@ public interface DocumentEx extends Document {
|
||||
@NotNull
|
||||
List<RangeMarker> getGuardedBlocks();
|
||||
|
||||
|
||||
/**
|
||||
* Get all range markers
|
||||
* and hand them to the {@code processor} in their {@link RangeMarker#getStartOffset()} order
|
||||
*/
|
||||
boolean processRangeMarkers(@NotNull Processor<RangeMarker> processor);
|
||||
|
||||
/**
|
||||
* Get range markers which {@link com.intellij.openapi.util.TextRange#intersects(int, int)} the specified range
|
||||
* and hand them to the {@code processor} in their {@link RangeMarker#getStartOffset()} order
|
||||
*/
|
||||
boolean processRangeMarkersOverlappingWith(int start, int end, @NotNull Processor<RangeMarker> processor);
|
||||
}
|
||||
|
||||
|
||||
@@ -332,11 +332,11 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
}
|
||||
}
|
||||
|
||||
public ReadonlyFragmentModificationHandler getReadonlyFragmentModificationHandler() {
|
||||
ReadonlyFragmentModificationHandler getReadonlyFragmentModificationHandler() {
|
||||
return myReadonlyFragmentModificationHandler;
|
||||
}
|
||||
|
||||
public void setReadonlyFragmentModificationHandler(final ReadonlyFragmentModificationHandler readonlyFragmentModificationHandler) {
|
||||
void setReadonlyFragmentModificationHandler(final ReadonlyFragmentModificationHandler readonlyFragmentModificationHandler) {
|
||||
myReadonlyFragmentModificationHandler = readonlyFragmentModificationHandler;
|
||||
}
|
||||
|
||||
@@ -364,13 +364,13 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public int getRangeMarkersSize() {
|
||||
int getRangeMarkersSize() {
|
||||
return myRangeMarkers.size() + myPersistentRangeMarkers.size();
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public int getRangeMarkersNodeSize() {
|
||||
return myRangeMarkers.nodeSize()+myPersistentRangeMarkers.size();
|
||||
int getRangeMarkersNodeSize() {
|
||||
return myRangeMarkers.nodeSize()+myPersistentRangeMarkers.nodeSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -693,7 +693,7 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
getLineSet().clearModificationFlags();
|
||||
}
|
||||
|
||||
public void clearLineModificationFlagsExcept(@NotNull int[] caretLines) {
|
||||
void clearLineModificationFlagsExcept(@NotNull int[] caretLines) {
|
||||
IntArrayList modifiedLines = new IntArrayList(caretLines.length);
|
||||
LineSet lineSet = getLineSet();
|
||||
for (int line : caretLines) {
|
||||
@@ -716,8 +716,8 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
assertNotNestedModification();
|
||||
boolean enableRecursiveModifications = Registry.is("enable.recursive.document.changes"); // temporary property, to remove in IDEA 16
|
||||
myChangeInProgress = true;
|
||||
final DocumentEvent event;
|
||||
try {
|
||||
final DocumentEvent event;
|
||||
try {
|
||||
event = doBeforeChangedUpdate(offset, oldString, newString, wholeTextReplaced);
|
||||
}
|
||||
@@ -742,11 +742,9 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
Application app = ApplicationManager.getApplication();
|
||||
if (app != null) {
|
||||
FileDocumentManager manager = FileDocumentManager.getInstance();
|
||||
if (manager != null) {
|
||||
VirtualFile file = manager.getFile(this);
|
||||
if (file != null && !file.isValid()) {
|
||||
LOG.error("File of this document has been deleted.");
|
||||
}
|
||||
VirtualFile file = manager.getFile(this);
|
||||
if (file != null && !file.isValid()) {
|
||||
LOG.error("File of this document has been deleted.");
|
||||
}
|
||||
}
|
||||
assertInsideCommand();
|
||||
@@ -878,9 +876,9 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
private final Ref<DocumentListener[]> myCachedDocumentListenersRef;
|
||||
private final List<DocumentListener> myDocumentListeners;
|
||||
|
||||
public DocumentListenerDisposable(@NotNull DocumentListener listener,
|
||||
@NotNull Ref<DocumentListener[]> cachedDocumentListenersRef,
|
||||
@NotNull List<DocumentListener> documentListeners) {
|
||||
private DocumentListenerDisposable(@NotNull DocumentListener listener,
|
||||
@NotNull Ref<DocumentListener[]> cachedDocumentListenersRef,
|
||||
@NotNull List<DocumentListener> documentListeners) {
|
||||
myListener = listener;
|
||||
myCachedDocumentListenersRef = cachedDocumentListenersRef;
|
||||
myDocumentListeners = documentListeners;
|
||||
@@ -1085,7 +1083,7 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
return "DocumentImpl[" + FileDocumentManager.getInstance().getFile(this) + "]";
|
||||
}
|
||||
|
||||
public void requestTabTracking() {
|
||||
void requestTabTracking() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
if (myTabTrackingRequestors++ == 0) {
|
||||
myMightContainTabs = false;
|
||||
@@ -1093,14 +1091,14 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
}
|
||||
}
|
||||
|
||||
public void giveUpTabTracking() {
|
||||
void giveUpTabTracking() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
if (--myTabTrackingRequestors == 0) {
|
||||
myMightContainTabs = true;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean mightContainTabs() {
|
||||
boolean mightContainTabs() {
|
||||
return myMightContainTabs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user