Good evening - a quick updated from the trenches (well from Jody and Paul
... Naz did a runner).

Progress so far:
a) We have gotten Naz's pull request in
b) We have updated the model a few times as we sorted things out.

- Map now directly contains a list of layers (this is hooked up to the
traditional Map.getLayersInternal() method so a lot of code is continuing
to run- yay)
- The map layers list is bi-directional - that is we have a reverse
relationship from Layer to Map that EMF is enforcing for us.
- ContextModel is still around but not hooked up to anything anymore.
- Map has a legend - List<LegendItem> which is used for storage; we made
sure that the containment relationship betwen Map --> LegendItem and Folder
---> LegendItem was correct so we are confident everything will be saved
out. We were also able to walk up the containment pointers and find out
what Map any given LegendItem is in.

c) We were able to reuse Jesse's origional LayerList2 implementation; and
made a copy LayerList3 that we experimented with for a uni-directional
relationship - we will probably kill this as it was not used.

We also tightened up the base classes to use Generics - now that EMF EList
classes support that.

d) We quickly tried custom list implementations of Map.getLayers() and
Map.getLengend() so that adding a layer to one list will add it to the
other. This quick implementation breaks down the moment you try folders -
but it is a start.   We are considering using listeners (EMF speak is deep
adaptor) on Map.getLegend() so we can detect if a layer is added anywhere
(ie even to sub folders etc...).


RESULTS:

- You can run uDig again - and something will draw (surprise!)

THINGS TO DO (Help?)

1) We need to migrate any code that is listening to the Context Model in
order to be notified of layer list changes

2) Sort out keeping the Map.getLayers() and Map.getLegend() in sync; fall
back position is to generate the list from the legend items each time
something changes - and perform a diff for any changes.

3) When loading a map we would like to detect if something has been added
to the "old" context model; and copy the results out for the rendering
engine to see again

That should be it; Jody will send email when things have settled down - and
we could really use a hand testing such an extensive change....

Thanks,
Paul / Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to