action = new ExportToLibraryAction( object ); if ( action.isEnabled( ) ) menu.add( action );
	public void createContextMenu( TreeViewer sourceViewer, Object object,			IMenuManager menu )	{		menu.add( new Separator( ) );		InsertInLayoutAction insertAction = new InsertInLayoutAction( object );		if ( insertAction.isTypeAvailable( ) )		{			menu.add( insertAction );		}		menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );		// Rename action		RenameAction renameAction = new RenameAction( sourceViewer );		if ( renameAction.isEnabled( ) )		{//if can rename,add to menu			menu.add( renameAction );		}		// Delete action		DeleteAction deleteAction = new DeleteAction( object );		if ( deleteAction.isEnabled( ) )		{//if can delete,add to menu			menu.add( deleteAction );		}		CutAction cutAction = new CutAction( object );		if ( cutAction.isEnabled( ) )			menu.add( cutAction );		CopyAction copyAction = new CopyAction( object );		if ( copyAction.isEnabled( ) )			menu.add( copyAction );		menu.add( new PasteAction( object ) );		//Insert point for refresh action		menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS				+ "-refresh" ) );//$NON-NLS-1$		Action action = new CodePageAction( object );		if ( action.isEnabled( ) )			menu.add( action );		menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS				+ "-end" ) );//$NON-NLS-1$			}