Inconsistent getMap() method in LayerList2 class.
-------------------------------------------------
Key: UDIG-1781
URL: https://jira.codehaus.org/browse/UDIG-1781
Project: uDIG
Issue Type: Bug
Components: framework
Affects Versions: UDIG 1.2.2
Reporter: Siarhei Khamenka
Assignee: Jody Garnett
Fix For: UDIG 1.2.3
Cannot use ApplicationGIS.copyMap(ApplicationGIS.getActiveMap()) to create map
copy for MapViewer:
java.lang.IllegalStateException: Owner should be IMap or ContextModel
at
net.refractions.udig.project.internal.impl.LayersList2.getMap(LayersList2.java:127)
at
net.refractions.udig.project.internal.impl.LayersList2.assign(LayersList2.java:114)
at
org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:514)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:506)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:478)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:406)
at
org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:374)
at
org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:568)
at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:488)
at
org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:574)
at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:488)
at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:360)
at
net.refractions.udig.project.ui.ApplicationGIS.copyMap(ApplicationGIS.java:1007)
In debugger owner of LayersList2 is ContextModelImpl (implementation of
ContextModel), but i got exception, that it is not. In getMethod() check is
made only for IMap type, so ContextModel can't be passed as valid parameter.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel