if ( selectedFirstElement instanceof RowHandle )
createStyleMenu( menuManager, GEFActionConstants.GROUP_REST );  if ( firstSelectedElement instanceof ReportDesignHandle ) { } if ( firstSelectedElement instanceof MasterPageHandle ) { } if ( firstSelectedElement instanceof ReportItemHandle ) { if ( firstSelectedElement instanceof ListingHandle ) { if ( firstSelectedElement instanceof ListHandle ) { } else if ( firstSelectedElement instanceof TableHandle ) { MenuManager subMenu = new MenuManager( SHOW_MENU_ITEM_TEXT ); subMenu.add( getAction( IncludeHeaderAction.ID ) ); subMenu.add( getAction( IncludeDetailAction.ID ) ); subMenu.add( getAction( IncludeFooterAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, subMenu ); } else if ( firstSelectedElement instanceof GridHandle ) { } else {  } } } else if ( firstSelectedElement instanceof RowHandle ) { MenuManager insertMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); insertMenu.add( getAction( InsertRowAboveAction.ID ) ); insertMenu.add( getAction( InsertRowBelowAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, insertMenu ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( DeleteRowAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof ColumnHandle ) { MenuManager subMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); subMenu.add( getAction( InsertColumnRightAction.ID ) ); subMenu.add( getAction( InsertColumnLeftAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, subMenu ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( DeleteColumnAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof CellHandle ) { createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else {  } } else if ( firstSelectedElement instanceof SlotHandle )
	public void buildContextMenu( IMenuManager menuManager )	{		GEFActionConstants.addStandardActionGroups( menuManager );		// undo , redo		appendActionToUndoGroup( getAction( ActionFactory.UNDO.getId( ) ),				menuManager );		appendActionToUndoGroup( getAction( ActionFactory.REDO.getId( ) ),				menuManager );		appendActionToEditGroup( getAction( GEFActionConstants.DIRECT_EDIT ),				menuManager );		appendActionToEditGroup( getAction( MergeAction.ID ), menuManager );		appendActionToEditGroup( getAction( SplitAction.ID ), menuManager );		appendActionToAddGroup( getAction( InsertListGroupAction.ID ),				menuManager );		appendActionToAddGroup( getAction( DeleteListGroupAction.ID ),				menuManager );		/** Gets the current selected object, local */		Object selectedFirstElement = getFirstElement( );		Object selectedElements = getSelectedElement( );		// Adds cut, copy, paste group actions		appendActionToCopyGroup( new CutAction( selectedElements ), menuManager );		appendActionToCopyGroup( new CopyAction( selectedElements ),				menuManager );		appendActionToCopyGroup( new PasteAction( selectedElements ),				menuManager );		// adds save		appendActionToSaveGroup( getAction( ActionFactory.SAVE.getId( ) ),				menuManager );		// selecting a row		if ( selectedFirstElement instanceof RowHandle )		{			createInsertRowMenu( menuManager, GEFActionConstants.GROUP_EDIT );			if ( !( getTableEditParts( ).get( 0 ) instanceof GridEditPart ) )			{				createShowMenu( menuManager, GEFActionConstants.GROUP_EDIT );				appendActionToAddGroup( getAction( InsertGroupAction.ID ),						menuManager );				Separator separator = new Separator( EditBindingAction.ID );				menuManager.add( separator );				menuManager.appendToGroup( EditBindingAction.ID,						getAction( EditBindingAction.ID ) );			}			appendActionToEditGroup( getAction( DeleteRowAction.ID ),					menuManager );			appendActionToAddGroup( getAction( DeleteGroupAction.ID ),					menuManager );		}		// selecting a column		else if ( selectedFirstElement instanceof ColumnHandle )		{			createInsertColumnMenu( menuManager, GEFActionConstants.GROUP_EDIT );			appendActionToEditGroup( getAction( DeleteColumnAction.ID ),					menuManager );		}		// selecting a cell of table, grid or list.		else if ( selectedFirstElement instanceof CellHandle				|| selectedFirstElement instanceof SlotHandle )		{			createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT );		}		else		{			appendActionToCopyGroup( new DeleteAction( selectedElements ),					menuManager );		}		// selecting a list		// to be considered.		//if ( getListEditParts( ) != null && getListEditParts( ).size( ) == 1)		if ( getListEditParts( ) != null )		{			createListMenu( menuManager, GEFActionConstants.GROUP_EDIT );		}		createGroupMenu( menuManager, GEFActionConstants.GROUP_ADD );		createStyleMenu( menuManager, GEFActionConstants.GROUP_REST );	}