Source:
<code>public void refresh(boolean fullRefresh, IProgressMonitor monitor) { DTree treeItem = null; <START> if (container instanceof DTree) { treeItem = (DTree) container; } <END> try { monitor.beginTask("Refresh tree", 4); if (ctx.getModelAccessor().getPermissionAuthority().canEditInstance(container)) { if (treeItem != null && treeItem.getTarget() != null) { ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.CONTAINER_VIEW, treeItem.eContainer()); ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.CONTAINER, treeItem.getTarget()); ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.VIEW, treeItem); } MappingHiearchyTable hierarchy = new MappingHiearchyTable(); SignatureProvider signProvider = new TreeSignatureProvider(hierarchy); SemanticPartitionProvider semProvider = new SemanticPartitionProvider(this.ctx); final TreeMappingProvider provider = new TreeMappingProvider(semProvider); Iterable<Mapping> providedMappings = Iterables.transform(mappings, new Function<TreeItemMapping, Mapping>() { public Mapping apply(TreeItemMapping from) { return provider.getOrCreate(from); } }); monitor.worked(1); hierarchy.compute(Lists.newArrayList(providedMappings)); monitor.worked(1); DTreePreRefreshStatus pre = new DTreePreRefreshStatus(ctx, provider); ModelToModelSynchronizer refresher = new ModelToModelSynchronizer(this.invalidator, hierarchy, pre, signProvider); CreatedOutput cDiag = buildOutput(provider); monitor.worked(1); refresher.update(cDiag, fullRefresh); monitor.worked(1); } } finally { if (treeItem != null) { ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.CONTAINER_VIEW); ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.CONTAINER); ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.VIEW); } monitor.done(); } }</code><technical_language>container is a DTreeItemContainer : contains some other DTeeItem a DTree a DTreeItem If is a DTree: VIEW variable ContainerView variable DTree, ContainerView representation container. (This consistent diagram table)</technical_language>

Target:
public void refresh(boolean fullRefresh, IProgressMonitor monitor) { try { monitor.beginTask("Refresh tree", 4); if (ctx.getModelAccessor().getPermissionAuthority().canEditInstance(container)) { if (container != null && container.getTarget() != null) { ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.CONTAINER_VIEW, container.eContainer()); ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.CONTAINER, container.getTarget()); ctx.getInterpreter().setVariable(IInterpreterSiriusVariables.VIEW, container); } MappingHiearchyTable hierarchy = new MappingHiearchyTable(); SignatureProvider signProvider = new TreeSignatureProvider(hierarchy); SemanticPartitionProvider semProvider = new SemanticPartitionProvider(this.ctx); final TreeMappingProvider provider = new TreeMappingProvider(semProvider); Iterable<Mapping> providedMappings = Iterables.transform(mappings, new Function<TreeItemMapping, Mapping>() { public Mapping apply(TreeItemMapping from) { return provider.getOrCreate(from); } }); monitor.worked(1); hierarchy.compute(Lists.newArrayList(providedMappings)); monitor.worked(1); DTreePreRefreshStatus pre = new DTreePreRefreshStatus(ctx, provider); ModelToModelSynchronizer refresher = new ModelToModelSynchronizer(this.invalidator, hierarchy, pre, signProvider); CreatedOutput cDiag = buildOutput(provider); monitor.worked(1); refresher.update(cDiag, fullRefresh); monitor.worked(1); } } finally { if (container != null) { ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.CONTAINER_VIEW); ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.CONTAINER); ctx.getInterpreter().unSetVariable(IInterpreterSiriusVariables.VIEW); } monitor.done(); } }