Bug 482095 - JdtTypesProposalProvider.createSubTypeProposals proposes Innerclasses of SubTypes as well
Summary: JdtTypesProposalProvider.createSubTypeProposals proposes Innerclasses of SubT...
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.9.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-13 05:00 EST by Christian Dietrich CLA
Modified: 2019-08-22 05:21 EDT (History)
2 users (show)

See Also:


Attachments
sample model (6.13 KB, application/zip)
2015-11-13 05:00 EST, Christian Dietrich CLA
no flags Details
sample dsls (842.76 KB, application/zip)
2015-11-13 05:01 EST, Christian Dietrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2015-11-13 05:00:41 EST
Created attachment 257916 [details]
sample model

JdtTypesProposalProvider.createSubTypeProposals proposes Innerclasses of SubTypes as well

An Example Project to reproduce is attached.
Comment 1 Christian Dietrich CLA 2015-11-13 05:01:06 EST
Created attachment 257917 [details]
sample dsls
Comment 2 Christian Dietrich CLA 2015-11-13 05:17:02 EST
Debugging show that org.eclipse.jdt.internal.core.search.new IndexQueryRequestor() {...}.acceptIndexMatch(String, SearchPattern, SearchParticipant, AccessRuleSet) in
org.eclipse.jdt.internal.core.search.BasicSearchEngine.searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, IRestrictedAccessTypeRequestor, int, IProgressMonitor)

seems no to care about hierarchy and simply calls accept type


the jdt open type hierarchy seems to do that different

org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.searchAllPossibleSubTypes(IType, IJavaSearchScope, Map, IPathRequestor, int, IProgressMonitor)
Comment 3 Olaf Lenz CLA 2015-11-18 10:14:02 EST
I note that in the TypeMatchFilters, the function isInternalClass expects the type name (or enclosing type name) to start with '$' to recognize an internal class, while the names provided by the JdtTypesProposalProvider does not contain them.
Comment 4 Christian Dietrich CLA 2019-08-22 05:21:08 EDT
Hello Andrey,

this issue still strikes us.
do you have any idea if this can be fixed on JDT side