if (definition instanceof ModifiableReportParameterDefinition == false)
{
return null;
}
final ModifiableReportParameterDefinition dpd = (ModifiableReportParameterDefinition) definition;
final ParameterDefinitionEntry[] entries = dpd.getParameterDefinitions();
for (int i = 0; i < entries.length; i++)
{
final ParameterDefinitionEntry entry = entries[i];
if (element == entry)
{
if (dpd.getParameterCount() > i + 1)
{
dpd.removeParameterDefinition(i);
dpd.addParameterDefinition(i + 1, entry);
report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, entry);
return new CompoundUndoEntry
(new ParameterEditUndoEntry(i, entry, null), new ParameterEditUndoEntry(i + 1, null, entry));
}
}