{
return;
}
// determine zoom level
ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) getEditor().getGraphicalViewer().getRootEditPart();
double zoom = rootEditPart.getZoomManager().getZoom();
if (zoom < MINIMUM_ZOOM_LEVEL) {
return;
}
ContextButtonPadData contextButtonPadData = getContextButtonPad(getEditor().getSelectedEditParts());
if (contextButtonPadData.getRightContextButtons().size() == 0
&& contextButtonPadData.getTopContextButtons().size() == 0) {
return; // no context buttons to show
}
IContextButtonPadDeclaration declaration = new StandardContextButtonPadDeclaration(contextButtonPadData);
// create context button pad and add to handle layer
ContextButtonPad contextButtonPad = new ContextButtonPad(declaration, zoom, getEditor(), getEditor().getSelectedEditParts());
setActiveContextButtonPad(contextButtonPad);
IFigure feedbackLayer = rootEditPart.getLayer(LayerConstants.HANDLE_LAYER);
feedbackLayer.add(contextButtonPad);
}