Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] ContextModel changes … try another day

I’ve updated the LegendView RFC page (http://udig.refractions.net/confluence/display/UDIG/Legend+View) to reflect our new sub-plan to for the items we got stuck with below.

 

Thanks,

Naz Chan

 

From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx [mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jody Garnett
Sent: Monday, 5 March 2012 3:32 AM
To: User-friendly Desktop Internet GIS
Subject: [udig-devel] ContextModel changes … try another day

 

I have placed the work on "upstream/legend" so it can be looked at another time.

 

This is a case of getting 90% of the way there and needing to back out in order to not get in the way of others.

 

What went well:

- The model changes went smoothly; git very was useful in keeping track of everything

- Tracking down references and events related to context model

- Using "containment" for the LegendItems (including Layers) so they get saved; while letting the layers list hold on to Layers by reference

 

What did not go well:

- The MapItemProvider (an Item provider which uses a child fetcher job to load things in the background rather than stall out the display thread). The code was a little bit magic in that it had been hacked up to delegate to the ContextModel (including events forwarding).

 

What got stuck:

- The Layers view makes use of the default MapItemProvider; which appears as if it would like to follow the "eStructure" heirarchy --> which we are trying to change over to storing things in the legend item list.

 

What to try for next time:

1. Start from the legend branch; in particular the model is much easier to follow now

2. Look into how the MapItemProvider works; and make a couple variations (one for layers list, one for legend items) prior to starting

3. Trace through the event handling around context model and make a checklist of what it is used for (so we can be sure of hitting those points again)

 

I will not be able to return to this work for the rest of the week due to some deadlines at work.

-- 

Jody Garnett

 

On Sunday, 4 March 2012 at 11:42 PM, Jody Garnett wrote:

I have just finished:

1) finding all references to the class ContextModel and replacing them

2) finding all references to map.getContextModel()

3) reviewing each mention of ProjectPackage.CONTEXT_MODEL

 

I should have something that can be tested shortly..

-- 

Jody Garnett

 

-- 

Jody Garnett

 

On Friday, 2 March 2012 at 2:50 PM, Jody Garnett wrote:

Productive day thus far …

 

 

1) Paul has review and accepted Naz's addition of a LegendView (he even ran find bugs etc… thanks Paul / Naz)

2) Paul has helped me updated the core EMF model here are the highlights …

- Map now directly has list of references to layers (with each layer having a back pointer to its map). This should be the zorder sorted layer list used for rendering and the replacement for the current context model.

- Map now contains a list of legend item

- I checked over the use of LegendItem (so that Folder and Layer reuse LegendItem fields of name, isShown and icon).

- Made sure Folder was containing a list of LegendItem

 

Summary:

- Map saves out legend items now

- We will try having Map keep a layers list (rather than context model) we will need some event listening code so that any layer added to the legend item list is sorted into the correct spot in the layers list. If this does not work (or is too complicated to maintain) we will use the Legend list directly.

- MapContext is still around -> used to load "old" maps for a bit; but should vanish after one release or so

-- 

Jody Garnett

 

 

 



The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

Back to the top