From d6bc183c77428d586b58fe8a5afcd8bd4bc98f20 Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Fri, 3 May 2024 00:42:46 -0400 Subject: [PATCH] Make use of new getters in superclass to override javadoc formatting (#3144) - Make use of new getters in superclass to override javadoc formatting - Update target platform to newer 4.32-I-builds (I20240502-1800) - Fix upstream regression in https://github.com/eclipse-jdt/eclipse.jdt.debug/pull/435 Co-authored-by: Rob Stryker Co-authored-by: Roland Grunberg --- .../javadoc/JavadocContentAccess2.java | 55 +++++++++++++------ .../org.eclipse.jdt.ls.tp.target | 2 +- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/javadoc/JavadocContentAccess2.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/javadoc/JavadocContentAccess2.java index 230aa1c1d6..234841495e 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/javadoc/JavadocContentAccess2.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/javadoc/JavadocContentAccess2.java @@ -232,33 +232,33 @@ protected void handleInLineText(String text, ASTNode previousNode) { @Override protected void handleBlockTags(String title, List tags) { super.handleBlockTags(title, tags); - fBuf.append(BlOCK_TAG_ENTRY_END); + fBuf.append(getBlockTagEntryEnd()); } @Override protected void handleSingleTag(TagElement tag) { - fBuf.append(BLOCK_TAG_START); + fBuf.append(getBlockTagStart()); super.handleSingleTag(tag); - fBuf.append(BLOCK_TAG_END); + fBuf.append(getBlockTagEnd()); } @Override protected void handleReturnTagBody(TagElement tag, CharSequence returnDescription) { - fBuf.append(BLOCK_TAG_START); + fBuf.append(getBlockTagStart()); super.handleReturnTagBody(tag, returnDescription); - fBuf.append(BLOCK_TAG_END); - fBuf.append(BlOCK_TAG_ENTRY_END); + fBuf.append(getBlockTagEnd()); + fBuf.append(getBlockTagEntryEnd()); } @Override protected void handleBlockTagBody(TagElement tag) { List fragments = tag.fragments(); if (!fragments.isEmpty()) { - fBuf.append(BLOCK_TAG_START); - fBuf.append(BlOCK_TAG_ENTRY_START); + fBuf.append(getBlockTagStart()); + fBuf.append(getBlockTagEntryStart()); super.handleContentElements(fragments); - fBuf.append(BlOCK_TAG_ENTRY_END); - fBuf.append(BLOCK_TAG_END); + fBuf.append(getBlockTagEntryEnd()); + fBuf.append(getBlockTagEnd()); } } @@ -271,24 +271,24 @@ protected void handleBlockTagTitle(String title) { @Override protected void handleExceptionTagsBody(List tags, List exceptionNames, CharSequence[] exceptionDescriptions) { - fBuf.append(BLOCK_TAG_START); + fBuf.append(getBlockTagStart()); super.handleExceptionTagsBody(tags, exceptionNames, exceptionDescriptions); - fBuf.append(BLOCK_TAG_END); - fBuf.append(BlOCK_TAG_ENTRY_END); + fBuf.append(getBlockTagEnd()); + fBuf.append(getBlockTagEntryEnd()); } @Override protected void handleSingleParameterTag(TagElement tag) { - fBuf.append(BLOCK_TAG_START); + fBuf.append(getBlockTagStart()); super.handleSingleParameterTag(tag); - fBuf.append(BLOCK_TAG_END); + fBuf.append(getBlockTagEnd()); } @Override protected void handleSingleParameterDescription(String name, CharSequence description, boolean isTypeParameters) { - fBuf.append(BLOCK_TAG_START); + fBuf.append(getBlockTagStart()); super.handleSingleParameterDescription(name, description, isTypeParameters); - fBuf.append(BLOCK_TAG_END); + fBuf.append(getBlockTagEnd()); } protected String markSnippet(String text, boolean isInSnippet) { @@ -320,5 +320,26 @@ protected String createLinkURI(String scheme, IJavaElement element, String refTy } return ""; } + + @Override + protected String getBlockTagStart() { + return "
    "; + } + + @Override + protected String getBlockTagEnd() { + return "
"; + } + + @Override + protected String getBlockTagEntryStart() { + return "
  • "; + } + + @Override + protected String getBlockTagEntryEnd() { + return "
  • "; + } + } } diff --git a/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target b/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target index d3ca4b2201..4aafb7309d 100644 --- a/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target +++ b/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target @@ -25,7 +25,7 @@ - +