final Action actionCopy = action.getClass().newInstance();
menuCopy.setAction(actionCopy);
if (action instanceof DesignerContextComponent)
{
final DesignerContextComponent c1 = (DesignerContextComponent) action;
final DesignerContextComponent c2 = (DesignerContextComponent) actionCopy;
c2.setReportDesignerContext(c1.getReportDesignerContext());
}
copy.add(menuCopy);
}
else if (component instanceof JPopupMenu.Separator)
{