Search in sources :

Example 1 with IActionRedirection

use of org.whole.lang.ui.actions.IActionRedirection in project whole by wholeplatform.

the class RedirectableModelTransactionHandler method getActionRedirection.

protected IActionRedirection getActionRedirection(IBindingManager bm) {
    if (!bm.wIsSet("focusEntity"))
        return NullActionRedirection.instance();
    IEntityPartViewer viewer = (IEntityPartViewer) bm.wGetValue("viewer");
    IEntityPart entityPart = viewer.getEditPartRegistry().get(bm.wGet("focusEntity"));
    IActionRedirection actionRedirection = (IActionRedirection) entityPart.getAdapter(IActionRedirection.class);
    return actionRedirection != null ? actionRedirection : NullActionRedirection.instance();
}
Also used : IActionRedirection(org.whole.lang.ui.actions.IActionRedirection) IEntityPartViewer(org.whole.lang.ui.viewers.IEntityPartViewer) IEntityPart(org.whole.lang.ui.editparts.IEntityPart)

Aggregations

IActionRedirection (org.whole.lang.ui.actions.IActionRedirection)1 IEntityPart (org.whole.lang.ui.editparts.IEntityPart)1 IEntityPartViewer (org.whole.lang.ui.viewers.IEntityPartViewer)1