Opened 11 years ago
Last modified 10 years ago
#10211 new defect
Using ∈ and ⧉ in mappaint styles
Reported by: | plepe | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core mappaint | Version: | |
Keywords: | mapcss | Cc: |
Description (last modified by )
I'm trying to get ∈ and ⧉ to work for mappaint styles. Is it possible, that they are only available in TagChecker? (using version 7271)
I'm using the following style:
area[building] { fill-color: #7f0000; } node[addr:housenumber] ∈ area[building] { fill-color: #ff0000; }
I get a message window talking about a programming error and a stack trace on the console:
Fehler: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector. Ursache: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector. Ursache: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ConcurrentTasksHelper.process(StyledMapRenderer.java:1465) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:1501) at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:325) at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:536) at org.openstreetmap.josm.gui.MapView.paint(MapView.java:607) at javax.swing.JComponent.paintChildren(JComponent.java:878) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295) at javax.swing.RepaintManager.paint(RepaintManager.java:1249) at javax.swing.JComponent._paintImmediately(JComponent.java:5158) at javax.swing.JComponent.paintImmediately(JComponent.java:4969) at javax.swing.RepaintManager$3.run(RepaintManager.java:808) at javax.swing.RepaintManager$3.run(RepaintManager.java:796) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718) at javax.swing.RepaintManager.access$1100(RepaintManager.java:62) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ConcurrentTasksHelper.process(StyledMapRenderer.java:1462) ... 34 more Caused by: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at org.openstreetmap.josm.gui.mappaint.mapcss.Selector$ChildOrParentSelector.matches(Selector.java:279) at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.apply(MapCSSStyleSource.java:387) at org.openstreetmap.josm.gui.mappaint.ElemStyles.generateStyles(ElemStyles.java:328) at org.openstreetmap.josm.gui.mappaint.ElemStyles.getImpl(ElemStyles.java:172) at org.openstreetmap.josm.gui.mappaint.ElemStyles.getStyleCacheWithRange(ElemStyles.java:84) at org.openstreetmap.josm.gui.mappaint.ElemStyles.get(ElemStyles.java:67) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.add(StyledMapRenderer.java:1420) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.visit(StyledMapRenderer.java:1381) at org.openstreetmap.josm.data.osm.Way.accept(Way.java:214) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1353) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1318) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
Second test with the following style:
area[building] { fill-color: #7f0000; } area[building] ⧉ area[building] { fill-color: #ff0000; }
generates:
Fehler: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector. Ursache: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector. Ursache: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ConcurrentTasksHelper.process(StyledMapRenderer.java:1465) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:1501) at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:325) at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:536) at org.openstreetmap.josm.gui.MapView.paint(MapView.java:607) at javax.swing.JComponent.paintChildren(JComponent.java:878) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295) at javax.swing.RepaintManager.paint(RepaintManager.java:1249) at javax.swing.JComponent._paintImmediately(JComponent.java:5158) at javax.swing.JComponent.paintImmediately(JComponent.java:4969) at javax.swing.RepaintManager$3.run(RepaintManager.java:808) at javax.swing.RepaintManager$3.run(RepaintManager.java:796) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718) at javax.swing.RepaintManager.access$1100(RepaintManager.java:62) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219) at java.awt.Dialog.show(Dialog.java:1082) at java.awt.Component.show(Component.java:1651) at java.awt.Component.setVisible(Component.java:1603) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:484) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:281) at org.openstreetmap.josm.tools.BugReportExceptionHandler$BugReporterThread$1.run(BugReportExceptionHandler.java:80) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219) at java.awt.Dialog.show(Dialog.java:1082) at java.awt.Component.show(Component.java:1651) at java.awt.Component.setVisible(Component.java:1603) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:484) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:281) at org.openstreetmap.josm.tools.BugReportExceptionHandler$BugReporterThread$1.run(BugReportExceptionHandler.java:80) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ConcurrentTasksHelper.process(StyledMapRenderer.java:1462) ... 80 more Caused by: java.lang.ClassCastException: org.openstreetmap.josm.gui.mappaint.mapcss.Selector$OptimizedGeneralSelector cannot be cast to org.openstreetmap.josm.gui.mappaint.mapcss.Selector$GeneralSelector at org.openstreetmap.josm.gui.mappaint.mapcss.Selector$ChildOrParentSelector.matches(Selector.java:314) at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.apply(MapCSSStyleSource.java:387) at org.openstreetmap.josm.gui.mappaint.ElemStyles.generateStyles(ElemStyles.java:328) at org.openstreetmap.josm.gui.mappaint.ElemStyles.getImpl(ElemStyles.java:172) at org.openstreetmap.josm.gui.mappaint.ElemStyles.getStyleCacheWithRange(ElemStyles.java:84) at org.openstreetmap.josm.gui.mappaint.ElemStyles.get(ElemStyles.java:67) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.add(StyledMapRenderer.java:1420) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.visit(StyledMapRenderer.java:1381) at org.openstreetmap.josm.data.osm.Way.accept(Way.java:214) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1353) at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1318) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
Attachments (0)
Change History (4)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Due to some caching (?), the style isn't updated after the outer building or inner address (cf. the first example) is moved …
comment:4 by , 10 years ago
Description: | modified (diff) |
---|---|
Keywords: | mapcss added |
In 7285/josm: