mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not copy it to history document
This commit is contained in:
+8
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user