Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete inline tags with blank (fixes #139) #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bananeweizen
Copy link
Contributor

What it does

Complete those inline tags with an additional blank character as
completion suffix which take additional text from the user, e.g.
{@code } instead of {@code}.

This reverts half of
https://bugs.eclipse.org/bugs/show_bug.cgi?id=121026, which meant to
only suppress superfluous blanks when adding the completion around
existing text, but wrongly removed blanks also from completion that does
not wrap around input. The test case of that linked bug still works as expected after this change.

Be aware that this change has a visual side effect during completion. The suggested completions in the drop down also contain the newly added blank. I would create another change in jdt.ui to remove the blank from the label provider in the drop down to make this look like before.

image

As you can see from the screenshot, not all tags get an additional blank, but only a known list of tags. Therefore docRoot remains as before.

The result after completion looks like this:
image

How to test

  • Have the cursor inside Javadoc
  • type "@"
  • trigger code completion
  • select "{@code}", return

Author checklist

@Bananeweizen Bananeweizen force-pushed the javadoc_inline_tag_completion branch from d30420e to 1603071 Compare June 17, 2022 15:41
Complete those inline tags with an additional blank character as
completion suffix which take additional text from the user, e.g.
"{@code }" instead of "{@code}".

This reverts half of
https://bugs.eclipse.org/bugs/show_bug.cgi?id=121026, which meant to
only suppress superfluous blanks when adding the completion around
existing text, but wrongly removed blanks also from completion that does
not wrap around input.
@jukzi jukzi force-pushed the javadoc_inline_tag_completion branch from 1603071 to a634c2d Compare February 1, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant