There are a few alternative ways to expose this.
The most obvious is a RK_Pattern, but it seems to have some triggering problems.
Consider a completion "case Color::Red"
- we want the user input to match Red
- we *don't* want the user input to match Color::
- if "case" is displayed, users will expect to be able to match it.
It's not possible to satisfy all of these:
- [TypedText:case] [Text:Color::][TypedText:Red] has a bad getTypedText()
- [Text:case] [Text:Color::][TypedText:Red] shows "case" but you can't type it
- [TypedText:case Color::TypedText:Red] will match against the qualifier
(I suspect the third is the least bad here)
The option explored here is to provide a regular Declaration completion, but
with "case" inserted as a fix-it. This results in "case" being neither displayed
or matched, but inserted. (If the user types "case", the existing completions
kick in.)
Curious what you think. I'm biased as I'm working on an integration that
supports fixits but not patterns :-)