Closed izsob closed 11 years ago
@izsob Can you please share the metamodel/project that you are working on? I have tried it with a dummy ecore model and it worked fine for enums.
Now I see it's a special case. When I try to type Person.sex(P, Sex::female);
and
Person.sex(P, Se<Ctrl+Space>);
than it's not completed. (Maybe the editor classifies it as a variable?)Person.sex(P, <Ctrl+Space>);
Person.sex(P, Sex::fem<Ctrl+Space>);
I consider this a minor issue.
What I have found so far:
Look for the PrefixMatcher implementation. I think, that is what you are searching for. A simple one is added https://github.com/ujhelyiz/EMF-IncQuery/blob/master/plugins/org.eclipse.incquery.patternlanguage.emf.ui/src/org/eclipse/incquery/patternlanguage/emf/ui/contentassist/EMFPatternLanguageProposalProvider.java class - a new one can be added for enums.
@ujhelyiz Please take a look at the proposed fix.
After a minor cleanup I consider this issue fixed. Thanks, @szabta89.
@izsob please check it works for all your cases, and then close the ticket.
This works in most cases, so I close the ticket. Thank you for this useful enhancement!
((Although when I code-complete the enum class, then continue typing reaching the colon, the list is closed. Then code completion works only after typing all of the two colons: Person.sex(P, Se<Ctrl+Space>x:<Ctrl+Space>);
))
Code completion doesn't work for enumerations, for example while typing the second argument of the following pattern body condition: