@@ -34,17 +34,15 @@ import kotlinx.html.tr
34
34
import kotlinx.html.ul
35
35
import kotlinx.html.unsafe
36
36
import org.modelix.model.ModelFacade
37
+ import org.modelix.model.api.BuiltinLanguages
38
+ import org.modelix.model.api.INodeResolutionScope
37
39
import org.modelix.model.api.ITree
38
40
import org.modelix.model.api.PNodeAdapter
39
41
import org.modelix.model.api.TreePointer
40
42
import org.modelix.model.client.IModelClient
41
43
import org.modelix.model.lazy.CLVersion
42
44
import org.modelix.model.server.templates.PageWithMenuBar
43
- import kotlin.collections.List
44
- import kotlin.collections.isNotEmpty
45
- import kotlin.collections.mutableListOf
46
45
import kotlin.collections.set
47
- import kotlin.collections.toList
48
46
49
47
class ContentExplorer (private val client : IModelClient , private val repoManager : RepositoriesManager ) {
50
48
@@ -138,7 +136,11 @@ class ContentExplorer(private val client: IModelClient, private val repoManager:
138
136
div(" nameField" ) {
139
137
attributes[" data-nodeid" ] = node.nodeId.toString()
140
138
b {
141
- if (node.getPropertyRoles().contains(" name" )) {
139
+ val namePropertyUID = BuiltinLanguages .jetbrains_mps_lang_core.INamedConcept .name.getUID()
140
+ val namedConceptName = node.getPropertyValue(namePropertyUID)
141
+ if (namedConceptName != null ) {
142
+ + namedConceptName
143
+ } else if (node.getPropertyRoles().contains(" name" )) {
142
144
+ " ${node.getPropertyValue(" name" )} "
143
145
} else {
144
146
+ " Unnamed Node"
@@ -187,7 +189,7 @@ class ContentExplorer(private val client: IModelClient, private val repoManager:
187
189
for (propertyRole in node.getPropertyRoles()) {
188
190
tr {
189
191
td { + propertyRole }
190
- td { + ( node.getPropertyValue(propertyRole) ? : " null " ) }
192
+ td { + " ${ node.getPropertyValue(propertyRole)} " }
191
193
}
192
194
}
193
195
}
@@ -202,12 +204,13 @@ class ContentExplorer(private val client: IModelClient, private val repoManager:
202
204
th { + " Value" }
203
205
}
204
206
}
205
- for (referenceRole in node.getReferenceRoles()) {
206
- tr {
207
- td { + referenceRole }
208
- td {
209
- // TODO MODELIX-387
210
- // +"${node.getReferenceTarget(referenceRole)}"
207
+ INodeResolutionScope .runWithAdditionalScope(node.getArea()) {
208
+ for (referenceRole in node.getReferenceRoles()) {
209
+ tr {
210
+ td { + referenceRole }
211
+ td {
212
+ + " ${node.getReferenceTarget(referenceRole)} "
213
+ }
211
214
}
212
215
}
213
216
}
0 commit comments