boolean (@NotNull @NonNls String id, @Nullable XExpression expression) { if (XDebuggerUtilImpl.isEmptyExpression(expression) || expression.getExpression().length() > 100000) { return false; } LinkedList<XExpression> list = myRecentExpressions.computeIfAbsent(id, k -> new LinkedList<>()); int max = AdvancedSettings.getInt("debugger.max.recent.expressions"); while (list.size() >= max) { list.removeLast(); } XExpression trimmedExpression = new XExpressionImpl(expression.getExpression().trim(), expression.getLanguage(), expression.getCustomInfo(), expression.getMode()); list.remove(trimmedExpression); list.addFirst(trimmedExpression); return true; }