prop.setName( StyledElement.STYLE_PROP ); prop.setType( dd.getPropertyType( PropertyType.ELEMENT_REF_TYPE ) );
prop.setName( IStyledElementModel.STYLE_PROP ); prop.setType( dd.getPropertyType( IPropertyType.ELEMENT_REF_TYPE ) );
	protected final void buildDefn( ) throws MetaDataException	{		// Handle parent-specific tasks.		MetaDataDictionary dd = MetaDataDictionary.getInstance( );		if ( extendsFrom != null )		{			parent = (ElementDefn) dd.getElement( extendsFrom );			if ( parent == null )				parent = (ElementDefn) dd.getExtension( extendsFrom );			if ( parent == null )				throw new MetaDataException(						new String[]{extendsFrom, name},						MetaDataException.DESIGN_EXCEPTION_ELEMENT_PARENT_NOT_FOUND );			parent.build( );			// Cascade the setting of whether this element has a style.			// That is, once an element has a style, all derived elements			// have that style whether the meta data file explicitly indicated			// this or not.			if ( parent.hasStyle( ) )				hasStyle = true;		}		// If this element has added a style, then add the intrinsic		// style property.		if ( ( parent == null || !parent.hasStyle( ) ) && hasStyle )		{			SystemPropertyDefn prop = new SystemPropertyDefn( );			prop.setName( StyledElement.STYLE_PROP );			prop.setType( dd.getPropertyType( PropertyType.ELEMENT_REF_TYPE ) );			prop.setDisplayNameID( "Element.ReportElement.style" ); //$NON-NLS-1$			prop.setDetails( MetaDataConstants.STYLE_NAME );			prop.setIntrinsic( true );			addProperty( prop );		}		// This element cannot forbid user-defined properties if		// its parent supports them.		if ( parent != null && parent.allowsUserProperties( ) )			supportsUserProperties = true;		// If this element is abstract and has a parent, then the parent		// must also be abstract.		if ( isAbstract( ) && parent != null && !parent.isAbstract( ) )			throw new MetaDataException( new String[]{name, parent.getName( )},					MetaDataException.DESIGN_EXCEPTION_ILLEGAL_ABSTRACT_ELEMENT );		// Cascade the name space ID.		if ( parent != null )		{			if ( nameSpaceID == MetaDataConstants.NO_NAME_SPACE )				nameSpaceID = parent.getNameSpaceID( );			else if ( parent.getNameSpaceID( ) != MetaDataConstants.NO_NAME_SPACE )				throw new MetaDataException( new String[]{name},						MetaDataException.DESIGN_EXCEPTION_INVALID_NAME_OPTION );		}		// Validate that the name and name space options are consistent.		if ( !isAbstract( ) )		{			if ( nameSpaceID == MetaDataConstants.NO_NAME_SPACE )				nameOption = MetaDataConstants.NO_NAME;			if ( nameSpaceID != MetaDataConstants.NO_NAME_SPACE					&& nameOption == MetaDataConstants.NO_NAME )				throw new MetaDataException( new String[]{name},						MetaDataException.DESIGN_EXCEPTION_INVALID_NAME_OPTION );		}		// The user can't extend abstract elements (only the design schema		// itself can extend abstract definitions. The user also cannot extend		// items without a name because there is no way to reference such		// elements.		if ( nameOption == MetaDataConstants.NO_NAME || isAbstract( ) )			allowExtend = false;	}