loadPropertyGroup( elementTag, elements[i], elementDefn, propList ); } else if ( STYLE_PROPERTY_TAG.equalsIgnoreCase( elements[i] .getName( ) ) ) {  } else if ( METHOD_TAG.equalsIgnoreCase( elements[i] .getName( ) ) ) { ExtensionPropertyDefn extPropDefn = loadMethod( elementTag, elements[i], elementDefn );    elementDefn.addProperty( extPropDefn ); } else if ( STYLE_TAG .equalsIgnoreCase( elements[i].getName( ) ) ) { PredefinedStyle style = loadStyle( elementTag, elements[i], elementDefn );  MetaDataDictionary.getInstance( ).addPredefinedStyle( style ); } else if ( SLOT_TAG .equalsIgnoreCase( elements[i].getName( ) ) ) { SlotDefn slotDefn = loadSlot( elementTag, elements[i], elementDefn ); elementDefn.addSlot( slotDefn );
handleError( e ); continue;
		void loadElement( IConfigurationElement elementTag )				throws MetaDataException, ExtensionException		{			// load required parts			String extensionName = elementTag					.getAttribute( EXTENSION_NAME_ATTRIB );			String className = elementTag.getAttribute( CLASS_ATTRIB );			checkRequiredAttribute( EXTENSION_NAME_ATTRIB, extensionName );			checkRequiredAttribute( CLASS_ATTRIB, className );			// load optional parts			String displayNameID = elementTag					.getAttribute( DISPLAY_NAME_ID_ATTRIB );			String defaultStyle = elementTag					.getAttribute( DEFAULT_STYLE_ATTRIB );			String isNameRequired = elementTag					.getAttribute( IS_NAME_REQUIRED_ATTRIB );			String extendsFrom = elementTag.getAttribute( EXTENDS_FROM_ATTRIB );			if ( StringUtil.isBlank( extendsFrom ) )				extendsFrom = ReportDesignConstants.EXTENDED_ITEM;			IReportItemFactory factory = null;			PeerExtensionElementDefn elementDefn = null;			try			{				factory = (IReportItemFactory) elementTag						.createExecutableExtension( CLASS_ATTRIB );				elementDefn = new PeerExtensionElementDefn( extensionName,						factory );				elementDefn.setAbstract( false );				elementDefn.setAllowsUserProperties( false );				elementDefn.setCanExtend( true );				elementDefn.setDisplayNameKey( displayNameID );				elementDefn.setExtends( extendsFrom );				elementDefn.setJavaClass( null );				elementDefn.setSelector( defaultStyle );				if ( "true".equalsIgnoreCase( isNameRequired ) ) //$NON-NLS-1$					elementDefn.setNameOption( MetaDataConstants.REQUIRED_NAME );				else					elementDefn.setNameOption( MetaDataConstants.OPTIONAL_NAME );				List propList = new ArrayList( );				IConfigurationElement[] elements = elementTag.getChildren( );				for ( int i = 0; i < elements.length; i++ )				{					if ( PROPERTY_TAG.equalsIgnoreCase( elements[i].getName( ) ) )					{						SystemPropertyDefn extPropDefn = loadProperty(								elementTag, elements[i], elementDefn );						// Unique check is performed in addProperty()						elementDefn.addProperty( extPropDefn );					}					else if ( PROPERTY_VISIBILITY_TAG							.equalsIgnoreCase( elements[i].getName( ) ) )					{						loadPropertyVisibility( elements[i], elementDefn );					}					else if ( PROPERTY_GROUP_TAG.equalsIgnoreCase( elements[i]							.getName( ) ) )					{						loadPropertyGroup( elementTag, elements[i],								elementDefn, propList );					}					else if ( STYLE_PROPERTY_TAG.equalsIgnoreCase( elements[i]							.getName( ) ) )					{						// StyleProperty					}					else if ( METHOD_TAG.equalsIgnoreCase( elements[i]							.getName( ) ) )					{						ExtensionPropertyDefn extPropDefn = loadMethod(								elementTag, elements[i], elementDefn );						// Unique check is performed in addProperty()						elementDefn.addProperty( extPropDefn );					}					else if ( STYLE_TAG							.equalsIgnoreCase( elements[i].getName( ) ) )					{						PredefinedStyle style = loadStyle( elementTag,								elements[i], elementDefn );						MetaDataDictionary.getInstance( ).addPredefinedStyle(								style );					}					else if ( SLOT_TAG							.equalsIgnoreCase( elements[i].getName( ) ) )					{						SlotDefn slotDefn = loadSlot( elementTag, elements[i],								elementDefn );						elementDefn.addSlot( slotDefn );					}				}			}			catch ( FrameworkException e )			{				throw new ExtensionException(						new String[]{className},						ExtensionException.DESIGN_EXCEPTION_FAILED_TO_CREATE_INSTANCE );			}			elementDefn.extensionPoint = EXTENSION_POINT;			MetaDataDictionary.getInstance( ).addExtension( elementDefn );		}