Editors for Concepts with derived names

Hi,

first, thanks for releasing the version 1.5RC2!!

So, I have this small problem that was going on in 1.1 and was not fixed in 1.5RC2 (or can be that I am doing something wrong).

I have a concept C that can be root and has an editor. It references a single target concept T. Both implement INamedConcept and, therefore, have the "name" property.

I want concept C's name to be always the same as the referenced concept T. So I added a "get" contraint to the "name" property of concept C. The result is what I expected in the project tree, i.e., the name of an instance of C there is the name of the instance of T it references. The problem is that when I open an editor for this instance, the editor does not seem to use the getter when naming the tab, it always writes "<no name> [C]".

Am I doing something wrong or is this a bug in the way the editor asks for the name to put in a tab's title?

Thanks,

Thiago

3 comments
Comment actions Permalink

Oh, and another hint.

I have a field in the editor to select the target concept T by name. If I explicitly create another field in the editor that shows the name property of C, then the editor tab shows up correctly, even if the field is not editable. If I add the field but make it optional and always return false to the "show if" callback, then the title shows <no name>.

Cheers,

Thiago

0
Comment actions Permalink

Hello, Thiago!

I've checked this problem and unfortunately have to confirm - this is a bug in MPS. I suggest you to file a request (using this form http://youtrack.jetbrains.net/issues/MPS#newissue=yes) and we'll fix this problem in the next version.

The problem is in incorrect internal cache updating, so you can somehow work around and force it to reload new name value (for example - as you described in another post - by adding new read-only field).

0
Comment actions Permalink

Hi Alex,

thanks for confirming this. I created the bug report here:

http://youtrack.jetbrains.net/issue/MPS-9664?projectKey=MPS

Bests,

Thiago

0

Please sign in to leave a comment.