/**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public InputPin createTarget(String name, Type type, EClass eClass) {
   InputPin newTarget = (InputPin) create(eClass);
   setTarget(newTarget);
   if (name != null) newTarget.setName(name);
   if (type != null) newTarget.setType(type);
   return newTarget;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public InputPin getTarget() {
   if (target != null && target.eIsProxy()) {
     InternalEObject oldTarget = (InternalEObject) target;
     target = (InputPin) eResolveProxy(oldTarget);
     if (target != oldTarget) {
       InternalEObject newTarget = (InternalEObject) target;
       NotificationChain msgs =
           oldTarget.eInverseRemove(
               this, EOPPOSITE_FEATURE_BASE - UMLPackage.SEND_SIGNAL_ACTION__TARGET, null, null);
       if (newTarget.eInternalContainer() == null) {
         msgs =
             newTarget.eInverseAdd(
                 this, EOPPOSITE_FEATURE_BASE - UMLPackage.SEND_SIGNAL_ACTION__TARGET, null, msgs);
       }
       if (msgs != null) msgs.dispatch();
       if (eNotificationRequired())
         eNotify(
             new ENotificationImpl(
                 this,
                 Notification.RESOLVE,
                 UMLPackage.SEND_SIGNAL_ACTION__TARGET,
                 oldTarget,
                 target));
     }
   }
   return target;
 }
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * <!-- begin-model-doc -->
   * Actions adding a value to ordered structural features must have a single input pin for the
   * insertion point with type UnlimitedNatural and multiplicity of 1..1, otherwise the action has
   * no input pin for the insertion point. let insertAtPins : Collection = self.insertAt in if
   * self.structuralFeature.isOrdered = #false then insertAtPins->size() = 0 else let insertAtPin :
   * InputPin= insertAt->asSequence()->first() in insertAtPins->size() = 1 and insertAtPin.type =
   * UnlimitedNatural and insertAtPin.multiplicity.is(1,1)) endif
   *
   * @param addStructuralFeatureValueAction The receiving '<em><b>Add Structural Feature Value
   *     Action</b></em>' model object.
   * @param diagnostics The chain of diagnostics to which problems are to be appended.
   * @param context The cache of context-specific information.
   *     <!-- end-model-doc -->
   * @generated NOT
   */
  public static boolean validateUnlimitedNaturalAndMultiplicity(
      AddStructuralFeatureValueAction addStructuralFeatureValueAction,
      DiagnosticChain diagnostics,
      Map<Object, Object> context) {
    boolean result = true;

    StructuralFeature structuralFeature = addStructuralFeatureValueAction.getStructuralFeature();

    if (structuralFeature != null) {
      InputPin insertAt = addStructuralFeatureValueAction.getInsertAt();

      if (structuralFeature.isOrdered()) {
        Type insertAtType = insertAt == null ? null : insertAt.getType();

        result =
            insertAtType instanceof PrimitiveType
                && safeEquals(
                    "PrimitiveTypes::UnlimitedNatural", //$NON-NLS-1$
                    insertAtType.getQualifiedName())
                && insertAt.is(1, 1);
      } else {
        result = insertAt == null;
      }

      if (!result && diagnostics != null) {
        diagnostics.add(
            new BasicDiagnostic(
                Diagnostic.WARNING,
                UMLValidator.DIAGNOSTIC_SOURCE,
                UMLValidator
                    .ADD_STRUCTURAL_FEATURE_VALUE_ACTION__UNLIMITED_NATURAL_AND_MULTIPLICITY,
                UMLPlugin.INSTANCE.getString(
                    "_UI_AddStructuralFeatureValueAction_UnlimitedNaturalAndMultiplicity_diagnostic",
                    getMessageSubstitutions(
                        context, addStructuralFeatureValueAction)), // $NON-NLS-1$
                new Object[] {addStructuralFeatureValueAction}));
      }
    }

    return result;
  }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public InputPin getValue() {
   if (value != null && value.eIsProxy()) {
     InternalEObject oldValue = (InternalEObject) value;
     value = (InputPin) eResolveProxy(oldValue);
     if (value != oldValue) {
       if (eNotificationRequired())
         eNotify(
             new ENotificationImpl(
                 this, Notification.RESOLVE, UMLPackage.QUALIFIER_VALUE__VALUE, oldValue, value));
     }
   }
   return value;
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
  */
 public void updateSemanticModel(final IPropertiesEditionEvent event) {
   InputPin inputPin = (InputPin) semanticObject;
   if (UmlViewsRepository.InputPin.Properties.name == event.getAffectedEditor()) {
     inputPin.setName(
         (java.lang.String)
             EEFConverterUtil.createFromString(
                 UMLPackage.eINSTANCE.getString(), (String) event.getNewValue()));
   }
   if (UmlViewsRepository.InputPin.Properties.visibility == event.getAffectedEditor()) {
     inputPin.setVisibility((VisibilityKind) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.clientDependency == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof Dependency) {
         clientDependencySettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       clientDependencySettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.isLeaf == event.getAffectedEditor()) {
     inputPin.setIsLeaf((Boolean) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.inStructuredNode == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.SET) {
       inStructuredNodeSettings.setToReference((StructuredActivityNode) event.getNewValue());
     } else if (event.getKind() == PropertiesEditionEvent.ADD) {
       StructuredActivityNode eObject = UMLFactory.eINSTANCE.createStructuredActivityNode();
       EObjectPropertiesEditionContext context =
           new EObjectPropertiesEditionContext(
               editingContext, this, eObject, editingContext.getAdapterFactory());
       PropertiesEditingProvider provider =
           (PropertiesEditingProvider)
               editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
       if (provider != null) {
         PropertiesEditingPolicy policy = provider.getPolicy(context);
         if (policy != null) {
           policy.execute();
         }
       }
       inStructuredNodeSettings.setToReference(eObject);
     }
   }
   if (UmlViewsRepository.InputPin.Properties.activity == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.SET) {
       activitySettings.setToReference((Activity) event.getNewValue());
     } else if (event.getKind() == PropertiesEditionEvent.ADD) {
       Activity eObject = UMLFactory.eINSTANCE.createActivity();
       EObjectPropertiesEditionContext context =
           new EObjectPropertiesEditionContext(
               editingContext, this, eObject, editingContext.getAdapterFactory());
       PropertiesEditingProvider provider =
           (PropertiesEditingProvider)
               editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
       if (provider != null) {
         PropertiesEditingPolicy policy = provider.getPolicy(context);
         if (policy != null) {
           policy.execute();
         }
       }
       activitySettings.setToReference(eObject);
     }
   }
   if (UmlViewsRepository.InputPin.Properties.outgoing == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof ActivityEdge) {
         outgoingSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       outgoingSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.incoming == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof ActivityEdge) {
         incomingSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       incomingSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.inPartition == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof ActivityPartition) {
         inPartitionSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       inPartitionSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.inInterruptibleRegion == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof InterruptibleActivityRegion) {
         inInterruptibleRegionSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       inInterruptibleRegionSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.redefinedNode == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof ActivityNode) {
         redefinedNodeSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       redefinedNodeSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.type == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.SET) {
       typeSettings.setToReference((Type) event.getNewValue());
     } else if (event.getKind() == PropertiesEditionEvent.ADD) {
       EReferencePropertiesEditionContext context =
           new EReferencePropertiesEditionContext(
               editingContext, this, typeSettings, editingContext.getAdapterFactory());
       PropertiesEditingProvider provider =
           (PropertiesEditingProvider)
               editingContext
                   .getAdapterFactory()
                   .adapt(semanticObject, PropertiesEditingProvider.class);
       if (provider != null) {
         PropertiesEditingPolicy policy = provider.getPolicy(context);
         if (policy instanceof CreateEditingPolicy) {
           policy.execute();
         }
       }
     }
   }
   if (UmlViewsRepository.InputPin.Properties.ordering == event.getAffectedEditor()) {
     inputPin.setOrdering((ObjectNodeOrderingKind) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.isControlType == event.getAffectedEditor()) {
     inputPin.setIsControlType((Boolean) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.inState == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.ADD) {
       if (event.getNewValue() instanceof State) {
         inStateSettings.addToReference((EObject) event.getNewValue());
       }
     } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
       inStateSettings.removeFromReference((EObject) event.getNewValue());
     }
   }
   if (UmlViewsRepository.InputPin.Properties.selection == event.getAffectedEditor()) {
     if (event.getKind() == PropertiesEditionEvent.SET) {
       selectionSettings.setToReference((Behavior) event.getNewValue());
     } else if (event.getKind() == PropertiesEditionEvent.ADD) {
       EReferencePropertiesEditionContext context =
           new EReferencePropertiesEditionContext(
               editingContext, this, selectionSettings, editingContext.getAdapterFactory());
       PropertiesEditingProvider provider =
           (PropertiesEditingProvider)
               editingContext
                   .getAdapterFactory()
                   .adapt(semanticObject, PropertiesEditingProvider.class);
       if (provider != null) {
         PropertiesEditingPolicy policy = provider.getPolicy(context);
         if (policy instanceof CreateEditingPolicy) {
           policy.execute();
         }
       }
     }
   }
   if (UmlViewsRepository.InputPin.Properties.isOrdered == event.getAffectedEditor()) {
     inputPin.setIsOrdered((Boolean) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.isUnique == event.getAffectedEditor()) {
     inputPin.setIsUnique((Boolean) event.getNewValue());
   }
   if (UmlViewsRepository.InputPin.Properties.isControl == event.getAffectedEditor()) {
     inputPin.setIsControl((Boolean) event.getNewValue());
   }
 }
  /**
   * {@inheritDoc}
   *
   * @see
   *     org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
   *     int, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.resource.ResourceSet)
   */
  public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
      editingPart.setContext(elt, allResource);
      final InputPin inputPin = (InputPin) elt;
      final InputPinPropertiesEditionPart basePart = (InputPinPropertiesEditionPart) editingPart;
      // init values
      if (inputPin.getName() != null && isAccessible(UmlViewsRepository.InputPin.Properties.name))
        basePart.setName(
            EEFConverterUtil.convertToString(UMLPackage.eINSTANCE.getString(), inputPin.getName()));

      if (isAccessible(UmlViewsRepository.InputPin.Properties.visibility)) {
        basePart.initVisibility(
            (EEnum) UMLPackage.eINSTANCE.getNamedElement_Visibility().getEType(),
            inputPin.getVisibility());
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.clientDependency)) {
        clientDependencySettings =
            new ReferencesTableSettings(
                inputPin, UMLPackage.eINSTANCE.getNamedElement_ClientDependency());
        basePart.initClientDependency(clientDependencySettings);
      }
      basePart.setIsLeaf(inputPin.isLeaf());

      if (isAccessible(UmlViewsRepository.InputPin.Properties.inStructuredNode)) {
        // init part
        inStructuredNodeSettings =
            new EObjectFlatComboSettings(
                inputPin, UMLPackage.eINSTANCE.getActivityNode_InStructuredNode());
        basePart.initInStructuredNode(inStructuredNodeSettings);
        // set the button mode
        basePart.setInStructuredNodeButtonMode(ButtonsModeEnum.BROWSE);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.activity)) {
        // init part
        activitySettings =
            new EObjectFlatComboSettings(inputPin, UMLPackage.eINSTANCE.getActivityNode_Activity());
        basePart.initActivity(activitySettings);
        // set the button mode
        basePart.setActivityButtonMode(ButtonsModeEnum.BROWSE);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.outgoing)) {
        outgoingSettings =
            new ReferencesTableSettings(inputPin, UMLPackage.eINSTANCE.getActivityNode_Outgoing());
        basePart.initOutgoing(outgoingSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.incoming)) {
        incomingSettings =
            new ReferencesTableSettings(inputPin, UMLPackage.eINSTANCE.getActivityNode_Incoming());
        basePart.initIncoming(incomingSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.inPartition)) {
        inPartitionSettings =
            new ReferencesTableSettings(
                inputPin, UMLPackage.eINSTANCE.getActivityNode_InPartition());
        basePart.initInPartition(inPartitionSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.inInterruptibleRegion)) {
        inInterruptibleRegionSettings =
            new ReferencesTableSettings(
                inputPin, UMLPackage.eINSTANCE.getActivityNode_InInterruptibleRegion());
        basePart.initInInterruptibleRegion(inInterruptibleRegionSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.redefinedNode)) {
        redefinedNodeSettings =
            new ReferencesTableSettings(
                inputPin, UMLPackage.eINSTANCE.getActivityNode_RedefinedNode());
        basePart.initRedefinedNode(redefinedNodeSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.type)) {
        // init part
        typeSettings =
            new EObjectFlatComboSettings(inputPin, UMLPackage.eINSTANCE.getTypedElement_Type());
        basePart.initType(typeSettings);
        // set the button mode
        basePart.setTypeButtonMode(ButtonsModeEnum.BROWSE);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.ordering)) {
        basePart.initOrdering(
            (EEnum) UMLPackage.eINSTANCE.getObjectNode_Ordering().getEType(),
            inputPin.getOrdering());
      }
      basePart.setIsControlType(inputPin.isControlType());

      if (isAccessible(UmlViewsRepository.InputPin.Properties.inState)) {
        inStateSettings =
            new ReferencesTableSettings(inputPin, UMLPackage.eINSTANCE.getObjectNode_InState());
        basePart.initInState(inStateSettings);
      }
      if (isAccessible(UmlViewsRepository.InputPin.Properties.selection)) {
        // init part
        selectionSettings =
            new EObjectFlatComboSettings(inputPin, UMLPackage.eINSTANCE.getObjectNode_Selection());
        basePart.initSelection(selectionSettings);
        // set the button mode
        basePart.setSelectionButtonMode(ButtonsModeEnum.BROWSE);
      }
      basePart.setIsOrdered(inputPin.isOrdered());

      basePart.setIsUnique(inputPin.isUnique());

      basePart.setIsControl(inputPin.isControl());

      // init filters

      basePart.addFilterToClientDependency(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInClientDependencyTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToClientDependency(new EObjectFilter(UMLPackage.eINSTANCE.getDependency()));
      // Start of user code for additional businessfilters for clientDependency
      // End of user code

      basePart.addFilterToInStructuredNode(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              return (element instanceof String && element.equals(""))
                  || (element instanceof StructuredActivityNode); // $NON-NLS-1$
            }
          });
      // Start of user code for additional businessfilters for inStructuredNode
      // End of user code

      basePart.addFilterToActivity(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              return (element instanceof String && element.equals(""))
                  || (element instanceof Activity); // $NON-NLS-1$
            }
          });
      // Start of user code for additional businessfilters for activity
      // End of user code

      basePart.addFilterToOutgoing(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInOutgoingTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToOutgoing(new EObjectFilter(UMLPackage.eINSTANCE.getActivityEdge()));
      // Start of user code for additional businessfilters for outgoing
      // End of user code

      basePart.addFilterToIncoming(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInIncomingTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToIncoming(new EObjectFilter(UMLPackage.eINSTANCE.getActivityEdge()));
      // Start of user code for additional businessfilters for incoming
      // End of user code

      basePart.addFilterToInPartition(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInInPartitionTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToInPartition(
          new EObjectFilter(UMLPackage.eINSTANCE.getActivityPartition()));
      // Start of user code for additional businessfilters for inPartition
      // End of user code

      basePart.addFilterToInInterruptibleRegion(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInInInterruptibleRegionTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToInInterruptibleRegion(
          new EObjectFilter(UMLPackage.eINSTANCE.getInterruptibleActivityRegion()));
      // Start of user code for additional businessfilters for inInterruptibleRegion
      // End of user code

      basePart.addFilterToRedefinedNode(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInRedefinedNodeTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToRedefinedNode(new EObjectFilter(UMLPackage.eINSTANCE.getActivityNode()));
      // Start of user code for additional businessfilters for redefinedNode
      // End of user code

      basePart.addFilterToType(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              return (element instanceof String && element.equals(""))
                  || (element instanceof Type); // $NON-NLS-1$
            }
          });
      // Start of user code for additional businessfilters for type
      // End of user code

      basePart.addFilterToInState(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              if (element instanceof EObject)
                return (!basePart.isContainedInInStateTable((EObject) element));
              return element instanceof Resource;
            }
          });
      basePart.addFilterToInState(new EObjectFilter(UMLPackage.eINSTANCE.getState()));
      // Start of user code for additional businessfilters for inState
      // End of user code

      basePart.addFilterToSelection(
          new ViewerFilter() {

            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            public boolean select(Viewer viewer, Object parentElement, Object element) {
              return (element instanceof String && element.equals(""))
                  || (element instanceof Behavior); // $NON-NLS-1$
            }
          });
      // Start of user code for additional businessfilters for selection
      // End of user code

      // init values for referenced views

      // init filters for referenced views

    }
    setInitializing(false);
  }