final String[] actions = view.getActions();
if (actions.length > 0) {
final IEntity entity = view.getEntity();
JPopupMenu menu = new EntityViewCommandList(entity.getType(), actions, view);
menu.show(canvas, point.x - MENU_OFFSET, point.y - MENU_OFFSET);
contextMenuFlag = true;
/*
* Tricky way to detect recent popup menues. We need the
* information to prevent walking when hiding the menu.
*/
menu.addPopupMenuListener(new PopupMenuListener() {
public void popupMenuCanceled(PopupMenuEvent e) {
//ignore
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent arg0) {
/*