Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Removing default Note connection functionality
Removing default Note connection functionality [message #137237] Tue, 19 June 2007 00:38 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Change color EditPolicy
Next Topic:Problems with getInsteadCommand
Goto Forum:
  


Current Time: Wed Jul 16 12:02:43 EDT 2025

Powered by FUDForum. Page generated in 0.05159 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top