/** @generated */
 public static void performCanonicalUpdate(EObject modelElement) {
   if (modelElement == null) {
     return;
   }
   List editPolicies = CanonicalEditPolicy.getRegisteredEditPolicies(modelElement);
   for (Iterator it = editPolicies.iterator(); it.hasNext(); ) {
     CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy) it.next();
     nextEditPolicy.refresh();
   }
 }
 /** @generated */
 protected void refreshOnActivate() {
   // Need to activate editpart children before invoking the canonical refresh for EditParts to add
   // event listeners
   List<?> c = getHost().getChildren();
   for (int i = 0; i < c.size(); i++) {
     ((EditPart) c.get(i)).activate();
   }
   super.refreshOnActivate();
 }
 /** @was-generated */
 public Object execute(ExecutionEvent event) throws ExecutionException {
   ISelection selection =
       PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
   if (selection instanceof IStructuredSelection) {
     IStructuredSelection structuredSelection = (IStructuredSelection) selection;
     if (structuredSelection.size() != 1) {
       return null;
     }
     if (structuredSelection.getFirstElement() instanceof EditPart
         && ((EditPart) structuredSelection.getFirstElement()).getModel() instanceof View) {
       EObject modelElement =
           ((View) ((EditPart) structuredSelection.getFirstElement()).getModel()).getElement();
       List editPolicies = CanonicalEditPolicy.getRegisteredEditPolicies(modelElement);
       for (Iterator it = editPolicies.iterator(); it.hasNext(); ) {
         CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy) it.next();
         nextEditPolicy.refresh();
       }
     }
   }
   return null;
 }