Search in sources :

Example 1 with ExposeHelper

use of org.eclipse.gef.ExposeHelper in project archi by archimatetool.

the class GraphicalViewerImpl method reveal.

/**
 * Reveals the specified editpart by using {@link ExposeHelper}s. A
 * bottom-up scan through the parent-chain is performed, looking for expose
 * helpers along the way, and asking them to expose the given editpart.
 *
 * @see org.eclipse.gef.EditPartViewer#reveal(EditPart)
 */
@Override
public void reveal(EditPart part) {
    if (part == null)
        return;
    EditPart current = part.getParent();
    while (current != null) {
        ExposeHelper helper = current.getAdapter(ExposeHelper.class);
        if (helper != null)
            helper.exposeDescendant(part);
        current = current.getParent();
    }
    AccessibleEditPart acc = part.getAdapter(AccessibleEditPart.class);
    if (acc != null)
        getControl().getAccessible().setFocus(acc.getAccessibleID());
}
Also used : AccessibleEditPart(org.eclipse.gef.AccessibleEditPart) ScalableRootEditPart(org.eclipse.gef.editparts.ScalableRootEditPart) RootEditPart(org.eclipse.gef.RootEditPart) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) EditPart(org.eclipse.gef.EditPart) ExposeHelper(org.eclipse.gef.ExposeHelper) AccessibleEditPart(org.eclipse.gef.AccessibleEditPart)

Aggregations

AccessibleEditPart (org.eclipse.gef.AccessibleEditPart)1 EditPart (org.eclipse.gef.EditPart)1 ExposeHelper (org.eclipse.gef.ExposeHelper)1 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)1 RootEditPart (org.eclipse.gef.RootEditPart)1 ScalableRootEditPart (org.eclipse.gef.editparts.ScalableRootEditPart)1