public virtual bool OnDisplayJumpToTool(object commandObject, ref UIItemDisplayProperties display)
{
CheckDisposed();
var command = (Command) commandObject;
string tool = XmlUtils.GetManditoryAttributeValue(command.Parameters[0], "tool");
//string areaChoice = m_mediator.PropertyTable.GetStringProperty("areaChoice", null);
//string toolChoice = m_mediator.PropertyTable.GetStringProperty("ToolForAreaNamed_" + areaChoice, null);
string toolChoice = m_mediator.PropertyTable.GetStringProperty("currentContentControl", null);
if (!IsAcceptableContextToJump(toolChoice, tool))
{
display.Visible = display.Enabled = false;
return true;
}
string className = XmlUtils.GetManditoryAttributeValue(command.Parameters[0], "className");
int specifiedClsid = 0;
var mdc = (IFwMetaDataCacheManaged)m_cache.DomainDataByFlid.MetaDataCache;
if (mdc.ClassExists(className)) // otherwise is is a 'magic' class name treated specially in other OnDisplays.
specifiedClsid = mdc.GetClassId(className);
display.Visible = display.Enabled = ShouldDisplayMenuForClass(specifiedClsid, display);
if (display.Enabled)
command.TargetId = GuidForJumping(commandObject);
return true;
}