Class BmValueModel

    • Constructor Detail

      • BmValueModel

        public BmValueModel​(org.eclipse.emf.ecore.EObject object,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature,
                            IV8Project v8project)
        Creates a new model.
        Parameters:
        object - the IBmObject that keeps the Value feature, cannot be null
        feature - the feature of the Value object, cannot be null
        typeDescriptionFeature - the feature of the TypeDescription object, cannot be null
        v8project - the V8 project, cannot be null
      • BmValueModel

        public BmValueModel​(org.eclipse.emf.ecore.EObject object,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            IV8Project v8project,
                            IColorProvider colorProvider,
                            IFontProvider fontProvider)
        Creates a new model.
        Parameters:
        object - the IBmObject that keeps the Value feature, cannot be null
        feature - the feature of the Value object, cannot be null
        v8project - the V8 project, cannot be null
        colorProvider - the color provider, cannot be null
        fontProvider - the font provider, cannot be null
    • Method Detail

      • setComponent

        public void setComponent​(IComponent<?> component)
        Description copied from interface: IModel
        Associate this model with the component.
        Specified by:
        setComponent in interface IModel
        Overrides:
        setComponent in class Model
        Parameters:
        component - the component to associate with.
      • getTypeItemModel

        public IValue<TypeItem> getTypeItemModel()
        Description copied from interface: IValueModel
        Returns the model of TypeItem. It is the changeable model that can be changed from component, i.e. in case the user select the type from type selection dialog, or can be changed in automatically in case if the TypeDescription was changed.
        Specified by:
        getTypeItemModel in interface IValueModel
        Returns:
        the model of TypeItem, cannot be null
      • isEqual

        public boolean isEqual​(Value other)
        Description copied from interface: IValue
        Checks the value for equality with the current stored value.
        Specified by:
        isEqual in interface IValue<Value>
        Overrides:
        isEqual in class Value<Value>
        Parameters:
        other - the other value to check.
        Returns:
        true if other value is equal to this value, false otherwise.
      • createTypeDescriptionModel

        protected void createTypeDescriptionModel​(org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature)
        Creates type description source model.
        Parameters:
        typeDescriptionFeature - the type description source field
      • initTypeItemModelExternal

        protected void initTypeItemModelExternal()
        Inits TypeItem model external.
      • getContextObject

        protected org.eclipse.emf.ecore.EObject getContextObject()
        Returns the context object to retrieve types.
        Returns:
        the context object.