コード例 #1
0
 private void initEStructuralFeature
     (EStructuralFeature s,
     EGenericType type,
     String name,
     String defaultValue,
     int lowerBound,
     int upperBound,
     Type containerClass,
     bool isTransient,
     bool isVolatile,
     bool isChangeable,
     bool isUnsettable,
     bool isUnique,
     bool isDerived,
     bool isOrdered)
 {
     s.name = name;
     ((EStructuralFeatureImpl)s).containerClass = containerClass;
     s.transient    = isTransient;
     s.volatile_    = isVolatile;
     s.changeable   = isChangeable;
     s.unsettable   = isUnsettable;
     s.unique       = isUnique;
     s.derived      = isDerived;
     s.ordered      = isOrdered;
     s.lowerBound   = lowerBound;
     s.upperBound   = upperBound;
     s.eGenericType = type;
     if (defaultValue != null)
     {
         s.defaultValueLiteral = defaultValue;
     }
 }
コード例 #2
0
 protected EAttribute initEAttribute
     (EAttribute a,
     EGenericType type,
     String name,
     String defaultValue,
     int lowerBound,
     int upperBound,
     Type containerClass,
     bool isTransient,
     bool isVolatile,
     bool isChangeable,
     bool isUnsettable,
     bool isID,
     bool isUnique,
     bool isDerived,
     bool isOrdered)
 {
     initEStructuralFeature
         (a,
         type,
         name,
         defaultValue,
         lowerBound,
         upperBound,
         containerClass,
         isTransient,
         isVolatile,
         isChangeable,
         isUnsettable,
         isUnique,
         isDerived,
         isOrdered);
     a.iD = isID;
     return(a);
 }
コード例 #3
0
        public NotificationChain basicSetEGenericType(EGenericType newobj, NotificationChain msgs)
        {
            var oldobj = _eGenericType;

            _eGenericType = newobj;
            if (eNotificationRequired())
            {
                var notification = new ENotificationImpl(this, NotificationImpl.SET, EcorePackageImpl.ETYPEDELEMENT_EGENERICTYPE, oldobj, newobj);
                if (msgs == null)
                {
                    msgs = notification;
                }
                else
                {
                    msgs.add(notification);
                }
            }
            return(msgs);
        }
コード例 #4
0
        public NotificationChain basicSetEUpperBound(EGenericType newobj, NotificationChain msgs)
        {
            var oldobj = _eUpperBound;

            _eUpperBound = newobj;
            if (eNotificationRequired())
            {
                var notification = new ENotificationImpl(this, NotificationImpl.SET, EcorePackageImpl.EGENERICTYPE_EUPPERBOUND, oldobj, newobj);
                if (msgs == null)
                {
                    msgs = notification;
                }
                else
                {
                    msgs.add(notification);
                }
            }
            return(msgs);
        }
コード例 #5
0
 protected EReference initEReference
     (EReference r,
     EGenericType type,
     EReference otherEnd,
     String name,
     String defaultValue,
     int lowerBound,
     int upperBound,
     Type containerClass,
     bool isTransient,
     bool isVolatile,
     bool isChangeable,
     bool isContainment,
     bool isResolveProxies,
     bool isUnsettable,
     bool isUnique,
     bool isDerived,
     bool isOrdered)
 {
     initEStructuralFeature
         (r,
         type,
         name,
         defaultValue,
         lowerBound,
         upperBound,
         containerClass,
         isTransient,
         isVolatile,
         isChangeable,
         isUnsettable,
         isUnique,
         isDerived,
         isOrdered);
     r.containment = isContainment;
     if (otherEnd != null)
     {
         r.eOpposite = otherEnd;
     }
     r.resolveProxies = isResolveProxies;
     return(r);
 }
コード例 #6
0
        public bool validateEGenericType(EGenericType obj, DiagnosticChain diagnostics, Dictionary <object, object> context)
        {
            if (!validate_NoCircularContainment(obj, diagnostics, context))
            {
                return(false);
            }
            bool result = validate_EveryMultiplicityConforms(obj, diagnostics, context);

            if (result || diagnostics != null)
            {
                result &= validate_EveryDataValueConforms(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryReferenceIsContained(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryBidirectionalReferenceIsPaired(obj, diagnostics, context);
            }
            //if (result || diagnostics != null) result &= validate_EveryProxyResolves(obj, diagnostics, context);
            if (result || diagnostics != null)
            {
                result &= validate_UniqueID(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryKeyUnique(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryMapEntryUnique(obj, diagnostics, context);
            }

            return(result);
        }
コード例 #7
0
 public virtual T caseEGenericType(EGenericType theEObject)
 {
     return(default(T));
 }