Bug 440953 - [Java Discoverer] Bad javadoc elements content when using Java annotation with parameter in javadoc
Summary: [Java Discoverer] Bad javadoc elements content when using Java annotation wit...
Status: NEW
Alias: None
Product: MoDisco
Classification: Modeling
Component: Technologies (show other bugs)
Version: 0.11.1   Edit
Hardware: PC Windows 7
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-01 04:30 EDT by Fabien Giquel CLA
Modified: 2014-08-01 05:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2014-08-01 04:30:33 EDT
For instance with the following code

	/**
	 * @Monannotation("monparametre")
	 */
	public static void main(String[] args) {
		// @Monannotation("monparametre")

	}


in Java model built from discoverer, Javadoc element contains on TagElement intance without name (instead of 'Monannotation') and one wrong fragment TextElement with content '"monparametre")'.

Modisco and jdt metamodels do not modelize annotations parameters values. At least, the content of TextElement should be '("monparametre")'
Comment 1 Fabien Giquel CLA 2014-08-01 05:38:11 EDT
The problem comes from jdt model. In jdt TagElement instance, the information is wrong (no name, and truncated jdt TextElement intance).

- Use case is rare : usual annotations set in javadoc do not have parameter values (@param, @return @see, ...)
- A workaround is using the javadoccomment content to retrieve the complete text of theTagelement -> the 453282 solution also permits to have good Javadoc.content value for this 440953 uses cases.

=> issue improtance is low
Comment 2 Fabien Giquel CLA 2014-08-01 05:46:49 EDT
"the 453282 solution also permits ..."

-> "the 435282 solution also permits ..."