{
property0 = ((WithPart)part).property();
}
final Element element = part.getLocalModelElement();
final SourceEditorService sourceEditorService = element.adapt( SourceEditorService.class );
if( sourceEditorService == null )
{
return;
}
boolean contribute = false;
if( property0 == null )
{
contribute = true;
}
else if( ! property0.definition().isDerived() )
{
contribute = ! property0.empty();
}
if( ! contribute )
{
return;
}
final Property property = property0;
final PropertyEditorAssistContribution.Factory contribution = PropertyEditorAssistContribution.factory();
contribution.text( "<p><a href=\"action\" nowrap=\"true\">" + escapeForXml( action.text() ) + "</a></p>" );
contribution.link
(
"action",
new Runnable()
{
public void run()
{
sourceEditorService.show( element, property != null ? property.definition() : null);
}
}
);
final PropertyEditorAssistSection section = context.getSection( SECTION_ID_ACTIONS );