if("Resource".equals(data.getValueRole()) == false) // NON-NLS
{
return;
}
final CustomPropertyEditorDialog editorDialog;
final Component window = getReportDesignerContext().getView().getParent();
if (window instanceof Frame)
{
editorDialog = new CustomPropertyEditorDialog((Frame) window);
}
else if (window instanceof Dialog)
{
editorDialog = new CustomPropertyEditorDialog((Dialog) window);
}
else
{
editorDialog = new CustomPropertyEditorDialog();
}
editorDialog.setTitle(ActionMessages.getString("EditContentRefAction.Text"));
final ResourcePropertyEditor propertyEditor = new ResourcePropertyEditor(getActiveContext());
propertyEditor.setValue
(element.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE));
if (editorDialog.performEdit(propertyEditor))
{
element.setAttribute
(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, propertyEditor.getValue());
}