appendActionToCopyGroup( new CutAction( selectedElements ), menuManager ); appendActionToCopyGroup( new CopyAction( selectedElements ), menuManager ); appendActionToCopyGroup( new PasteAction( selectedElements ), menuManager );  appendActionToSaveGroup( getAction( ActionFactory.SAVE.getId( ) ), menuManager );
if ( firstSelectedElement instanceof DesignElementHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) );
	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 );	}