Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Using TreeMapper of Nebula for data Mapping(Using TreeMapper of Nebula for data Mapping)
Using TreeMapper of Nebula for data Mapping [message #1000365] Mon, 14 January 2013 15:52 Go to next message
sadique sanjar is currently offline sadique sanjarFriend
Messages: 2
Registered: January 2013
Junior Member
I tried your example for this and found few issues:

1.This TreeMapper API says it is not intended to be subclassed by
client(Though this class is not final). This class plays main role as
its handles the DND , line drawing etc
functionality.

2. No way to remove the mapping once created between to data elements.

3. I am able to drop data element in its own tree(which is not correct).

4. I am able to drop data element on single pair multiple times and
this creates multiple mapping across the same two data elements.

As its already mentioned, this project is in Alpha stage so might
require changes.

If you could suggest some implementation to remove the above anomalies.
I know it can be resolved if I subclass this TreeMapper class.

Thanks
Re: Using TreeMapper of Nebula for data Mapping [message #1000393 is a reply to message #1000365] Mon, 14 January 2013 16:40 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,

On 01/14/2013 05:03 PM, sadique sanjar wrote:
> I tried your example for this and found few issues:
>
> 1.This TreeMapper API says it is not intended to be subclassed by
> client(Though this class is not final). This class plays main role as
> its handles the DND , line drawing etc
> functionality.

Why would you need to subclass it? Indeed they're not marked as final
because it's probably possible to subclass them, but there are some
methods that should not be overriden.
In any case, it was not designed to be subclassed, so maybe you should
find out some better ways to get it working as you want.

> 2. No way to remove the mapping once created between to data elements.

Removing a mapping directly from the TreeMapper is currently not
implemented. In the product which motivated the creation of this mapper,
selecting a link did open a "Details" view for the mapping and it was
possible to remove the mapping from here. We were happy with this and
did not get the idea of handling direct deletion.

We could think of adding a "suppressMapping" method to
ISemanticTreeMapperSupport and add the listeners to have it called on
DELETE or SUPPRESS key events. This method should be implemented by
clients in order to process validation, optionally confirmation of
deletion, and return true or false to tell the mapper whether the
deletion should occur or not.
This is a good idea of feature request, you should report it to the bug
tracker: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Nebula and
if you want this to happen soon, you should think about providing a
patch: http://wiki.eclipse.org/Nebula#Developer_resources .

> 3. I am able to drop data element in its own tree(which is not correct).

There are use-case where one would want to allow sorting inside trees by
drag'n'drop, so DND from inside a Tree is not forbidden.
However, can you please provide more details since DND inside a single
tree should not create a new mapping?
If this create a new mapping, you should report it to the bug tracker:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Nebula and if you
want this to happen soon, you should think about providing a patch:
http://wiki.eclipse.org/Nebula#Developer_resources .

> 4. I am able to drop data element on single pair multiple times and
> this creates multiple mapping across the same two data elements.

The tree has the necessary methods that you have to implement in your
listener to prevent this.
A TreeMapper is built using a ISemanticTreeMapperSupport, that you have
to implement. Your
ISemanticTreeMapperSupport.createSemanticMappingObject method
implementation has to make the necessary checks before creating a
mapping, and can return null if you don't want a mapping to be created.


> As its already mentioned, this project is in Alpha stage so might
> require changes.
> If you could suggest some implementation to remove the above anomalies.

I suggested here some better ways to use it, but you did spot some
limitations. Those limitations have to be turned into improvement
requests and then code. Unfortunately, I'm not working any longer on the
project that motivated the creation of the TreeMapper, so I won't be
very reactive on it (I'll try to do my best, but I've an infinite
TODO-list with things that are more important to me right now).
That's why I highly welcome you to report improvement requests and bugs
on https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Nebula . As
Nebula is an open-source project, you could suggest patches to get this
fixed.
Get started by getting the code here:
http://git.eclipse.org/c/nebula/org.eclipse.nebula.git and try to change
what you want to get it working better. When you think it's good enough
to be contributed, create a patch and put it on the bug tracker. I'd be
glad to review it and integrate it into Nebula code.
If you make huge improvements on this widget usability, we could think
of creating a new Nebula incubation maintenance release to make it more
widely usable to you and others.

> I know it can be resolved if I subclass this TreeMapper class.

Eclipse has the power of being EPL permissive license. I think it's
easier for you if you embed directly the plugin in your code, with some
modifications; and even better if you contribute back your improvements
to the project so everyone can benefit from your experience.

Cheers,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Using TreeMapper of Nebula for data Mapping [message #1000410 is a reply to message #1000393] Mon, 14 January 2013 17:32 Go to previous message
sadique sanjar is currently offline sadique sanjarFriend
Messages: 2
Registered: January 2013
Junior Member
Hi Mickael,

Thanks for your quick and valuable reply on it.
I got your point and would try to report in mentioned bug forum and create a patch for this to be used in this project.

Thank You.
Previous Topic:How to programmatically save a picture of a Gantt
Next Topic:[NatTable] fill columnwise?
Goto Forum:
  


Current Time: Thu Apr 25 19:05:09 GMT 2024

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

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

Back to the top