Source:
public void refresh(boolean fullRefresh, IProgressMonitor monitor) { DTree treeItem = null; if (container instanceof DTree) { treeItem = (DTree) container; } 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(); } }

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(); } }