if (metadata.isEditable() == false)
{
return;
}
final DataSourcePlugin dataSourcePlugin = metadata.createEditor();
final DataFactory storedFactory = dataFactory.derive();
if (dataSourcePlugin.canHandle(dataFactory))
{
final ReportDocumentContext activeContext = getActiveContext();
final AbstractReportDefinition report = activeContext.getReportDefinition();
final boolean editingActiveQuery = contains(report.getQuery(), dataFactory.getQueryNames());
final ReportDesignerDesignTimeContext designTimeContext = new ReportDesignerDesignTimeContext(getReportDesignerContext());
editedDataFactory = dataSourcePlugin.performEdit(designTimeContext, dataFactory, queryName, null);
if (editedDataFactory == null)
{
return;
}