Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class ConsoleMessages extends NLS {

public static String ConsoleTerminateAction_0;
public static String ConsoleTerminateAction_1;
public static String ConsoleBufferConfigurationError;

public static String ProcessConsole_0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ConsoleRemoveTerminatedAction_1=Remove Launch

ConsoleTerminateAction_0=&Terminate
ConsoleTerminateAction_1=Terminate
ConsoleBufferConfigurationError=Console buffer configuration error: High water mark ({0}) must be greater than low water mark ({1}).

ProcessConsole_0=<terminated> {0}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Color;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
Expand Down Expand Up @@ -527,6 +528,11 @@ public void propertyChange(PropertyChangeEvent evt) {
int lowWater = store.getInt(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK);
if (highWater > lowWater) {
setWaterMarks(lowWater, highWater);
} else {
String msg = NLS.bind(
ConsoleMessages.ConsoleBufferConfigurationError,
highWater, lowWater);
DebugUIPlugin.log(new Status(IStatus.WARNING, IDebugUIConstants.PLUGIN_ID, msg));
}
} else {
setWaterMarks(-1, -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ public int getLowWaterMark() {
public void setWaterMarks(int low, int high) {
if (low >= 0) {
if (low >= high) {
throw new IllegalArgumentException("High water mark must be greater than low water mark"); //$NON-NLS-1$
throw new IllegalArgumentException(
String.format("High water mark (%d) must be greater than low water mark (%d)", high, low)); //$NON-NLS-1$
}
}
partitioner.setWaterMarks(low, high);
Expand Down
Loading