[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] how to show a menu when select attribute/class name

Hi,

I add below extension to show a menu when user right click the class/attribute name within a class. I use the EAttribute class the enablement condition, but it doesn't work, please help, thanks.
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
id="xxx.objectContributions.BGAssignToGlossary"
objectClass="org.eclipse.gef.editparts.AbstractGraphicalEditPart">
<action
class="xxx.actions.BGAssignToGlossary"
definitionId="xxx.commands.BGAssignToGlossary"
enablesFor="+"
id="xxx.actions.BGAssignToGlossary"
label="Assign to glossary term¡­"
menubarPath="editMenu/additions">
<enablement>
<objectClass
name="org.eclipse.emf.ecore.EAttribute">
</objectClass>
</enablement>
</action>
</objectContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.ui.category.edit"
description="Assign to glossary term..."
id="xxx.commands.BGAssignToGlossary"
name="Assign to glossary term¡­">
</command>
</extension>