mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
[Java. Logging] Add javadocs for the most important loggers
IDEA-331693 GitOrigin-RevId: 25cace5a0e0919394ac78ca066b1a1936282fc5b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d9a546accf
commit
01b88ba436
@@ -11,6 +11,13 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleManager
|
||||
import de.plushnikov.intellij.plugin.util.LombokLibraryUtil
|
||||
|
||||
/**
|
||||
* Represents a delegate implementation of the JvmLogger interface that is used to insert loggers which are [PsiAnnotation].
|
||||
* Use it to handle with Lombok loggers
|
||||
* @param fieldLoggerName the fully qualified name of the logger's type.
|
||||
* @param loggerTypeName the fully qualified name of annotation used to generate logger
|
||||
* @param priority the priority of the logger.
|
||||
*/
|
||||
class JvmLoggerAnnotationDelegate(
|
||||
private val fieldLoggerName: String,
|
||||
override val loggerTypeName: String,
|
||||
@@ -32,7 +39,7 @@ class JvmLoggerAnnotationDelegate(
|
||||
|
||||
override fun isPossibleToPlaceLoggerAtClass(clazz: PsiClass): Boolean = clazz.hasAnnotation(loggerTypeName).not()
|
||||
|
||||
override fun createLoggerElementText(project: Project, clazz: PsiClass): PsiAnnotation {
|
||||
override fun createLogger(project: Project, clazz: PsiClass): PsiAnnotation {
|
||||
val factory = JavaPsiFacade.getElementFactory(project)
|
||||
return factory.createAnnotationFromText("@$loggerTypeName", clazz)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user