Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320213 - JdtTypesProposalProvider: completion contains imported package name
Summary: JdtTypesProposalProvider: completion contains imported package name
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 02:29 EDT by Victor Noël CLA
Modified: 2017-09-19 15:48 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Noël CLA 2010-07-19 02:29:57 EDT
Hello,

When using JdtTypesProposalProvider for createTypeProposals, the completed references contains the complete qualifiedName with the package even if the package is imported.

See http://www.eclipse.org/forums/index.php?t=msg&&th=171661&goto=546297#msg_546297
Comment 1 Sebastian Zarnekow CLA 2010-08-05 11:48:23 EDT
@Inject
private ITypesProposalProvider.IScopableTypesProposalProvider typesProposalProvider;

@Override
public void completeReferenceHolder_CustomizedReference(EObject model, Assignment assignment,
		ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
	IScope scope = getScopeProvider().getScope(model, ContentAssistTestLanguagePackage.Literals.REFERENCE_HOLDER__CUSTOMIZED_REFERENCE);
	ITypesProposalProvider scopedProposalProvider = typesProposalProvider.getScopedProposalProvider(model, scope);
	scopedProposalProvider.createTypeProposals(this, context, acceptor);
}


Fixed in HEAD.
Use the newly introduced ITypesProposalProvider.IScopableTypesProposalProvider  to create proposals that are aware of imports. This API is preliminary as it is designed as a backwards compatible workaround for 1.0.1. Please note that it is likely to change in Indigo.
Comment 2 Karsten Thoms CLA 2017-09-19 15:48:30 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.