Search in sources :

Example 1 with TreeRenderer

use of org.eclipse.sirius.components.trees.renderer.TreeRenderer in project sirius-components by eclipse-sirius.

the class TreeService method create.

@Override
public Tree create(TreeCreationParameters treeCreationParameters) {
    VariableManager variableManager = new VariableManager();
    variableManager.put(GetOrCreateRandomIdProvider.PREVIOUS_REPRESENTATION_ID, treeCreationParameters.getId());
    variableManager.put(IEditingContext.EDITING_CONTEXT, treeCreationParameters.getEditingContext());
    variableManager.put(TreeRenderer.EXPANDED, treeCreationParameters.getExpanded());
    TreeRenderer treeRenderer = new TreeRenderer(variableManager, treeCreationParameters.getTreeDescription());
    return treeRenderer.render();
}
Also used : VariableManager(org.eclipse.sirius.components.representations.VariableManager) TreeRenderer(org.eclipse.sirius.components.trees.renderer.TreeRenderer)

Aggregations

VariableManager (org.eclipse.sirius.components.representations.VariableManager)1 TreeRenderer (org.eclipse.sirius.components.trees.renderer.TreeRenderer)1