mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add javadoc for new settingsAnchor parameter of PyFunctionBuilder and PyDocstringGenerator
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user