LionWeb-io / lionweb-mps

Apache License 2.0
2 stars 2 forks source link

Also export `@Deprecated` attributes #104

Closed dslmeinte closed 4 weeks ago

dslmeinte commented 1 month ago

It'd be useful to export @Deprecated attributes on concepts and interfaces and their features as annotations on their exports (as nodes of a LionWeb M2). With that information, the generators could generate the corresponding annotations in C#/TS. (C#: [Obsolete], TS: /** @deprecated */)

In MPS, @Deprecated attributes are instances of DeprecatedNodeAnnotation, that can be put on any IStructureDeprecatable instance, including

It's probably best and easiest to add a concept Deprecated to the io.lionweb.mps.specific language, in the same way as for concept alias, concept description, virtual package, etc. The primary entrypoint (/example) for that is:

project: LionWeb-MPS (/Users/meinteboersma/Documents/LionWeb/lionweb-mps-2021.3)
module:  io.lionweb.mps.json
model:   io.lionweb.mps.json.language
root:    Language2JsonConverter [ClassConcept]
node:    attachConceptDescriptionAnnotation [InstanceMethodDeclaration]
url:     http://127.0.0.1:63320/node?ref=r%3A6239253d-0ab2-49c2-bcf4-81f1b9a92f3e%28io.lionweb.mps.json.language%29%2F4301526455774543126
enikao commented 4 weeks ago

implemented in #107