Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF3D » SphereShapes HashCode implementation too general for MultiEditors
SphereShapes HashCode implementation too general for MultiEditors [message #708151] Tue, 02 August 2011 14:09 Go to next message
fabisiew is currently offline fabisiew
Messages: 19
Registered: July 2009
Junior Member
Hi all,

I have a 3D-editor which displays SphereFigureShapes. These Shapes gets their color from a value stored in the editors input file.

That editor can be nested in an Multi3DEditor, where all the SphereShapes from the 3DEditors are shown. So they should have a different color, depending on the input-file of the particular 3DEditor.

The problem is, that every Shape has the same color. This is caused by the way the HashCode method is implemented in the org.eclipse.draw3d.shapes.SphereShape.class:

The SphereKey depends on the parameters precision and outline. Which are the same for every editor in my case.

public SphereKey(int i_precision, boolean i_outline)

Can you imagine a better implementation of the hashCode method above in order to solve my problem?

Is this something I should add to the gef3D issue tracker?

Regards
Kamil

[Updated on: Tue, 02 August 2011 14:29]

Report message to a moderator

Re: SphereShapes in MultiEditor [message #726681 is a reply to message #708151] Mon, 19 September 2011 09:11 Go to previous message
Jens von Pilgrim is currently offline Jens von Pilgrim
Messages: 294
Registered: July 2009
Senior Member
Dear Kamil,

this seems to be a bug, so opening a new bug for that would be a good
idea. Actually, I have to check all these hashCode/equals methods, as
they might not behave according to the JDK specification.

At the moment, we are in the process of moving GEF3D to git. Once this
is done, I will try to find a solution.

Cheers,
Jens
Previous Topic:Multi Editor 3D does not open multiple models
Next Topic:How to use SphereFigureShape
Goto Forum:
  


Current Time: Mon Sep 22 14:19:24 GMT 2014

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

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