do not copy it to history document

This commit is contained in:
Dmitry Avdeev
2011-02-22 13:35:28 +03:00
parent 8986280b06
commit 52d4ff995f
@@ -31,6 +31,7 @@ import java.io.OutputStream;
public class ConsoleExecuteActionHandler {
private final ProcessHandler myProcessHandler;
private final boolean myPreserveMarkup;
private boolean myAddCurrentToHistory;
public ConsoleExecuteActionHandler(ProcessHandler processHandler, boolean preserveMarkup) {
myProcessHandler = processHandler;
@@ -47,7 +48,9 @@ public class ConsoleExecuteActionHandler {
final TextRange range = new TextRange(0, document.getTextLength());
languageConsole.getCurrentEditor().getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset());
languageConsole.addCurrentToHistory(range, false, myPreserveMarkup);
if (myAddCurrentToHistory) {
languageConsole.addCurrentToHistory(range, false, myPreserveMarkup);
}
languageConsole.setInputText("");
if (!StringUtil.isEmptyOrSpaces(text)) {
consoleHistoryModel.addToHistory(text);
@@ -73,4 +76,8 @@ public class ConsoleExecuteActionHandler {
// ignore
}
}
public void setAddCurrentToHistory(boolean addCurrentToHistory) {
myAddCurrentToHistory = addCurrentToHistory;
}
}