Home » Modeling » GMF (Graphical Modeling Framework) » Disable "Delete From Diagram"
Disable "Delete From Diagram" [message #219787] |
Tue, 24 February 2009 07:08 |
Eclipse User |
|
|
|
Originally posted by: Erazerx.gmx.de
Hello all,
my Diagram Editor is synchronised to a model. The "Delete From Diagram"
Action is disabled for all elements... except for one.
I don't think i made something different on creating that element.
The only difference i see, is that the element, where the "Delete From
Diagram" Action is available, is a Association that can have an other
association as source or target.
However, is there a way to manually disable the "Delete From Diagram"
Action?
I was looking around in the corresponding Edit-Policy class, but
couldn't find a command that gets created from that class, that is
responsible for the action.
Thx in advance, Arne
|
|
|
Re: Disable "Delete From Diagram" [message #219905 is a reply to message #219787] |
Tue, 24 February 2009 16:39 |
Eclipse User |
|
|
|
Originally posted by: jxtamarc.gmail.com
El dia Tue, 24 Feb 2009 08:08:01 +0100, en/na Arne va escriure:
Hi Arne,
go to the plugin.xml file, and then all you have to do is :
<popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
under the extension point :
<extension
point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
This is what i have for an element of my model : ActivyEditPart.
<extension
point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<?gmfgen generated="false"?>
<contributionItemProvider
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContribu tionItemProvider "
checkPluginLoaded="false">
<Priority name="Low"/>
<popupContribution
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
<popupStructuredContributionCriteria
objectClass=" com.isoco.iwf.designer.bpmn.diagram.edit.parts.ActivityEditP art "/
>
<popupPredefinedItem id="addNoteLinkAction" remove="true"/>
<popupPredefinedItem id="fileMenu" remove="true"/>
<popupPredefinedItem id="cut" path="/editMenu/copyGroup"
remove="true"/>
<popupPredefinedItem id="copy" path="/editMenu/
copyGroup" remove="true"/>
<popupPredefinedItem id="paste" path="/editMenu/
copyGroup" remove="true"/>
<popupPredefinedItem id="deleteFromDiagramAction"
remove="true"/>
<popupPredefinedItem id="deleteFromModelAction"
remove="false"/>
<popupPredefinedItem id="formatMenu" remove="true"/>
<popupPredefinedItem id="filtersMenu" remove="true"/>
<popupPredefinedItem id="showPropertiesViewAction"
remove="true"/>
<popupPredefinedItem id="properties" remove="true"/>
</popupContribution>
hope it helps.
> Hello all,
>
> my Diagram Editor is synchronised to a model. The "Delete From Diagram"
> Action is disabled for all elements... except for one. I don't think i
> made something different on creating that element.
>
> The only difference i see, is that the element, where the "Delete From
> Diagram" Action is available, is a Association that can have an other
> association as source or target.
>
> However, is there a way to manually disable the "Delete From Diagram"
> Action?
>
> I was looking around in the corresponding Edit-Policy class, but
> couldn't find a command that gets created from that class, that is
> responsible for the action.
>
> Thx in advance, Arne
|
|
|
Re: Disable "Delete From Diagram" [message #220308 is a reply to message #219905] |
Sun, 01 March 2009 13:09 |
Eclipse User |
|
|
|
Originally posted by: Erazerx.gmx.de
Hi!
Yes it really helped a lot, thank you!
It is a little emberrassing, since I already worked with that extension
point and still was trying to "grey the actions out" instead of using
the extension point to remove the action completely. I was really blind
there.
Anyway, you really helped me there :)
Arne
markitus schrieb:
> El dia Tue, 24 Feb 2009 08:08:01 +0100, en/na Arne va escriure:
> Hi Arne,
>
> go to the plugin.xml file, and then all you have to do is :
>
> <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
>
> under the extension point :
>
> <extension
> point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
>
>
> This is what i have for an element of my model : ActivyEditPart.
>
>
> <extension
> point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
> <?gmfgen generated="false"?>
> <contributionItemProvider
> class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContribu tionItemProvider "
> checkPluginLoaded="false">
> <Priority name="Low"/>
>
> <popupContribution
> class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
> <popupStructuredContributionCriteria
> objectClass=" com.isoco.iwf.designer.bpmn.diagram.edit.parts.ActivityEditP art "/
> <popupPredefinedItem id="addNoteLinkAction" remove="true"/>
> <popupPredefinedItem id="fileMenu" remove="true"/>
> <popupPredefinedItem id="cut" path="/editMenu/copyGroup"
> remove="true"/>
> <popupPredefinedItem id="copy" path="/editMenu/
> copyGroup" remove="true"/>
> <popupPredefinedItem id="paste" path="/editMenu/
> copyGroup" remove="true"/>
> <popupPredefinedItem id="deleteFromDiagramAction"
> remove="true"/>
> <popupPredefinedItem id="deleteFromModelAction"
> remove="false"/>
> <popupPredefinedItem id="formatMenu" remove="true"/>
> <popupPredefinedItem id="filtersMenu" remove="true"/>
> <popupPredefinedItem id="showPropertiesViewAction"
> remove="true"/>
> <popupPredefinedItem id="properties" remove="true"/>
> </popupContribution>
> hope it helps.
>
>
>> Hello all,
>>
>> my Diagram Editor is synchronised to a model. The "Delete From Diagram"
>> Action is disabled for all elements... except for one. I don't think i
>> made something different on creating that element.
>>
>> The only difference i see, is that the element, where the "Delete From
>> Diagram" Action is available, is a Association that can have an other
>> association as source or target.
>>
>> However, is there a way to manually disable the "Delete From Diagram"
>> Action?
>>
>> I was looking around in the corresponding Edit-Policy class, but
>> couldn't find a command that gets created from that class, that is
>> responsible for the action.
>>
>> Thx in advance, Arne
>
|
|
|
Re: Disable "Delete From Diagram" [message #514458 is a reply to message #219905] |
Mon, 15 February 2010 12:50 |
Hauke Fuhrmann Messages: 333 Registered: July 2009 |
Senior Member |
|
|
Hey Markitus!
Does this only remove the context menu entry or really disable deleting
at all? I have the problem that the "Backspace" key is also mapped to
"delete from diagram" for single EditParts. Will this binding be removed
then, too?
BTW: Did not really get this to work. Using this extension point only
did *enable* the "delete from model" but not yet disable the "delete
from diagram". In my case I have a feature label attached to a
connection edit part that can be removed from the diagram.
Cheers,
Hauke
markitus schrieb:
> El dia Tue, 24 Feb 2009 08:08:01 +0100, en/na Arne va escriure:
> Hi Arne,
>
> go to the plugin.xml file, and then all you have to do is :
>
> <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
>
> under the extension point :
>
> <extension
> point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
>
>
> This is what i have for an element of my model : ActivyEditPart.
>
>
> <extension
> point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
> <?gmfgen generated="false"?>
> <contributionItemProvider
> class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContribu tionItemProvider "
> checkPluginLoaded="false">
> <Priority name="Low"/>
>
> <popupContribution
> class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
> <popupStructuredContributionCriteria
> objectClass=" com.isoco.iwf.designer.bpmn.diagram.edit.parts.ActivityEditP art "/
> <popupPredefinedItem id="addNoteLinkAction" remove="true"/>
> <popupPredefinedItem id="fileMenu" remove="true"/>
> <popupPredefinedItem id="cut" path="/editMenu/copyGroup"
> remove="true"/>
> <popupPredefinedItem id="copy" path="/editMenu/
> copyGroup" remove="true"/>
> <popupPredefinedItem id="paste" path="/editMenu/
> copyGroup" remove="true"/>
> <popupPredefinedItem id="deleteFromDiagramAction"
> remove="true"/>
> <popupPredefinedItem id="deleteFromModelAction"
> remove="false"/>
> <popupPredefinedItem id="formatMenu" remove="true"/>
> <popupPredefinedItem id="filtersMenu" remove="true"/>
> <popupPredefinedItem id="showPropertiesViewAction"
> remove="true"/>
> <popupPredefinedItem id="properties" remove="true"/>
> </popupContribution>
> hope it helps.
>
>
>> Hello all,
>>
>> my Diagram Editor is synchronised to a model. The "Delete From Diagram"
>> Action is disabled for all elements... except for one. I don't think i
>> made something different on creating that element.
>>
>> The only difference i see, is that the element, where the "Delete From
>> Diagram" Action is available, is a Association that can have an other
>> association as source or target.
>>
>> However, is there a way to manually disable the "Delete From Diagram"
>> Action?
>>
>> I was looking around in the corresponding Edit-Policy class, but
>> couldn't find a command that gets created from that class, that is
>> responsible for the action.
>>
>> Thx in advance, Arne
>
|
|
|
Goto Forum:
Current Time: Tue Apr 23 17:11:27 GMT 2024
Powered by FUDForum. Page generated in 0.04306 seconds
|