Community
Participate
Working Groups
Created attachment 99501 [details] Test case Consider the attached test case, no error are reported in class Clazz inside test1. If the class NoInstantiateClazz2 is moved to a named package, the usage warnings are properly reported.
This is not considered as critical as there is no types inside the default packages in Eclipse bundles.
Since default packages are not used in SDK plug-ins, this is not an issue for 3.4.
Assigned for future consideration.
I am looking at it. I have a fix for this one.
For this case, the class (NoInstantiateClazz2) is not getting resolved because during resolution of default package is Test2, the project component in which NoInstantiateClazz2 resides cannot be retrieved. And hence the class NoInstantiateClazz2 cannot be found ( because that is searched only in Test1 Project Component) due to which problem detection is skipped. But this is a generic problem which will happen for all tags across projects and if the tag reside in default package. The code fix is at https://git.eclipse.org/r/#/c/21308/
There is a mismatch of exported package representation and empty package string. Once that is set, the project component can be appropriately located and the class is resolved. Thereafter the problem detection is successful.
Fix works well. Tried with @noinstantiate @noreference and @noextend tags. Current patchset doesn't include copyright update. If possible, please write a few test cases for this fix. In org.eclipse.pde.api.tools.tests all of the usage test (package org.eclipse.pde.api.tools.builder.tests.usage) refer to files inside named packages (test-builder\usageprojects\refproject\src\f\FieldUsageClass.java). Even having a single file with some different tags in it would be a good regression test.
(In reply to Curtis Windatt from comment #7) > Fix works well. Tried with @noinstantiate @noreference and @noextend tags. > > Current patchset doesn't include copyright update. > > If possible, please write a few test cases for this fix. In > org.eclipse.pde.api.tools.tests all of the usage test (package > org.eclipse.pde.api.tools.builder.tests.usage) refer to files inside named > packages (test-builder\usageprojects\refproject\src\f\FieldUsageClass.java). > Even having a single file with some different tags in it would be a good > regression test. It would be good to also make sure there is test coverage using the annotations as well as the Javadoc tags.
(In reply to Michael Rennie from comment #8) > It would be good to also make sure there is test coverage using the > annotations as well as the Javadoc tags. Note that I tested that the fix handles both javadoc tags and annotations correctly. Test coverage for both would still be smart.
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=758a7aa3ed77ac11688974b5feb9f6a1a80c1464 Merged with master, thank you Vikas.
Verified for Eclipse(4.4) Luna M6 using build eclipse-SDK-I20140303-2000-win32-x86_64