Removing default Note connection functionality [message #137237] |
Tue, 19 June 2007 00:38  |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
Hi,
I'm sure I saw this previously on here but I can't find it. So I appologise
in advance.
I'd like to remove all behaviour around the default note attachment stuff
that comes with GMF.
* Right mouse click Add menu
* Arrow connections from node when mouse hovers over.
etc.
Any clues ?
Thanks,
Stu
|
|
|
Re: Removing default Note connection functionality [message #137249 is a reply to message #137237] |
Tue, 19 June 2007 02:26  |
Eclipse User |
|
|
|
Hi Stu,
I think I could help you.
> Hi,
> I'm sure I saw this previously on here but I can't find it. So I appologise
> in advance.
>
> I'd like to remove all behaviour around the default note attachment stuff
> that comes with GMF.
> * Right mouse click Add menu
Add this to your plugin.xml:
<extension
point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<?gmfgen generated="false"?>
<contributionItemProvider
checkPluginLoaded="false"
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContribu tionItemProvider ">
<Priority
name="Low">
</Priority>
<popupContribution
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
<popupPredefinedItem
id="addGroup"
remove="true">
</popupPredefinedItem>
</popupContribution>
</contributionItemProvider>
</extension>
> * Arrow connections from node when mouse hovers over.
In the ???EditPart of the node you edit the following method:
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
new ???ItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE,
createLayoutEditPolicy());
// remove the ability to add connections to node
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
>
> etc.
>
> Any clues ?
>
> Thanks,
>
> Stu
>
>
You can change a lot of things more, if you want. ;)
Regards,
Jens
|
|
|
Powered by
FUDForum. Page generated in 0.05159 seconds