Installing SnapFeedbackPolicy on an EditPart [message #164505] |
Tue, 18 January 2005 17:45  |
Eclipse User |
|
|
|
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 18:15  |
Eclipse User |
|
|
|
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?
>
|
|
|
Powered by
FUDForum. Page generated in 0.02568 seconds