Пример #1
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.EUpperBound == item))
                {
                    this._parent.EUpperBound = null;
                    return(true);
                }
                IEGenericType eGenericTypeItem = item.As <IEGenericType>();

                if (((eGenericTypeItem != null) &&
                     this._parent.ETypeArguments.Remove(eGenericTypeItem)))
                {
                    return(true);
                }
                if ((this._parent.ELowerBound == item))
                {
                    this._parent.ELowerBound = null;
                    return(true);
                }
                if ((this._parent.ETypeParameter == item))
                {
                    this._parent.ETypeParameter = null;
                    return(true);
                }
                if ((this._parent.EClassifier == item))
                {
                    this._parent.EClassifier = null;
                    return(true);
                }
                return(false);
            }
Пример #2
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IETypeParameter eTypeParameterItem = item.As <IETypeParameter>();

                if (((eTypeParameterItem != null) &&
                     this._parent.ETypeParameters.Remove(eTypeParameterItem)))
                {
                    return(true);
                }
                IEParameter eParameterItem = item.As <IEParameter>();

                if (((eParameterItem != null) &&
                     this._parent.EParameters.Remove(eParameterItem)))
                {
                    return(true);
                }
                IEGenericType eGenericTypeItem = item.As <IEGenericType>();

                if (((eGenericTypeItem != null) &&
                     this._parent.EGenericExceptions.Remove(eGenericTypeItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.EUpperBound == null))
                {
                    IEGenericType eUpperBoundCasted = item.As <IEGenericType>();
                    if ((eUpperBoundCasted != null))
                    {
                        this._parent.EUpperBound = eUpperBoundCasted;
                        return;
                    }
                }
                IEGenericType eTypeArgumentsCasted = item.As <IEGenericType>();

                if ((eTypeArgumentsCasted != null))
                {
                    this._parent.ETypeArguments.Add(eTypeArgumentsCasted);
                }
                if ((this._parent.ELowerBound == null))
                {
                    IEGenericType eLowerBoundCasted = item.As <IEGenericType>();
                    if ((eLowerBoundCasted != null))
                    {
                        this._parent.ELowerBound = eLowerBoundCasted;
                        return;
                    }
                }
            }
Пример #4
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IEClass eClassItem = item.As <IEClass>();

                if (((eClassItem != null) &&
                     this._parent.ESuperTypes.Remove(eClassItem)))
                {
                    return(true);
                }
                IEOperation eOperationItem = item.As <IEOperation>();

                if (((eOperationItem != null) &&
                     this._parent.EOperations.Remove(eOperationItem)))
                {
                    return(true);
                }
                IEStructuralFeature eStructuralFeatureItem = item.As <IEStructuralFeature>();

                if (((eStructuralFeatureItem != null) &&
                     this._parent.EStructuralFeatures.Remove(eStructuralFeatureItem)))
                {
                    return(true);
                }
                IEGenericType eGenericTypeItem = item.As <IEGenericType>();

                if (((eGenericTypeItem != null) &&
                     this._parent.EGenericSuperTypes.Remove(eGenericTypeItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #5
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IEClass eSuperTypesCasted = item.As <IEClass>();

                if ((eSuperTypesCasted != null))
                {
                    this._parent.ESuperTypes.Add(eSuperTypesCasted);
                }
                IEOperation eOperationsCasted = item.As <IEOperation>();

                if ((eOperationsCasted != null))
                {
                    this._parent.EOperations.Add(eOperationsCasted);
                }
                IEStructuralFeature eStructuralFeaturesCasted = item.As <IEStructuralFeature>();

                if ((eStructuralFeaturesCasted != null))
                {
                    this._parent.EStructuralFeatures.Add(eStructuralFeaturesCasted);
                }
                IEGenericType eGenericSuperTypesCasted = item.As <IEGenericType>();

                if ((eGenericSuperTypesCasted != null))
                {
                    this._parent.EGenericSuperTypes.Add(eGenericSuperTypesCasted);
                }
            }
Пример #6
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IEGenericType eBoundsCasted = item.As <IEGenericType>();

                if ((eBoundsCasted != null))
                {
                    this._parent.EBounds.Add(eBoundsCasted);
                }
            }
Пример #7
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IEGenericType eGenericTypeItem = item.As <IEGenericType>();

                if (((eGenericTypeItem != null) &&
                     this._parent.EBounds.Remove(eGenericTypeItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #8
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.EGenericType == null))
     {
         IEGenericType eGenericTypeCasted = item.As <IEGenericType>();
         if ((eGenericTypeCasted != null))
         {
             this._parent.EGenericType = eGenericTypeCasted;
             return;
         }
     }
 }
Пример #9
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IETypeParameter eTypeParametersCasted = item.As <IETypeParameter>();

                if ((eTypeParametersCasted != null))
                {
                    this._parent.ETypeParameters.Add(eTypeParametersCasted);
                }
                IEParameter eParametersCasted = item.As <IEParameter>();

                if ((eParametersCasted != null))
                {
                    this._parent.EParameters.Add(eParametersCasted);
                }
                IEGenericType eGenericExceptionsCasted = item.As <IEGenericType>();

                if ((eGenericExceptionsCasted != null))
                {
                    this._parent.EGenericExceptions.Add(eGenericExceptionsCasted);
                }
            }
Пример #10
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.EContainingClass == null))
                {
                    IEClass eContainingClassCasted = item.As <IEClass>();
                    if ((eContainingClassCasted != null))
                    {
                        this._parent.EContainingClass = eContainingClassCasted;
                        return;
                    }
                }
                IETypeParameter eTypeParametersCasted = item.As <IETypeParameter>();

                if ((eTypeParametersCasted != null))
                {
                    this._parent.ETypeParameters.Add(eTypeParametersCasted);
                }
                IEParameter eParametersCasted = item.As <IEParameter>();

                if ((eParametersCasted != null))
                {
                    this._parent.EParameters.Add(eParametersCasted);
                }
                IEClassifier eExceptionsCasted = item.As <IEClassifier>();

                if ((eExceptionsCasted != null))
                {
                    this._parent.EExceptions.Add(eExceptionsCasted);
                }
                IEGenericType eGenericExceptionsCasted = item.As <IEGenericType>();

                if ((eGenericExceptionsCasted != null))
                {
                    this._parent.EGenericExceptions.Add(eGenericExceptionsCasted);
                }
            }