Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 531705 - Java Module search does not search for automatic modules
Summary: Java Module search does not search for automatic modules
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.8 M7   Edit
Assignee: Manoj N Palat CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 528930
  Show dependency tree
 
Reported: 2018-02-27 01:14 EST by Kalyan Prasad Tatavarthi CLA
Modified: 2018-05-10 14:18 EDT (History)
3 users (show)

See Also:


Attachments
Sample project to reproduce the bug (1.76 KB, application/x-zip-compressed)
2018-02-27 01:14 EST, Kalyan Prasad Tatavarthi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalyan Prasad Tatavarthi CLA 2018-02-27 01:14:17 EST
Created attachment 272895 [details]
Sample project to reproduce the bug

Steps to Reproduce:
1) Import the attached project into Eclipse
2) Search for module "org.eclipse.jupiter.api" by selecting
Search > Java and Selecting search type as Module and Limit to All Occurences.

The search reports  0 occurrences, even though the Junit5 jar containing this Automatic Module is present in its module path.

The expected behavior is that the search for the module should yield the Junit5 jar,
if the jar is added to module path or build path.
Comment 1 Eclipse Genie CLA 2018-02-27 12:26:17 EST
New Gerrit change created: https://git.eclipse.org/r/118288
Comment 3 Manoj N Palat CLA 2018-02-28 21:49:31 EST
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/118288 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=bf6a4008daf8d98e0cec7c91279c54eace8d943b

The above patch has the implementation of the fix - tests to follow soon
(tested manually  - pushed to unblock ui for now)
{ Dev Notes: Automatic Module name comes either from the Manifest.MF or the non-manifest name created from the jar name  - these do not have an underlying IJE - even manifest.mf cannot be considered since its non-java. In the indexing part, the name will be flagged with Automatic Module magic word. During the search time, the possible match caches this auto module name, and the contents would be created for module with the automatic module name when PM answers the contents. The search would proceed normally then and at the reporting time, would return the search match with the parent IJE.}
Comment 4 Eclipse Genie CLA 2018-03-12 13:17:20 EDT
New Gerrit change created: https://git.eclipse.org/r/119251
Comment 5 Manoj N Palat CLA 2018-03-12 13:18:01 EDT
(In reply to Kalyan Prasad Tatavarthi from comment #0)
> Created attachment 272895 [details]
> 2) Search for module "org.eclipse.jupiter.api" by selecting
I believe this is org.junit.jupiter.api?
Comment 6 Manoj N Palat CLA 2018-03-12 13:18:55 EDT
(In reply to Eclipse Genie from comment #4)
> New Gerrit change created: https://git.eclipse.org/r/119251

Adds test case and also adds support for the workspace relative path
Comment 8 Jay Arthanareeswaran CLA 2018-05-10 12:53:49 EDT
I still see the same behavior reported in comment #0. Kalyan, can you check please?
Comment 9 Kalyan Prasad Tatavarthi CLA 2018-05-10 14:18:08 EDT
I have tested this scenario by creating a new Java9 project and adding Junit5 library to its class path and searched for "org.junit.jupiter.api", which was successful.

So This fix is verified in the Build I20180509-2000