diff options
author | Paul Pazderski | 2020-01-03 09:18:52 +0000 |
---|---|---|
committer | Paul Pazderski | 2020-01-03 09:41:47 +0000 |
commit | 1417f98f467aba5e2b47bf042bb0b70e3a80c7c3 (patch) | |
tree | 4f339c011674a80be305ea78cd283b4cd18ce050 | |
parent | a43891aa2b40babfd65b3bc67530e2f7a41fd41b (diff) | |
download | eclipse.platform.debug-1417f98f467aba5e2b47bf042bb0b70e3a80c7c3.tar.gz eclipse.platform.debug-1417f98f467aba5e2b47bf042bb0b70e3a80c7c3.tar.xz eclipse.platform.debug-1417f98f467aba5e2b47bf042bb0b70e3a80c7c3.zip |
Bug 558772 - [console] Remove obsolete code in IOConsolePartitionerI20200106-0600
The method applyStreamOutput can do the same as the removed code block.
Change-Id: I090b45de41bae48376f87e0e5e67a2ff058df592
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java index 003fe054a..3102a3ab0 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java @@ -781,36 +781,7 @@ public class IOConsolePartitioner pendingPartitions.notifyAll(); } synchronized (partitions) { - if (isHandleControlCharacters()) { - applyStreamOutput(pendingCopy, size); - } else { - // Old implementation of output appending. The control character aware variant - // {@link #applyStreamOutput(List, int)} should do exactly the same if control - // character processing is disabled but since there is not so much time for - // testing in current development cycle the old implementation is used to - // process output when control character interpretation is disabled. - // TODO remove in next development cycle - final StringBuilder addedContent = new StringBuilder(size); - IOConsolePartition lastPartition = getPartitionByIndex(partitions.size() - 1); - int nextOffset = document.getLength(); - for (PendingPartition pendingPartition : pendingCopy) { - if (lastPartition == null || lastPartition.getOutputStream() != pendingPartition.stream) { - lastPartition = new IOConsolePartition(nextOffset, pendingPartition.stream); - partitions.add(lastPartition); - } - final int pendingLength = pendingPartition.text.length(); - lastPartition.setLength(lastPartition.getLength() + pendingLength); - nextOffset += pendingLength; - addedContent.append(pendingPartition.text); - } - try { - updateType = DocUpdateType.OUTPUT; - document.replace(document.getLength(), 0, addedContent.toString()); - outputOffset += addedContent.length(); - } catch (BadLocationException e) { - log(e); - } - } + applyStreamOutput(pendingCopy, size); } checkFinished(); checkBufferSize(); |