diff --git a/plugins/org.python.pydev.core/src/org/python/pydev/core/formatter/FormatStd.java b/plugins/org.python.pydev.core/src/org/python/pydev/core/formatter/FormatStd.java index 2dee364ef6..52f26526b2 100644 --- a/plugins/org.python.pydev.core/src/org/python/pydev/core/formatter/FormatStd.java +++ b/plugins/org.python.pydev.core/src/org/python/pydev/core/formatter/FormatStd.java @@ -5,7 +5,7 @@ * * @author Fabio */ -public class FormatStd { +public class FormatStd implements Cloneable { public enum FormatterEnum { PYDEVF, AUTOPEP8, BLACK, RUFF @@ -17,7 +17,7 @@ public enum FormatterEnum { public static final String RUFF = "RUFF"; public static FormatterEnum getFormatterEnumFromStr(String formatterStyleStr) { - switch (formatterStyleStr) { + switch (formatterStyleStr.toUpperCase()) { case AUTOPEP8: return FormatterEnum.AUTOPEP8; case BLACK: @@ -131,4 +131,13 @@ public void updateFormatterStyle() { } } + @Override + public FormatStd clone() { + try { + return (FormatStd) super.clone(); + } catch (CloneNotSupportedException e) { + throw new RuntimeException(e); + } + } + } \ No newline at end of file