Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Removing Note attachment Connection Assistant Handle.
Removing Note attachment Connection Assistant Handle. [message #100428] Fri, 02 February 2007 04:53 Go to next message
Eclipse UserFriend
Hi,

Is it possible to remove Note attachment Connection Assistant Handle from
the Figure? And How I can only have incoming or Outgoing assistant Handle?
If the figure already have one connection it should not show the handle.

Regards,
Sandip
Re: Removing Note attachment Connection Assistant Handle. [message #100697 is a reply to message #100428] Fri, 02 February 2007 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Sandip,

The Modeling Assistant Service always collects the element types for the
connection handles from all providers so to change this behavior you
would need to avoid calling the Modeling Assistant Service to populate
the connection handle popups. You could do this by overriding
ConnectionHandle.createDragTracker() to provide another ConnectionTool
that does not use the Modeling Assistant Service and instead just uses
your own types. See ConnectionHandleTool.createTargetRequest().

In order to use your new ConnectionHandle, you would need to override
the ConnectionHandleEditPolicy installed on your editparts.

You can override ConnectionHandleEditPolicy.getHandleFigures() to change
the handle figures or return just one connection handle.

Regards,
Cherie

Sandip Sahoo wrote:
> Hi,
>
> Is it possible to remove Note attachment Connection Assistant Handle from
> the Figure? And How I can only have incoming or Outgoing assistant Handle?
> If the figure already have one connection it should not show the handle.
>
> Regards,
> Sandip
>
>
>
>
Re: Removing Note attachment Connection Assistant Handle. [message #101376 is a reply to message #100697] Tue, 06 February 2007 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi Cherie ,

I am not getting code where I can make changes. I m using GMF2.0M2. I m not
getting this ConnectionHandle class. I found no policy called
ConnectionHandleEditPolicy there.Plz refer me what I can do.

Regards,
sandip




"Cherie Revells" <crevells@ca.ibm.com> wrote in message
news:epvnra$ng7$1@utils.eclipse.org...
> Sandip,
>
> The Modeling Assistant Service always collects the element types for the
> connection handles from all providers so to change this behavior you
> would need to avoid calling the Modeling Assistant Service to populate
> the connection handle popups. You could do this by overriding
> ConnectionHandle.createDragTracker() to provide another ConnectionTool
> that does not use the Modeling Assistant Service and instead just uses
> your own types. See ConnectionHandleTool.createTargetRequest().
>
> In order to use your new ConnectionHandle, you would need to override
> the ConnectionHandleEditPolicy installed on your editparts.
>
> You can override ConnectionHandleEditPolicy.getHandleFigures() to change
> the handle figures or return just one connection handle.
>
> Regards,
> Cherie
>
> Sandip Sahoo wrote:
> > Hi,
> >
> > Is it possible to remove Note attachment Connection Assistant Handle
from
> > the Figure? And How I can only have incoming or Outgoing assistant
Handle?
> > If the figure already have one connection it should not show the handle.
> >
> > Regards,
> > Sandip
> >
> >
> >
> >
Re: Removing Note attachment Connection Assistant Handle. [message #101511 is a reply to message #101376] Tue, 06 February 2007 10:11 Go to previous message
Eclipse UserFriend
Sandip,

You would need to install your own ConnectionHandleEditPolicy in your
editparts to override the one that gets installed there by default (that
is the
org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionHa ndleEditPolicy
installed in the GMF runtime code).

To learn about EditPolicies take a look at the section titled "Editing
and EditPolicies".
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. gef.doc.isv/guide/guide.html

Regards,
Cherie

Sandip Sahoo wrote:
> Hi Cherie ,
>
> I am not getting code where I can make changes. I m using GMF2.0M2. I m not
> getting this ConnectionHandle class. I found no policy called
> ConnectionHandleEditPolicy there.Plz refer me what I can do.
>
> Regards,
> sandip
>
>
>
>
> "Cherie Revells" <crevells@ca.ibm.com> wrote in message
> news:epvnra$ng7$1@utils.eclipse.org...
>> Sandip,
>>
>> The Modeling Assistant Service always collects the element types for the
>> connection handles from all providers so to change this behavior you
>> would need to avoid calling the Modeling Assistant Service to populate
>> the connection handle popups. You could do this by overriding
>> ConnectionHandle.createDragTracker() to provide another ConnectionTool
>> that does not use the Modeling Assistant Service and instead just uses
>> your own types. See ConnectionHandleTool.createTargetRequest().
>>
>> In order to use your new ConnectionHandle, you would need to override
>> the ConnectionHandleEditPolicy installed on your editparts.
>>
>> You can override ConnectionHandleEditPolicy.getHandleFigures() to change
>> the handle figures or return just one connection handle.
>>
>> Regards,
>> Cherie
>>
>> Sandip Sahoo wrote:
>>> Hi,
>>>
>>> Is it possible to remove Note attachment Connection Assistant Handle
> from
>>> the Figure? And How I can only have incoming or Outgoing assistant
> Handle?
>>> If the figure already have one connection it should not show the handle.
>>>
>>> Regards,
>>> Sandip
>>>
>>>
>>>
>>>
>
>
Previous Topic:Opening a dialog box on Creating a Node
Next Topic:I do not want to show PopupBar,how can I do?
Goto Forum:
  


Current Time: Fri Apr 25 18:42:01 EDT 2025

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

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

Back to the top