final Object node = getSelectionPath().getLastPathComponent();
if (node instanceof ReportFieldNode)
{
final ReportFieldNode field = (ReportFieldNode) node;
return new FieldDescriptionTransferable(field.getFieldName());
}
if (node instanceof ParameterMapping)
{
final Object o = getSelectionPath().getParentPath().getLastPathComponent();
if (o instanceof SubReportParametersNode.ImportParametersNode)
{
final ParameterMapping field = (ParameterMapping) node;
return new FieldDescriptionTransferable(field.getAlias());
}
}
if (node instanceof ParameterDefinitionEntry)
{
final ParameterDefinitionEntry field = (ParameterDefinitionEntry) node;
return new FieldDescriptionTransferable(field.getName());
}
if (node instanceof Expression)
{
final Expression expression = (Expression) node;
if (expression.getName() != null)
{
return new FieldDescriptionTransferable(expression.getName());
}
}
return null;
}