Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Duck Typing
Duck Typing [message #1839091] Sat, 13 March 2021 05:08
Eclipse UserFriend
I have a language that requires duck typing.

interface Itf {
  attrFromInterface
}

type A implements Itf {
   attrFromType
}


So given a reference of type "Itf" the attribute attrFromType shall also be visible.

I know how to access the index, but in the index there is not enough information to know who implements this interface Itf.

The question is: how do I solve this? Loading all the types in the scope provider seems to be a bit heavy (though it would not kill us in our use case as we don't have that many types). However, I have seen that the IEObjectDescription have the possibility to attach "user data". Would that be a sensible approach to attach the implemented interface in the IEObjectDescription for all the types?
Previous Topic:Guice error in tests after adding Formatter [SOLVED]
Next Topic:Missing EOF error
Goto Forum:
  


Current Time: Wed Jul 16 03:29:09 EDT 2025

Powered by FUDForum. Page generated in 0.08025 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top