Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Installing SnapFeedbackPolicy on an EditPart
Installing SnapFeedbackPolicy on an EditPart [message #164505] Tue, 18 January 2005 22:45 Go to next message
Eclipse UserFriend
Originally posted by: bberry.harmonia.com

I am implementing an EditPart and would like to take advantage of the
SnapFeedbackPolicy feedback. However, I have not had much luck in finding
documentation of proper use. From what I have seen, most edit policies
have a corresponding field in the EditPolicy class to use as keys; for
example, you can invoke installEditPolicy(EditPolicy.CONTAINER_ROLE, new
MyContainerPolicy()).

Unfortunately there does not seem to be a SNAP_FEEDBACK_ROLE field on
EditPolicy. Is this because SnapFeedbackRole is not meant to be installed
on an EditPart at all? Should I simply create a key (which feels kind of
ugly to me)? Or does it fall under one of the existing fields?
Re: Installing SnapFeedbackPolicy on an EditPart [message #164513 is a reply to message #164505] Tue, 18 January 2005 23:15 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
It's usually a good idea to have the logic example loaded in your workspace
so that you can just look up how some things are being used.

From LogicDiagramEditPart#createEditPolicies():
installEditPolicy("Snap Feedback", new SnapFeedbackPolicy()); //$NON-NLS-1$


"Brendan" <bberry@harmonia.com> wrote in message
news:csk3hq$5hk$1@www.eclipse.org...
> I am implementing an EditPart and would like to take advantage of the
> SnapFeedbackPolicy feedback. However, I have not had much luck in finding
> documentation of proper use. From what I have seen, most edit policies
> have a corresponding field in the EditPolicy class to use as keys; for
> example, you can invoke installEditPolicy(EditPolicy.CONTAINER_ROLE, new
> MyContainerPolicy()).
>
> Unfortunately there does not seem to be a SNAP_FEEDBACK_ROLE field on
> EditPolicy. Is this because SnapFeedbackRole is not meant to be installed
> on an EditPart at all? Should I simply create a key (which feels kind of
> ugly to me)? Or does it fall under one of the existing fields?
>
Previous Topic:GEF Shapes example : connections don't stick to moving figure
Next Topic:Problem with draw2d layout
Goto Forum:
  


Current Time: Fri Mar 29 12:32:55 GMT 2024

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

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

Back to the top