MPS is allowing two model with same name under a solution.

MPS is allowing two model with same name under a solution. Not sure if it is a expected behavior as the file system will not allow it?

Attaching the screen shot which pops up when i am trying to do any modification to any of these model.

MPS_VERSION: MPS3.4EAP

Java Version: jdk1.8

OS: Windows 7

(Note: I am just curious to know why MPS is allowing to create a model under a model, this works fine but could not able to figure out why it is allowed, p.s- the child model is not inheriting the parent's property)

 

4 comments

Thank you for spotting. This is most likely a bug (entered as https://youtrack.jetbrains.com/issue/MPS-24612)

Vaclav

 

0

Hi Vaclav thanks,

Can you please clarify me about my second doubt, i.e- MPS is allowing to create a model under a model, is that usual (It is not inheriting any property of the parent model)?

0

This is similar to why, for example, Java has packages - to allow you to structure your code into smaller logical groups and organize them hierarchically.

0

But there is something fishy i feel.
1- I create a Solution "NewSolution"

2- RightClick on solution create a model name "MyParentModel"

3- RightClick on solution create a model name "MyParentModel.MyChildModel" (MyChildModel got created under MyParentModel)

4- Now i delete "MyParentModel", this will not delete "MyChildModel" and it will be displayed under a folder "MyParentModel"

(What i was suspecting before is MPS is not able to differentiate a folder name with .mps file name in the logical view hence it is projecting in that way, it is showing correctly in File System)

There are other problem like if after performing the above steps if i rename "MyParentModel" mps is showing conflicts and errors.

Logical View

FileSystem View


0

Please sign in to leave a comment.