ReportDesignerView view = context.getView();
if (selectedElement == null || selectedElement instanceof MasterReport) // This check assumes that we've click on a report band see JIRA PRD-1076
{
return view.getPopupMenu("popup-ReportDefinition"); // NON-NLS
}
final ReportDesignerDocumentContext activeContext = context.getActiveContext();
if (activeContext instanceof ReportRenderContext)
{
ReportRenderContext doc = (ReportRenderContext) activeContext;
if (selectedElement == doc.getReportDefinition())
{