mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
ReplaceWithJavadocIntention didn't use to take into account that comments might be defined not only above the method but before/after type/name/argument list as well. The intention used to register the intention action to make such comments a javadoc, which wasn't correct. This patch fixes the predicate in such a way that such comments don't get to be considered as candidates for conversion to javadoc. This patch also fixes the notes from the review, it includes: - Removing ProgressManager.checkCanceled. - fixing the logic to build the list of comments' content: the passed PsiElement obtains its parent, which is a PsiMethod, takes the first child of the PsiMethod and gather all the first child's siblings which are of the PsiComment type up until the PsiModifier list node. Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: 888a838c9e5e053aa7eeb36f742b862fcae353da
12 lines
170 B
Java
12 lines
170 B
Java
// "Replace with javadoc" "true"
|
|
|
|
class Main {
|
|
/**
|
|
* javadoc
|
|
* hello, world
|
|
* Goodbye
|
|
* he*/llo
|
|
* world
|
|
*/
|
|
private static final int i = 0;
|
|
} |