Custom persistence questions


I'm trying to implement simple json-based custom persistence by following the cookbook and have some questions:

  1. How can I specify that it can be used only for specific model types?
  2. XmlModelPersistence example uses SModelBase.getSModelInternal call which is deprecated (in 3.0?), should it just be getSModel?
  3. XmlModelPersistence creates a module reference to j.m.core.xml using a cryptic UUID-like string. Where did it come from? I guess I will need to add a reference to my language in a similar way
  4. Is it possible to hook the plugin such that it will be used by default when editing certain kind of .json files?
  5. How to create new models within IDEA and have them persisted using custom persistence? Custom persistence cookbook only talks about opening existing models.
  6. IDEA doesn't detect file content changes when they're edited via MPS plugin, any way to make it refresh? If a file is under VCS it turns blue but editor shows old contents
  7. How to deal with circular references? Imagine 2 models referencing each other, how to set up the references when models are being loaded one by one?

Off-topic questions:

  1. How to enable debug=true for javac (for line number information) in generated ant build scripts?

1 comment
Comment actions Permalink
anwering myself:

(1) can be solved by implementing ModelFactory.canCreate to only accept files with specific names or content
(3) can be obtained from .msd files

see also

Please sign in to leave a comment.