formatTagsBar.setEnabled( textTypeChoicer.getSelectionIndex( ) == 1 );
formatTagsBar.setEnabled( textTypeChoicer.getSelectionIndex( ) != PLAIN_INDEX );
	private void createFormatBar( Composite composite )	{		formatChoicer = new CCombo( composite, SWT.READ_ONLY | SWT.FLAT );		GridData gdata = new GridData( GridData.FILL_HORIZONTAL				| GridData.HORIZONTAL_ALIGN_BEGINNING );		gdata.horizontalIndent = 5;		formatChoicer.setLayoutData( gdata );		formatChoicer.setBackground( PlatformUI.getWorkbench( )				.getDisplay( )				.getSystemColor( SWT.COLOR_LIST_BACKGROUND ) );		formatChoicer.setItems( new String[]{				Messages.getString( "TextEditDialog.formatChoice.formatting" ), Messages.getString( "TextEditDialog.formatChoice.layout" ), Messages.getString( "TextEditDialog.formatChoice.content" ), Messages.getString( "TextEditDialog.formatChoice.lists" ), Messages.getString( "TextEditDialog.formatChoice.dynamicText" ) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$		} );		formatChoicer.select( 0 );		formatChoicer.setEnabled( textTypeChoicer.getSelectionIndex( ) == 1 );		formatTagsBar = new ToolBar( composite, SWT.FLAT );		GridData data = new GridData( GridData.FILL_BOTH );		data.horizontalSpan = 2;		formatTagsBar.setLayoutData( data );		// vertical separator between combo and tooItems		new ToolItem( formatTagsBar, SWT.SEPARATOR );		formatTagsBar.setEnabled( textTypeChoicer.getSelectionIndex( ) == 1 );		// create initial format tags.		createFormatTags( 0, formatTagsBar );		// initiate the enablement of tool items right after they were created.		ToolItem[] toolItems = formatTagsBar.getItems( );		for ( int i = 1; i < toolItems.length; i++ )		{			toolItems[i].setEnabled( formatTagsBar.isEnabled( ) );		}		formatChoicer.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				final int index = formatChoicer.getSelectionIndex( );				ToolItem[] toolItems = formatTagsBar.getItems( );				// avoid to dispose the separator( toolItems[ 0 ] )				for ( int i = 1; i < toolItems.length; i++ )				{					toolItems[i].dispose( );				}				// create html format tags according to the index of the format				// choice selected.				createFormatTags( index, formatTagsBar );				textEditor.setFocus( );			}		} );	}