putValue(Action.MNEMONIC_KEY, ActionMessages.getOptionalMnemonic("ShowAddDataSourcePopupAction.Mnemonic"));
}
public void actionPerformed(final ActionEvent e)
{
final ReportDesignerContext reportDesignerContext1 = getReportDesignerContext();
if (reportDesignerContext1 == null)
{
return;
}
final JPopupMenu menu = ContextMenuUtility.createDataSourcePopup(reportDesignerContext1);
final Object source = e.getSource();
if (source instanceof Component)
{
final Component c = (Component) source;
menu.show(c, 0, c.getHeight());
}
else
{
final Component parent = reportDesignerContext1.getView().getParent();
menu.show(parent, 0, 0);
}
}