List<DiffTool> (@NotNull DiffSettings diffSettings, @NotNull List<? extends DiffTool> availableTools) { List<DiffTool> result = new ArrayList<>(); List<String> savedOrder = diffSettings.getDiffToolsOrder(); for (final String clazz : savedOrder) { DiffTool tool = ContainerUtil.find(availableTools, t -> t.getClass().getCanonicalName().equals(clazz)); if (tool != null) result.add(tool); } for (DiffTool tool : availableTools) { if (!result.contains(tool)) result.add(tool); } return result; }