eclipse-emfcloud / theia-tree-editor

theia-tree-editor
Other
15 stars 12 forks source link

getChildrenMapping allow for dynamic children based on context #65

Closed syncharny closed 1 year ago

syncharny commented 2 years ago

I'm trying to build the tree viewer based on schema and ui-schema that are on the filesystem, but I seem to have to define the children and typeIds in code

allow for getChildrenMapping to be called when the model service is constructed

I'm not really sure how to solve this problem

lucas-koehler commented 2 years ago

Hello @syncharny ,

could you elaborate a bit more what exactly you want to do and what is your expectation for the getChildrenMapping method?

I expect that your problem is that getChildrenMapping is called in BaseTreeEditorContribution before a tree is even opened? You could try not using the BaseTreeEditorContribution and register the commands and menus yourself right before your tree is opened. With this, you also need to register a custom WidgetOpenHandler for your tree.

eneufeld commented 1 year ago

Please reopen if the question is still not fully answered.