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

Javadoc multiline support improvements #6

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

Conversation

polikarpovilya
Copy link

I found that if documentation block contains multiline comment similar to this:

<annotation>
	<documentation>
                    Multiline documentation of
                    attribute
	</documentation>
</annotation>

then generated javadoc looks sloppy. For the example above, it will be look like this:

/**
 * Multiline documentation of
 *                     attribute
 * 
 */
@XmlAttribute(name = "multilineDocumentedAttribute")
protected String multilineDocumentedAttribute;

Unfortunately, this problem cannot be identified during tests, because the compiled class org.eclipse.jdt.core.dom.Javadoc contains TagElement with a list of fragments without extra whitespaces.

Using solution from here, javadoc will transform into:

/**
 * Multiline documentation of
 * attribute
 * 
 */
@XmlAttribute(name = "multilineDocumentedAttribute")
protected String multilineDocumentedAttribute;

@don-vip
Copy link

don-vip commented Jun 23, 2021

This would be a nice enhancement.

@ffang
Copy link
Contributor

ffang commented Jun 23, 2021

Hi @polikarpovilya,

Thanks for the contribution!

Could you please create a CXF XJC issue here and link to this PR?

Best Regards
Freeman

@polikarpovilya
Copy link
Author

@coheigea
Copy link
Contributor

Are the unit tests in JavadocPluginTest.java corresponding to the added test resources missing?

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.

4 participants