package com.jetbrains.python.documentation.docstrings;
import com.intellij.psi.PsiElement;
-import com.intellij.util.Function;
import com.intellij.util.ObjectUtils;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
/**
* @see DocStringUtil#ensureNotPlainDocstringFormat(PsiElement)
*/
- PLAIN("Plain"),
- EPYTEXT("Epytext"),
- REST("reStructuredText"),
- NUMPY("NumPy"),
- GOOGLE("Google");
+ PLAIN("Plain", ""),
+ EPYTEXT("Epytext", "epytext"),
+ REST("reStructuredText", "rest"),
+ NUMPY("NumPy", "numpy"),
+ GOOGLE("Google", "google");
public static final List<String> ALL_NAMES = getAllNames();
return ObjectUtils.notNull(fromName(name), PLAIN);
}
- String myName;
+ private final String myName;
+ private final String myFormatterCommand;
- DocStringFormat(@NotNull String name) {
+ DocStringFormat(@NotNull String name, @NotNull String formatterCommand) {
myName = name;
+ myFormatterCommand = formatterCommand;
}
@NotNull
return myName;
}
+ @NotNull
+ public String getFormatterCommand() {
+ return myFormatterCommand;
+ }
}