How does hitting '<' in a baseLanguage class name work?

If you hit '<' at the end of a name in baseLanguage it creates an unnamed type variable. I've been browsing the models related to this but I don't see how it hooks that up.

I'm trying to do something extremely similar and hoping to learn how from the examples.
5 comments
Comment actions Permalink
I think you're meaning generics.

Look at addGenericTypeDeclaration in concept Type.

It's done using side-transforms actions.
0
Comment actions Permalink
Yup that's what I was looking for. I had looked in ClassConcept, Classifier, GenericDeclaration

Is there a way I could have discovered this w/o an exhaustive manual search?
0
Comment actions Permalink
Oh, I think I see, The field exists directly to the right w/ left-punctuation (or does that matter?) of the name field, I could have

looked in ClassConcept's editor,
Gone to _GenericDeclaration_TypeVariables_Component,
Gone to typeVariableDeclaration,
Gone to TypeVariableDeclaration,
Gone to Type,
Looked at the actions.

I think there would still be a few possible false branches if I didn't make reasonable guesses, but is that right?
0
Comment actions Permalink
I think you can file a request for it - MPS can provide possibility to navigate to corresponding editor action declaration on Ctrl+Clicking onto an item from popup menu.

Looks handy for new MPS users.
0
Comment actions Permalink
Hrm I'm not sure how that's related to my Q. I don't see the "add a  type variable declaration" anywhere in an intentions menu?

It seems you can already go to definition on a given intention pretty easily using the intentions menu.

Do I misunderstand?
0

Please sign in to leave a comment.