private bool HandleRightClickOnObject(int hvoDummy)
{
if (hvoDummy == 0)
return false;
if (m_realEnvs.ContainsKey(hvoDummy))
{
// This displays the "Show in Environments list" item in the popup menu, in
// addition to all the Insert X" items.
int hvo = m_realEnvs[hvoDummy].Hvo;
ReferenceCollectionUi ui = new ReferenceCollectionUi(Cache, m_rootObj, m_rootFlid, hvo);
return ui.HandleRightClick(Mediator, this, true);
}
else
{
// We need a CmObjectUi in order to call HandleRightClick(). This won't
// display the "Show in Environments list" item in the popup menu.
CmObjectUi ui = new CmObjectUi(m_rootObj);
return ui.HandleRightClick(Mediator, this, true, "mnuEnvReferenceChoices");
}
}