Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inner type completions on partially-qualified expressions w/o supporting import #461

Closed
eric-milles opened this issue Feb 8, 2018 · 4 comments
Assignees
Milestone

Comments

@eric-milles
Copy link
Member

In Java editor, code assist for Map.Ent| results in a proposal for java.util.Map.Entry and application of the proposal adds an import or qualifier (depending on Content Assist preferences). Groovy editor is missing proposals for partially-qualified names like Map.Ent when the supporting type name is not imported (i.e. Map is a bad example for Groovy since java.util is default imported).

@eric-milles eric-milles added this to the v3.0.0 milestone Feb 8, 2018
eric-milles added a commit that referenced this issue Feb 11, 2018
- reduce parameters and variables in GroovyProposalTypeSearchRequestor
- move all type completion processing to TypeCompletionProcessor
- shore up the constructor proposal pipeline
@eric-milles
Copy link
Member Author

eric-milles commented Feb 11, 2018

Constructor completion is missing necessary qualifier segments. "new Outer.Inn|" shows proposal that is missing "Outer" and completes to "new pack.Inner()" or "import pack.Inner; new Inner()". Type completion followed by typing () followed by method context proposals from within the parens is an available workaround.

@eric-milles eric-milles self-assigned this Feb 11, 2018
@eric-milles
Copy link
Member Author

eric-milles commented Feb 12, 2018

NOTE: Groovy and Java seem to be indexed differently because org.eclipse.jdt.internal.core.SearchableEnvironment.findConstructorDeclarations(char[], boolean, ISearchRequestor, IProgressMonitor) is finding inner type constructors for Groovy but not Java. This should be understood so that Groovy can provide consistent behavior.

@mauromol
Copy link

Hi Eric,
please note that when trying to verify this fix with 3.0.0.xx-201802122322-e47, I face an inconsistency which I think has its root cause in #411. I'll try to explain.
If I type: Map. => (pause) => Ent and then look at the list of suggestions (which opens automatically in this case, because I have Java | Editor | Content Assist | Enable Auto Activation option checked), Map.Entry is not available.
If, instead, I start from: Map.Ent (being the suggestion list closed) and hit Ctrl+Space, Map.Entry is completed correctly (being the only applicable suggestion, so no list is needed).

@eric-milles
Copy link
Member Author

eric-milles commented Feb 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants