Bug 404744 - Flag tags as invalid if parent type is private or package default
Summary: Flag tags as invalid if parent type is private or package default
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 M7   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2013-04-02 13:28 EDT by Curtis Windatt CLA
Modified: 2013-04-26 15:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2013-04-02 13:28:19 EDT
From Bug 402393

I found an issue with our invalid tag scanner, it appears it does not thoroughly check the visibility of the a member. Consider the following example:

public class PublicStaticInner {
  static class Inner {
    /**
     * @noinstantiate This class is not intended to be instantiated by clients.
     * @noextend This class is not intended to be subclassed by clients.
     */
    public static class OpenInner {
      /**
	* @noreference This method is not intended to be referenced by clients.
	*/
	public static void one() {
	  System.out.println("one");
	}
    }
  }
}

Those tags are not flagged as invalid when they should be.
Comment 1 Curtis Windatt CLA 2013-04-03 14:32:14 EDT
Fixed in master
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=d0f1d4c694a2edef65bf0843b4f0f947a59decb8

Supports restricted annotations, enums, and interfaces as well as classes.
Messages specific to the element the tag is on (i.e. "on a field that is not visible" "on a method that is not visible").
Does not add a marker if the tag is already invalid or a duplicate

There are a few messages that will never be encountered since no tags are currently supported on annotations or enums.  I left them in for completeness and they will work if we start supporting tags on them.

The fix requires a fair number of test changes because a lot of tests use package default static outer classes.  Any tags within the outer class are now invalid.
Comment 2 Michael Rennie CLA 2013-04-05 12:03:13 EDT
The fix still allows you to autocomplete the restricted Javadoc tags on the inner type
Comment 3 Michael Rennie CLA 2013-04-17 09:55:57 EDT
(In reply to comment #2)
> The fix still allows you to autocomplete the restricted Javadoc tags on the
> inner type

fixed in: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=900fee1f7260d68697f62f23731bb45e204301c3