mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[javadoc] Support inline code in link labels
Introduce the DOC_MARKDOWN_REFERENCE_LABEL container element to support complex labels (comment data + inline code). #IDEA-364475 Fixed GitOrigin-RevId: a04680040c38223b88c63fd8df19be1c9593923c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9d5c82f458
commit
02149e6864
+1
@@ -297,4 +297,5 @@ val BasicJavaElementTypeConverter: ElementTypeConverter = elementTypeConverterOf
|
||||
|
||||
JavaDocSyntaxElementType.DOC_MARKDOWN_CODE_BLOCK to BasicJavaDocElementType.BASIC_DOC_MARKDOWN_CODE_BLOCK,
|
||||
JavaDocSyntaxElementType.DOC_MARKDOWN_REFERENCE_LINK to BasicJavaDocElementType.BASIC_DOC_MARKDOWN_REFERENCE_LINK,
|
||||
JavaDocSyntaxElementType.DOC_MARKDOWN_REFERENCE_LABEL to BasicJavaDocElementType.BASIC_DOC_MARKDOWN_REFERENCE_LABEL,
|
||||
)
|
||||
|
||||
+6
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.source;
|
||||
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
@@ -39,6 +39,8 @@ public abstract class AbstractBasicJavaDocElementTypeFactory {
|
||||
|
||||
public final IElementType DOC_MARKDOWN_REFERENCE_LINK;
|
||||
|
||||
public final IElementType DOC_MARKDOWN_REFERENCE_LABEL;
|
||||
|
||||
public JavaDocElementTypeContainer(IElementType DOC_TAG,
|
||||
IElementType DOC_COMMENT,
|
||||
IElementType DOC_SNIPPET_TAG,
|
||||
@@ -54,7 +56,8 @@ public abstract class AbstractBasicJavaDocElementTypeFactory {
|
||||
IElementType DOC_TYPE_HOLDER,
|
||||
IElementType DOC_PARAMETER_REF,
|
||||
IElementType DOC_MARKDOWN_CODE_BLOCK,
|
||||
IElementType DOC_MARKDOWN_REFERENCE_LINK) {
|
||||
IElementType DOC_MARKDOWN_REFERENCE_LINK,
|
||||
IElementType DOC_MARKDOWN_REFERENCE_LABEL) {
|
||||
this.DOC_TAG = DOC_TAG;
|
||||
this.DOC_COMMENT = DOC_COMMENT;
|
||||
this.DOC_SNIPPET_TAG = DOC_SNIPPET_TAG;
|
||||
@@ -71,6 +74,7 @@ public abstract class AbstractBasicJavaDocElementTypeFactory {
|
||||
this.DOC_PARAMETER_REF = DOC_PARAMETER_REF;
|
||||
this.DOC_MARKDOWN_CODE_BLOCK = DOC_MARKDOWN_CODE_BLOCK;
|
||||
this.DOC_MARKDOWN_REFERENCE_LINK = DOC_MARKDOWN_REFERENCE_LINK;
|
||||
this.DOC_MARKDOWN_REFERENCE_LABEL = DOC_MARKDOWN_REFERENCE_LABEL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.source;
|
||||
|
||||
import com.intellij.java.syntax.element.JavaDocSyntaxElementType;
|
||||
@@ -50,6 +50,7 @@ public interface BasicJavaDocElementType {
|
||||
IElementType BASIC_DOC_COMMENT = new IJavaDocElementType("DOC_COMMENT");
|
||||
IElementType BASIC_DOC_MARKDOWN_CODE_BLOCK = new IJavaDocElementType("DOC_CODE_BLOCK");
|
||||
IElementType BASIC_DOC_MARKDOWN_REFERENCE_LINK = new IJavaDocElementType("DOC_REFERENCE_LINK");
|
||||
IElementType BASIC_DOC_MARKDOWN_REFERENCE_LABEL = new IJavaDocElementType("DOC_REFERENCE_LABEL");
|
||||
|
||||
ParentAwareTokenSet BASIC_ALL_JAVADOC_ELEMENTS = ParentAwareTokenSet.create(
|
||||
BASIC_DOC_TAG, BASIC_DOC_INLINE_TAG, BASIC_DOC_METHOD_OR_FIELD_REF, BASIC_DOC_PARAMETER_REF, BASIC_DOC_TAG_VALUE_ELEMENT,
|
||||
|
||||
Reference in New Issue
Block a user