private File getHistoryFile() {
    InteractiveConsolePlugin plugin = InteractiveConsolePlugin.getDefault();

    if (plugin != null) {
      IPath location = plugin.getStateLocation();
      IPath path = location.append(HISTORY_PY);
      return path.toFile();
    } else {
      return null;
    }
  }
  private int getHistoryMaxEntries() {
    InteractiveConsolePlugin plugin = InteractiveConsolePlugin.getDefault();
    int historyMaxEntries;
    if (plugin != null) {
      IPreferenceStore store = plugin.getPreferenceStore();
      historyMaxEntries =
          store.getInt(
              ScriptConsoleUIConstants.INTERACTIVE_CONSOLE_PERSISTENT_HISTORY_MAXIMUM_ENTRIES);
    } else {
      historyMaxEntries =
          ScriptConsoleUIConstants.DEFAULT_INTERACTIVE_CONSOLE_PERSISTENT_HISTORY_MAXIMUM_ENTRIES;
    }

    if (historyMaxEntries < 0) {
      historyMaxEntries = 0;
    }

    return historyMaxEntries;
  }