}
final ReportDesignerContext context = getReportDesignerContext();
final Component parent = context.getView().getParent();
final Window window = LibSwingUtil.getWindowAncestor(parent);
final BundledResourceEditor dialog;
if (window instanceof JDialog)
{
dialog = new BundledResourceEditor((JDialog) window, getReportDesignerContext());
}
else if (window instanceof JFrame)
{
dialog = new BundledResourceEditor((JFrame) window, getReportDesignerContext());
}
else
{
dialog = new BundledResourceEditor(getReportDesignerContext());
}
if (dialog.editResources())
{
final MasterReport masterReportElement = activeContext.getContextRoot();
masterReportElement.fireModelLayoutChanged
(masterReportElement, ReportModelEvent.NODE_PROPERTIES_CHANGED, masterReportElement.getBundle());
}