WatchesManagerState (@NotNull WatchesManagerState state) { List<ConfigurationState> expressions = state.getExpressions(); expressions.clear(); watches.forEach((key, value) -> expressions.add(new ConfigurationState(key, value))); List<InlineWatchState> inlineExpressionStates = state.getInlineExpressionStates(); inlineExpressionStates.clear(); inlineWatches.values().stream() .flatMap(l -> l.stream()) .forEach((value) -> { inlineExpressionStates.add(new InlineWatchState(value.getExpression(), value.getLine(), value.getPosition().getFile().getUrl())); }); return state; }