How to hide my custom context menu dynamically?

Hi guys
I have developed a plugin which invoked by a custom context menu ( by right-clicking on the element and choosing my custom menu)
My problem is that I want the custom menu to be shown in the context menu only in special cases, for example only when I right-click on a special kind of element.
I know how to disable the menu dynamically in the cases i want (like the attached image) by calling action.setEnabled(false) in the overridden update() method, but this only disables the menu while I want to completely hide it from the context menu dialog

How can I implement this requirement?
Thanks in advance

Hi Mamad,

Thank you for your post. Please specify the type of model element to include in your plugin.xml. Here is an example:

		provider="Visual Paradigm"
		<contextSensitiveActionSet id="com.vp.plugin.sample.mysample.actionset">
			<contextTypes all="false">
				<include type="UseCase"/>
					label="Generate Default Data"
				<actionController class="com.vp.plugin.sample.mysample.actions.GenerateDefaultDataActionController"/>

Hope this helps.

Best regards,
Jick Yeung