|
Re: EditPartViewer.findObjectAt problem [message #210125 is a reply to message #210111] |
Wed, 22 February 2006 20:57 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
findObjectAt(Point) works for me. Maybe your editpart is not registered with
its figure? You should step into the find method and see where it is
failing.
"Kevin O'Riordan" <k.oriordan@ie.ibm.com> wrote in message
news:dtic5j$3tl$1@utils.eclipse.org...
> Hey all, I'm having a problem here and was wondering if anyone could shine
> some light.
>
> I'm trying to find out what EditPart/Figure is under the cursor at any
> moment.
>
> Using EditPartViewer.findObjectAt(<point>) gives me back the root edit
> part but not the specific edit part.
>
> I've tried using EditPartViewer.findObjectAtExcluding(Point position,
> Collection exclusionList, Conditional condition) in both the following
> ways to specify I don't want the root edit part:
>
> 1) Giving it a List containing the root edit part that I don't want.
> 2) Using the following Conditional
> new EditPartViewer.Conditional() {
> public boolean evaluate(EditPart part) {
> return part instanceof <type of part I want>;
> }
> }
>
> But both of them still give me back the root.
>
> Anyone got any ideas? I was thinking of locating the IFigure instead and
> working from there, but getLightWeightSystem() is a protected method in
> EditPartViewer so I can't access it.
>
> Regards,
> Kevin.
|
|
|
|
Powered by
FUDForum. Page generated in 0.07629 seconds