I have been creating an Alchemy plugin and wanted to have it as a context menu as shown below:
further, I want it to appear only for the schema and components and no where else. I am having below code for this in respective command JS files:
isAvailable: function (selection)
{
var item = $models.getItem(selection.getItem(0));
var itemTypeName = item.getItemTypeName();
if (itemTypeName == "Component" || itemTypeName == "Schema")
{
return true;
}
return false;
}
While this works fine if now I right click on a schema or component, but if I right click on some other item types, I got this as below:
Nothing happens when I hover on the My PlugIn
menu - meaning Option1
and More Options...
and other children of More Option menu are not visible/available.
The Whole scenario works fine if I have these menus for 1-level depth only instead of 2-level depth as shown below:
Can someone share their knowledge and let me know if I am missing something.