expressionBuilder.setExpressionProvier( new ExpressionProvider( handle.getModuleHandle( ), DEUtil.getDataSetList( handle ) ) );
expressionBuilder.setExpressionProvier( new ExpressionProvider( handle ) );
	private void createFormatTags( int index, ToolBar toolBar )	{		HTMLTag tag;		switch ( index )		{			// Creates tags of formatting.			// case 0 :			case FORMAT_CHOICE_INDEX_FORMATTING :			{				tag = new HTMLTag( "<H1>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H1 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<H2>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H2 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<H3>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H3 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<H4>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H4 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<H5>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H5 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<H6>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_H6 );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<SUB>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_SUB );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<SUP>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_SUP );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<EM>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_EM );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<STRONG>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_STRONG );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<PRE>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_PRE );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<CODE>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_CODE );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<TT>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_TT );				createToolItemWithHTMLTag( toolBar, tag );				break;			}			// Creates tags of layout.			case FORMAT_CHOICE_INDEX_LAYOUT :			// case 1 :			{				tag = new HTMLTag( "<CENTER>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_CENTER );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<BR>", false ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_BR );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<P>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_P );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<DIV>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_GENERIC_STYLE );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<SPAN>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_GENERIC_STYLE );				createToolItemWithHTMLTag( toolBar, tag );				break;			}			// Creates tags of content.			// case 2 :			case FORMAT_CHOICE_INDEX_CONTENT :			{				tag = new HTMLTag( "<IMG>", false ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_IMG );				tag.addAttribute( "src" ); //$NON-NLS-1$				tag.addAttribute( "alt" ); //$NON-NLS-1$				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<A>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_A );				tag.addAttribute( "name" ); //$NON-NLS-1$				tag.addAttribute( "href" ); //$NON-NLS-1$				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<INS>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_INS );				tag.addAttribute( "cite" ); //$NON-NLS-1$				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<DEL>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_DEL );				tag.addAttribute( "cite" ); //$NON-NLS-1$				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<IMAGE>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_BIRT_IMAGE );				tag.addAttribute( "name" ); //$NON-NLS-1$				tag.addAttribute( "type" ); //$NON-NLS-1$				createToolItemWithHTMLTag( toolBar, tag );				break;			}			// Creates tags of list.			case FORMAT_CHOICE_INDEX_LISTS :			// case 3 :			{				tag = new HTMLTag( "<DL>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_DL );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<UL>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_UL );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<LI>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_LI );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<DT>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_DT );				createToolItemWithHTMLTag( toolBar, tag );				tag = new HTMLTag( "<DD>", true ); //$NON-NLS-1$				tag.setToolTipText( TOOL_TIP_TAG_DD );				createToolItemWithHTMLTag( toolBar, tag );				break;			}			// Creates tags for Dynamic Text.			// case 4 :			case FORMAT_CHOICE_INDEX_DYNAMIC_TEXT :			{				final ToolItem value = new ToolItem( toolBar, SWT.NONE );				value.setText( "<VALUE-OF>" ); //$NON-NLS-1$				value.setToolTipText( TOOL_TIP_VALUE_OF );				value.addSelectionListener( new SelectionAdapter( ) {					public void widgetSelected( SelectionEvent e )					{						ExpressionBuilder expressionBuilder = new ExpressionBuilder( "" ); //$NON-NLS-1$						expressionBuilder.setExpressionProvier( new ExpressionProvider( handle.getModuleHandle( ),								DEUtil.getDataSetList( handle ) ) );						if ( expressionBuilder.open( ) == OK )						{							if ( !expressionBuilder.getResult( ).equals( "" ) ) //$NON-NLS-1$							{								Point point = textEditor.getSelection( );								int start = point.x < point.y ? point.x										: point.y;								String result = value.getText( )										+ expressionBuilder.getResult( )										+ value.getText( ).replaceFirst( "<", //$NON-NLS-1$												"</" ); //$NON-NLS-1$								textEditor.insert( result ); //$NON-NLS-1$								textEditor.setSelection( start										+ result.length( ) );							}						}					}				} );				break;			}		}	}