ToolWindowAnchor (@NotNull String anchor) { return switch (anchor) { case "top" -> TOP; case "left" -> LEFT; case "bottom" -> BOTTOM; case "right" -> RIGHT; default -> throw new IllegalArgumentException("Unknown anchor constant: " + anchor); }; }