public FunctionResult evaluate( final FunctionContext context )
{
if( context instanceof PartFunctionContext )
{
final SapphirePart part = ( (PartFunctionContext) context ).part();
final MasterDetailsEditorPagePart page = part.nearest( MasterDetailsEditorPagePart.class );
if( page != null )
{
final Element element = part.getLocalModelElement();
if( element instanceof Item )
{
final Item item = (Item) element;
final MasterDetailsEditorPageState state = page.state();
return new FunctionResult( this, context )
{
private Listener listener;