Remove cut/copy/paste from Popup [message #209216] |
Wed, 22 October 2008 11:28  |
Eclipse User |
|
|
|
Hi all,
I use GMF 2.0 with Eclipse Europa 3.3.
I didn't found how to remove the actions "cut"/"copy"/"paste" from the
popup menu. I know how to remove "deleteFromModel" and "deleteFromDiagram"
like this :
<popupContribution
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
<popupStructuredContributionCriteria objectClass="MyEditPart"/>
<popupPredefinedItem id="deleteFromDiagramAction"
remove="true"/>
<popupPredefinedItem id="deleteFromModelAction"
remove="true"/>
</popupContribution>
But what must I specify for actions in sub-menu ?
Regards,
Sylvain
|
|
|
|
Re: Remove cut/copy/paste from Popup [message #209267 is a reply to message #209251] |
Thu, 23 October 2008 03:51   |
Eclipse User |
|
|
|
Prathibha ha scritto:
> Hi Sylvain,
> comment the cut,copy,paste from you plugin.xml.Hope this solves your
> problem.
>
> <ElementType
> class=" org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditP art ">
> <!-- <GlobalActionId actionId="cut"/>
> <GlobalActionId actionId="copy"/>
> <GlobalActionId actionId="paste"/> -->
> </ElementType>
>
>
> regards,
> Prathibha
>
Hi there, what is the best practice to override these actions? In our
application there's the need to copy & paste an item, and since our
application transforms gmf diagrams in seam web pages via jetemitters,
we provide a objecttype_[timestamp] as node id when one creates an item,
to avoid duplicate id in the webpages.
But happens that if you copy & paste an item these id remain the same
,avoiding somehow the overriden "on creation event" method of the
corresponding
node that would place a new timestamp.
Debugging leads me into thread, runnable methods far away, so where is
the right place to look for me to intercept the "on paste event" method?
Regards
Paolo
|
|
|
|
Re: Remove cut/copy/paste from Popup [message #209293 is a reply to message #209275] |
Thu, 23 October 2008 05:03  |
Eclipse User |
|
|
|
I have found !
All predefined items can be found in the plugin.xml of
org.eclipse.gmf.runtime.diagram.ui.providers plugin.
So I was able to remove "cut" action for exemple like this :
<popupPredefinedItem id="cut" path="/editMenu/copyGroup" remove="true"/>
Sylvain
|
|
|
Powered by
FUDForum. Page generated in 0.03425 seconds