mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert 28a13b77d1 due to performance problems - skip read only blocks while building formatting model (IDEA-142200, should fix adjustLineIndent performance problem)
This commit is contained in:
@@ -203,6 +203,9 @@ class InitialInfoBuilder {
|
||||
if (rootBlock instanceof ReadOnlyBlockInformationProvider) {
|
||||
myReadOnlyBlockInformationProvider = (ReadOnlyBlockInformationProvider)rootBlock;
|
||||
}
|
||||
if (!isInsideFormattingRanges && !myCollectAlignmentsInsideFormattingRange) {
|
||||
return processSimpleBlock(rootBlock, parent, true, index, parentBlock);
|
||||
}
|
||||
|
||||
final List<Block> subBlocks = rootBlock.getSubBlocks();
|
||||
if (subBlocks.isEmpty() || myReadOnlyBlockInformationProvider != null
|
||||
@@ -237,10 +240,11 @@ class InitialInfoBuilder {
|
||||
}
|
||||
boolean blocksMayBeOfInterest = false;
|
||||
|
||||
if (myPositionOfInterest != -1) {
|
||||
if (myPositionOfInterest != -1 && rootBlock.getTextRange().contains(myPositionOfInterest)) {
|
||||
myResult.put(wrappedRootBlock, rootBlock);
|
||||
blocksMayBeOfInterest = true;
|
||||
}
|
||||
|
||||
final boolean blocksAreReadOnly = rootBlock instanceof ReadOnlyBlockContainer || blocksMayBeOfInterest;
|
||||
|
||||
State state = new State(rootBlock, wrappedRootBlock, currentWrapParent, blocksAreReadOnly, rootBlockIsRightBlock);
|
||||
|
||||
Reference in New Issue
Block a user