Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
index 34ffa88c3..48af576ff 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
@@ -236,6 +236,26 @@ public class IOConsolePartition implements ITypedRegion {
return inputStream;
}
+ /**
+ * Test if this partition belongs to the given input stream.
+ *
+ * @param in the input stream to test or <code>null</code>
+ * @return <code>true</code> if this partition belongs to input stream
+ */
+ boolean belongsTo(IOConsoleInputStream in) {
+ return inputStream == in;
+ }
+
+ /**
+ * Test if this partition belongs to the given output stream.
+ *
+ * @param out the output stream to test or <code>null</code>
+ * @return <code>true</code> if this partition belongs to output stream
+ */
+ boolean belongsTo(IOConsoleOutputStream out) {
+ return outputStream == out;
+ }
+
@Override
public String toString() {
final StringBuilder sb = new StringBuilder(40);

Back to the top