Hello,

I've create a mini app based on the MapView(er) and the LayersView. It's basically the MapView tutorial without all the Email Application stuff, plus a layer view (and a few icons).

The layer view listens well to map events, and as I add layers, the layer view reacts accordingly. (Needed to let my SimleMapView implement public Object getAdapter( Class adaptee ) for that.)

however, when I close the app, I get a

java.lang.ClassCastException: de.fraunhofer.iais.kd.mapviewer.SimpleMapView cannot be cast to org.eclipse.ui.part.EditorPart at net.refractions.udig.project.ui.internal.LayersView$MapEditorListener.partClosed(LayersView.java:344) at org.eclipse.ui.internal.PartListenerList$3.run(PartListenerList.java:102)

basically because the class hierachy has changed (due to refactoring in MapEditor et al.), so the following is not valid (LayersView, line 343
):

 if (part.getSite().getPage().getEditorReferences().length == 0)
                removeApplicabilityMenu((EditorPart) part);

So,
if (part.getSite().getPage().getEditorReferences().length == 0 && part instanceof EditorPart)
                removeApplicabilityMenu((EditorPart) part);

is a possible fix.

Cheers,

Ugo

--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to