Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 495818 - [1.9][content assist] module references
Summary: [1.9][content assist] module references
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J9   Edit
Assignee: Noopur Gupta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 495801
Blocks:
  Show dependency tree
 
Reported: 2016-06-09 12:51 EDT by Manoj N Palat CLA
Modified: 2016-06-30 09:44 EDT (History)
4 users (show)

See Also:


Attachments
Patch used for jdt.core testing (30.38 KB, patch)
2016-06-09 12:54 EDT, Manoj N Palat CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manoj N Palat CLA 2016-06-09 12:51:11 EDT
The jdt.ui part of bug 495801
Comment 1 Manoj N Palat CLA 2016-06-09 12:54:02 EDT
Created attachment 262345 [details]
Patch used for jdt.core testing

if it helps, just attaching the patch which I used for jdt.core testing for bug 495801.
Comment 2 Noopur Gupta CLA 2016-06-10 02:12:26 EDT
As I don't see any reference to modules in the Javadoc of the CompletionProposal.getDeclarationSignature() API, is it correct that the clients should not depend on it to get the module name?

In that case, the CompletionProposal.getCompletion() API will be used to create the proposal string and is expected to return the module name, similar to keywords.
Comment 3 Noopur Gupta CLA 2016-06-10 02:13:59 EDT
We will also need a new icon for modules to be displayed in the proposals.
Comment 4 Noopur Gupta CLA 2016-06-10 02:44:43 EDT
What should be displayed as the additional info for modules in the proposals?

For existing proposals, we resolve the IJavaElement from the proposal and extract its Javadoc to show as the additional info.
Comment 5 Manoj N Palat CLA 2016-06-10 08:49:53 EDT
(In reply to Noopur Gupta from comment #2)
> As I don't see any reference to modules in the Javadoc of the
> CompletionProposal.getDeclarationSignature() API, is it correct that the
> clients should not depend on it to get the module name?
> 
In fact, declarationSignature gets updated with the module name. I've updated the javadoc in that effect now. ref bug 495801 comment 3. Client can depend on CP.getDeclarationSignature() for moduleName.
Comment 6 Manoj N Palat CLA 2016-06-10 09:00:10 EDT
(In reply to Noopur Gupta from comment #4)
> What should be displayed as the additional info for modules in the proposals?
> 
> For existing proposals, we resolve the IJavaElement from the proposal and
> extract its Javadoc to show as the additional info.

At this poiint, we don't have IJavaElement corresponding to module-info. I would suggest to hold on to this for sometime until we have clarity on modules (479483) and then can revisit to provide appropriate additional information. One possible information could be the name of the container that defines this module.
Comment 7 Eclipse Genie CLA 2016-06-10 09:55:44 EDT
New Gerrit change created: https://git.eclipse.org/r/75066
Comment 8 Noopur Gupta CLA 2016-06-10 09:59:46 EDT
(In reply to Eclipse Genie from comment #7)
> New Gerrit change created: https://git.eclipse.org/r/75066

Implementation without any icon and additional info for now.
Comment 9 Eclipse Genie CLA 2016-06-30 09:15:36 EDT
New Gerrit change created: https://git.eclipse.org/r/76331
Comment 10 Noopur Gupta CLA 2016-06-30 09:44:26 EDT
Using the project image "IMG_OBJ_PROJECT" for modules (as done in CPListLabelProvider) and no additional info. Released to BETA_JAVA9 branch via:
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?h=BETA_JAVA9&id=18014205888d9c4937fd1f587ede7d19fb293401