Bug 146088 Add library context menu item not available in empty Library Explorer
Steps to reproduce: 1. Make sure there are no libraries in your resource folder. Right-click in Library Explorer. 2. If libraries exist in the resource folder, expand a library and highlight an item that is inside the library. Right-click in Library Explorer. Expected: Add Library is available in the context menu in both cases. Use Library is available in the context menu in case 2. Actual: Only Refresh is available in the context menu. It should not be necessary to select a library in order to add a library.
UI/org.eclipse.birt.report.designer.ui.lib.explorer/src/org/eclipse/birt/report/designer/ui/lib/explorer/LibraryExplorerContextMenuProvider.java
if ( useLibraryAction.isEnabled( ) )
					{
						menu.add( useLibraryAction );
					}
				}
			}
			else if ( selected instanceof ReportItemHandle 
				|| selected instanceof DataSourceHandle
				|| selected instanceof DataSetHandle
				|| selected instanceof ParameterHandle
				|| selected instanceof MasterPageHandle
				|| selected instanceof EmbeddedImageHandle
				)
			{
				if(selection.size( ) == 1)
				{
					AddElementtoReport addElementAction = new AddElementtoReport( (StructuredViewer) getViewer() );
					addElementAction.setSelectedElement( selected );
					menu.add( addElementAction );					
				}
			}
		}
		else
		{
			refreshExplorerAction.setSelectedElement( null );
			menu.add( refreshExplorerAction );
		}
	}
}