1 11 package org.eclipse.debug.internal.ui.views.console; 12 13 14 import org.eclipse.debug.internal.ui.DebugUIPlugin; 15 16 19 public class InputPartition extends StreamPartition { 20 21 25 private boolean fReadOnly = false; 26 27 30 public static final String INPUT_PARTITION_TYPE = DebugUIPlugin.getUniqueIdentifier() + ".INPUT_PARTITION_TYPE"; 32 33 public InputPartition(String streamIdentifier, int offset, int length) { 34 super(streamIdentifier, offset, length, INPUT_PARTITION_TYPE); 35 } 36 37 40 public StreamPartition createNewPartition(String streamIdentifier, int offset, int length) { 41 return new InputPartition(streamIdentifier, offset, length); 42 } 43 44 49 public void setReadOnly(boolean readOnly) { 50 fReadOnly = readOnly; 51 } 52 53 58 public boolean isReadOnly() { 59 return fReadOnly; 60 } 61 62 69 public boolean canBeCombinedWith(StreamPartition partition) { 70 return (!isReadOnly() && super.canBeCombinedWith(partition)); 71 } 72 } 73 | Popular Tags |