|
|
|
Re: Create ecore annotation model and use it in another ecore model [message #1854830 is a reply to message #1854810] |
Tue, 13 September 2022 18:32 |
Steve Peters Messages: 12 Registered: September 2020 |
Junior Member |
|
|
Both models are located within the same workspace, that's why I can't use extension points. I thought annotations are a common use case.
It is possible to load/map the annotation in the corresponding Ecore Model Object?
For example:
XYZ_Utils.getAnnotation(ecore::EPackage, NS_URI_FROM_ANNO_MODEL => http://www.example.org/annotation) => This method would be returned the Package(annotation.ecore) Object.
The only thing I want is ot add some extra information to my EClass.
For example:
@DslAnnotation(keyword="restservice")
class RestApiService extends MyNamedDslElement {
}
May be there's another way to do that?
[Updated on: Tue, 13 September 2022 18:42] Report message to a moderator
|
|
|
|
Re: Create ecore annotation model and use it in another ecore model [message #1854839 is a reply to message #1854836] |
Wed, 14 September 2022 06:07 |
Ed Merks Messages: 33212 Registered: July 2009 |
Senior Member |
|
|
As I mentioned, is no concept of "stereotype" in Ecore. Any association of an annotation to a specific EClass is something you'd have to implement programmatically, at which point you could generate your annotation model and could use an extension point to implement your specialized support for it, that is if eModelElement.getEAnnotation("sourceURI").getDetails().get("key") is not sufficient for your "extra information" purposes.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03759 seconds