Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
CDT/Obsolete/C editor enhancements/Context-sensitive filtering of context assist
This is a problem page. Please treat it as a discussion page and feel free to insert your comments anywhere. My open questions are in bold--Tomasz Wesołowski 18:35, 6 May 2010 (UTC)
Description
In many situations, the Context Assist provides a lot of possibilities basing on the name only. Many of them are likely to produce compile errors when used. The IDE has enough information to filter the list and give more accurate suggestions.
Ranking
Category: editing
Importance: 3/5 --Tomasz Wesołowski 18:35, 6 May 2010 (UTC)
2/5 --Jens Elmenthaler
3/5 --Kirstin Weber 08:43, 10 June 2010 (UTC) Note: This task might be not so important but maybe it is a "low hanging fruit" because as said the IDE already has the information.
Please append your opinion here.
Solution
Context analysis
There are numerous situations where the context gives enough information to deduce what type is expected. Those include:
- Function calls,
- Operator expressions,
- Initializers.
list probably incomplete - suggestions?
Proposal processing
If the required type is known, then every proposal should be filtered to remain on the list only if its type is castable to the required type.
Alternative: Instead of filtering, type matching may be used for sorting the proposals (with higher priority than alphabetical order of the name).