Source:
<code>public void execute() { Object constraint = null; if (elementCreationCommand != null) { elementCreationCommand.execute(); constraint = elementCreationCommand.getICommand().getCommandResult().getReturnValue(); } if (constraint instanceof Constraint && compartment != null && type != null) { viewsCreationCommand = new CompoundCommand(); ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(new EObjectAdapter((EObject) constraint), Node.class, type.getSemanticHint(), compartment.getDiagramPreferencesHint()); CreateViewRequest request = new CreateViewRequest(descriptor); Command nodeCreationCommand = compartment.getCommand(request); viewsCreationCommand.add(nodeCreationCommand); <START> viewsCreationCommand.add(new RefreshEditPartCommand(compartment)); <END> if (linkedActionEditPart != null && getLinkType() != null) { IAdaptable targetAdapter = extractResult(nodeCreationCommand); if (targetAdapter != null) { IAdaptable sourceAdapter = new SemanticAdapter(null, linkedActionEditPart.getModel()); CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getLinkType(), getLinkType().getSemanticHint(), compartment.getDiagramPreferencesHint()); CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand( editingDomain, getLinkType().getSemanticHint(), sourceAdapter, targetAdapter, compartment.getViewer(), compartment.getDiagramPreferencesHint(), linkdescriptor, null); aLinkCommand.setElement((EObject) constraint); viewsCreationCommand.add(new ICommandProxy(aLinkCommand)); } } viewsCreationCommand.execute(); } }</code><technical_language>a command refresh normaly refresh automatically if tyou add in notation</technical_language>

Target:
public void execute() { Object constraint = null; if (elementCreationCommand != null) { elementCreationCommand.execute(); constraint = elementCreationCommand.getICommand().getCommandResult().getReturnValue(); } if (constraint instanceof Constraint && compartment != null && type != null) { viewsCreationCommand = new CompoundCommand(); ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(new EObjectAdapter((EObject) constraint), Node.class, type.getSemanticHint(), compartment.getDiagramPreferencesHint()); CreateViewRequest request = new CreateViewRequest(descriptor); Command nodeCreationCommand = compartment.getCommand(request); viewsCreationCommand.add(nodeCreationCommand); if (linkedActionEditPart != null && getLinkType() != null) { IAdaptable targetAdapter = extractResult(nodeCreationCommand); if (targetAdapter != null) { IAdaptable sourceAdapter = new SemanticAdapter(null, linkedActionEditPart.getModel()); CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getLinkType(), getLinkType().getSemanticHint(), compartment.getDiagramPreferencesHint()); CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand( editingDomain, getLinkType().getSemanticHint(), sourceAdapter, targetAdapter, compartment.getViewer(), compartment.getDiagramPreferencesHint(), linkdescriptor, null); aLinkCommand.setElement((EObject) constraint); viewsCreationCommand.add(new ICommandProxy(aLinkCommand)); } } viewsCreationCommand.execute(); } }