Using E4.2.2 I would like to have each editor view part track the explorer view part only while each particular editor is in focus(and store the tree state when the editor looses focus).

This is similar to the Edclise IDE when the package view is linked with editor view parts. Each editor 'knowing' which item in the package tree was selected for that editor view part.

One difference is that I have a CheckboxTreeViewer in the 'explorer' view part and will have one or many items selected in the tree, with each separate editor having widgets on screen relating to the treeviwer state at the time that particular editor instance was in focus.

Currently I have dynamic part descriptor which references an editor part and I can create multiple editor parts using a handler with the following code:

What I am struggling with is how to have each editor view part store or reference a snapshot of the explorer view parts tree state.

using:
@Inject
@Optional
private void getNotified(@UIEventTopic(TreeNodeEventConstants.TREE_DATAS_DATA_SELECTED) String s) is OK for updating all the instances of the editor view part, but I only want to update the part that is currently in focus.

As there is no @LostFocus in e4.2.2 I can't take a snapshot of the tree, and set a flag not to update the editor part when the tree view is modified while another instance of the editor part is being viewd.

Bit of a long winded explanation.., am I missing something? Does anyone know how to do this?

What about having a condition in your getNotified() method that checks whether this MPart (which you can have injected, for example as field or constructor argument) is "active", and if it isn't - returns immediately?

There are methods of MPart (isOnTop, isVisible) and EPartService (isPartVisible(MPart), getActivePart()), that may be of use to you (yeah I can't remember what they all do so you've got to check it yourself). As the last resort, you can check it through part stack:
mpart.getParent().getSelectedElement() == mpart ?

A little observation: when user clicks on tree viewer in your 'Explorer' part and changes the selection, doesn't he also change focus to the 'Explorer' part?
If so, tracking focus would be of no use anyway.

On L. Vogella's Eclipse Patform Servives tutorial, there is a reference to 'In its @PostConstruct method the implementation class can get the MPart injected and access its persisted state.' which sounds promising, just need to work out how exactly to do this.

You can inject "this" MPart instance either as field or method argument in your POJO class contribution (you probably know this already). Persisted state access is straightforward: MPart::getPersistedState().

To note:
Above I was using a 'magic number' in (MPart)stacks.get(2).getSelectedElement() above to get the relevant editor MPart to modify based on CheckboxTreeViewer selection.
The problem with this is the user can drag the editor MPart to any stack and the above would return the wrong MPart or null.
To fix this I will give each MPart a UID on creation ((ObjectType)part.getObject()).setId(UID) then and store the id in a 'editor MPart' placeholder in the eclipse context on each parts @Focus.

Another possible solution would be to prevent drag and drop of MParts outside their stack - I have seen somewhere a mention of global disable of dnd - does anyone know if it is possible to allow dnd within a Part Stack only?