Add javadoc for new settingsAnchor parameter of PyFunctionBuilder and PyDocstringGenerator

This commit is contained in:
Mikhail Golubev
2015-09-25 15:38:33 +03:00
parent 0bdf176f0e
commit 26fd7d7231
2 changed files with 15 additions and 0 deletions
@@ -95,6 +95,11 @@ public class PyDocstringGenerator {
return new PyDocstringGenerator(owner, docStringText, DocStringUtil.getConfiguredDocStringFormat(owner), indentation, owner);
}
/**
* @param settingsAnchor any PSI element, presumably in the same file/module where generated function is going to be inserted.
* It's needed to detect configured docstring format and Python indentation size and, as result,
* generate properly formatted docstring.
*/
@NotNull
public static PyDocstringGenerator create(@NotNull DocStringFormat format, @NotNull String indentation, @NotNull PsiElement settingsAnchor) {
return new PyDocstringGenerator(null, null, format, indentation, settingsAnchor);
@@ -109,6 +114,11 @@ public class PyDocstringGenerator {
docString);
}
/**
* @param settingsAnchor any PSI element, presumably in the same file/module where generated function is going to be inserted.
* It's needed to detect configured docstring format and Python indentation size and, as result,
* generate properly formatted docstring.
*/
@NotNull
public static PyDocstringGenerator update(@NotNull DocStringFormat format,
@NotNull String indentation,
@@ -80,6 +80,11 @@ public class PyFunctionBuilder {
myDocStringGenerator = null;
}
/**
* @param settingsAnchor any PSI element, presumably in the same file/module where generated function is going to be inserted.
* It's needed to detect configured docstring format and Python indentation size and, as result,
* generate properly formatted docstring.
*/
public PyFunctionBuilder(@NotNull String name, @NotNull PsiElement settingsAnchor) {
myName = name;
myDocStringGenerator = PyDocstringGenerator.create(DocStringUtil.getConfiguredDocStringFormat(settingsAnchor),