mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:10:43 +07:00
WEB-61632 WEB-61853 WebSymbols: add Obsolete API status; MDN: set obsolete symbols API status to obsolete.
GitOrigin-RevId: 5fd6970549cb591951c55331d9275ef519736f9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f0cdf9cd61
commit
36a13f562e
@@ -9,6 +9,7 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.xml.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.webSymbols" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.images" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.intellij.xml.util.HtmlUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.documentation.mdn.MdnDocumentationKt.getHtmlMdnDocumentation;
|
||||
import static com.intellij.webSymbols.WebSymbolApiStatus.isDeprecatedOrObsolete;
|
||||
|
||||
public class HtmlDeprecatedAttributeInspection extends HtmlLocalInspectionTool {
|
||||
|
||||
@@ -32,7 +33,7 @@ public class HtmlDeprecatedAttributeInspection extends HtmlLocalInspectionTool {
|
||||
StringUtil.toLowerCase(attribute.getName());
|
||||
MdnSymbolDocumentation documentation = getHtmlMdnDocumentation(attribute, null);
|
||||
boolean deprecatedInHtml5 = "align".equals(name)
|
||||
|| (documentation != null && documentation.isDeprecated());
|
||||
|| (documentation != null && isDeprecatedOrObsolete(documentation.getApiStatus()));
|
||||
if (!deprecatedInHtml5) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.documentation.mdn.MdnDocumentationKt.getHtmlMdnDocumentation;
|
||||
import static com.intellij.webSymbols.WebSymbolApiStatus.isDeprecatedOrObsolete;
|
||||
|
||||
public class HtmlDeprecatedTagInspection extends HtmlLocalInspectionTool {
|
||||
@NonNls private static final Set<String> ourHtmlReplaceableTags;
|
||||
@@ -91,7 +92,7 @@ public class HtmlDeprecatedTagInspection extends HtmlLocalInspectionTool {
|
||||
}
|
||||
|
||||
MdnSymbolDocumentation documentation = getHtmlMdnDocumentation(tag, null);
|
||||
boolean deprecatedInHtml5 = documentation != null && documentation.isDeprecated();
|
||||
boolean deprecatedInHtml5 = documentation != null && isDeprecatedOrObsolete(documentation.getApiStatus());
|
||||
boolean inHtml5 = HtmlUtil.isHtml5Context(tag);
|
||||
if (!inHtml5 && !deprecatedInHtml5 && !HtmlUtil.hasNonHtml5Doctype(tag)) {
|
||||
fixes = ArrayUtil.append(fixes, new SwitchToHtml5Action());
|
||||
|
||||
Reference in New Issue
Block a user