Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [CommonNavigator] Setting a IElementComparer
[CommonNavigator] Setting a IElementComparer [message #331607] Fri, 12 September 2008 16:01 Go to next message
Bernd Kolb is currently offline Bernd KolbFriend
Messages: 57
Registered: July 2009
Member
Hi!

Is there a way to set ElementComparer for the CNF?
my situation is the following:
An editor is setting an Gef-graphicalViewer as SelectionProvider. This
viewer is posting EditParts as selections.
The CN shows the modelElements stored in the editParts. In order to enable
the linking between the editor an the common navigator the equals/hashcode
method of the two objects has to be identical. However, for various
business reasons I cannot change the eq/hc methods. Thus my idea was to
set an IElementComparer. However this doesn't seem to be supported by the
CNF.

Any ideas?

Best regards,

Bernd
Re: [CommonNavigator] Setting a IElementComparer [message #331890 is a reply to message #331607] Fri, 26 September 2008 16:44 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
(sorry for the delay in the reply)

Can you not use a the link helper extension point?

http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/reference/extension-points/org_eclipse_ui_navigator_ linkHelper.html

Or am I missing the point?

Francis

Bernd Kolb wrote:
> Hi!
>
> Is there a way to set ElementComparer for the CNF?
> my situation is the following:
> An editor is setting an Gef-graphicalViewer as SelectionProvider. This
> viewer is posting EditParts as selections. The CN shows the
> modelElements stored in the editParts. In order to enable the linking
> between the editor an the common navigator the equals/hashcode method of
> the two objects has to be identical. However, for various business
> reasons I cannot change the eq/hc methods. Thus my idea was to set an
> IElementComparer. However this doesn't seem to be supported by the CNF.
> Any ideas?
>
> Best regards,
>
> Bernd
>


--
*new* Common Navigator Framework section in:
3.4RC4 Platform Plugin Developer Guide (Programmer's Guide)
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm
http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases


You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go


Previous Topic:propblems view - open on new problem
Next Topic:Showing perspective-defined wizards in custom navigator
Goto Forum:
  


Current Time: Mon Jul 22 05:11:45 GMT 2024

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

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

Back to the top