Skip to content

Commit

Permalink
Make use of new getters in superclass to override javadoc formatting (e…
Browse files Browse the repository at this point in the history
…clipse-jdtls#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
  eclipse-jdt/eclipse.jdt.debug#435

Co-authored-by: Rob Stryker <[email protected]>
Co-authored-by: Roland Grunberg <[email protected]>
  • Loading branch information
robstryker and rgrunber authored May 3, 2024
1 parent 64dca83 commit d6bc183
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,33 +232,33 @@ protected void handleInLineText(String text, ASTNode previousNode) {
@Override
protected void handleBlockTags(String title, List<TagElement> 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());
}
}

Expand All @@ -271,24 +271,24 @@ protected void handleBlockTagTitle(String title) {

@Override
protected void handleExceptionTagsBody(List<TagElement> tags, List<String> 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) {
Expand Down Expand Up @@ -320,5 +320,26 @@ protected String createLinkURI(String scheme, IJavaElement element, String refTy
}
return "";
}

@Override
protected String getBlockTagStart() {
return "<ul>";
}

@Override
protected String getBlockTagEnd() {
return "</ul>";
}

@Override
protected String getBlockTagEntryStart() {
return "<li>";
}

@Override
protected String getBlockTagEntryEnd() {
return "</li>";
}

}
}
2 changes: 1 addition & 1 deletion org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<unit id="org.mockito.mockito-core" version="0.0.0"/>
<unit id="org.apache.commons.commons-io" version="0.0.0"/>
<unit id="org.eclipse.jdt.apt.pluggable.core" version="0.0.0"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.32-I-builds/I20240422-1800/"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.32-I-builds/I20240502-1800/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.core.compiler.batch" version="0.0.0"/>
Expand Down

0 comments on commit d6bc183

Please sign in to comment.