Search code examples
mps

Implement Serializable in BaseLanguage Class


How can I implement Serializable in a class in BaseLanguage?

What I did so far:

  • Using MPS 3.3.4
  • Create new solution Project
  • Add new Model
  • Add module.JDK@project_stub as Dependency
  • Add jetbrains.mps.baseLanguage as Used Language
  • Add new Class
  • Trigger implements in editor.
  • Trigger AutoComplete

The editor now shows a list of available interfaces from java.lang namespace, like Clonable, Comparable and so on. However, there is no Serializable. The same behavior emerges when I try to implement Serializable in a Generator.

Is this a bug or am I missing something?


Solution

  • You perhaps did not import the java.io@java_stub model to your dependencies. Control + M while in the editor will do the job.

    Vaclav