Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: UDIG 1.2.2
-
Fix Version/s: UDIG 1.4.1
-
Component/s: framework
-
Labels:None
Description
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.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | uDig 1.3.0 [ 17860 ] | |
| Fix Version/s | UDIG 1.2.3 [ 17485 ] |
| Fix Version/s | UDIG 1.2.3 [ 17485 ] | |
| Fix Version/s | uDig 1.3.0 [ 17860 ] |
| Fix Version/s | UDIG 1.3.1 [ 18149 ] | |
| Fix Version/s | UDIG 1.3.0 [ 17485 ] |
| Fix Version/s | UDIG 1.3.2 [ 18235 ] | |
| Fix Version/s | UDIG 1.3.1 [ 18149 ] |
| Fix Version/s | UDIG 1.3.3 [ 18773 ] | |
| Fix Version/s | UDIG 1.3.2 [ 18235 ] |
| Fix Version/s | UDIG 1.4.1 [ 19165 ] | |
| Fix Version/s | UDIG 1.4.0 [ 18773 ] |
| Description |
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. |
Cannot use ApplicationGIS.copyMap(ApplicationGIS.getActiveMap()) to create map copy for MapViewer:
{panel} 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) {panel} 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. |