Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-3315

Transformation Editor (Dozer): deep nested variable mapping create two VariableMapper but only one is supported.

    Details

      Description

      Environment: Red Hat CodeReady Studio 12.13.0.GA

         <mapping>
              <class-a>ClassA</class-a>
              <class-b>ClassB</class-b>
              <field custom-converter-id="_variableMapping" custom-converter-param="${Ky}">
                  <a>literal</a>
                  <b>x.y.value</b>
              </field>
      

      Created another mapping as this one, that Dozer ignore:

         <mapping>
              <class-a>ClassA</class-a>
              <class-b>ClassB$X$Y$Z</class-b>
              <field custom-converter-id="_variableMapping" custom-converter-param="${Kz}">
                  <a>literal</a>
                  <b>value</b>
              </field>
      

      Instead, this one that works but broke the Transformation Editor with an NPE.

              <field custom-converter-id="_variableMapping" custom-converter-param="${Kz}">
                  <a>literal</a>
                  <b>x.y.z.value</b>
              </field>
      
      !ENTRY org.eclipse.jface 4 2 2020-02-13 15:02:30.077
      !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
      !STACK 0
      java.lang.NullPointerException
      	at org.jboss.tools.fuse.transformation.core.dozer.DozerMapperConfiguration.getMappingsForTarget(DozerMapperConfiguration.java:310)
      	at org.jboss.tools.fuse.transformation.editor.internal.util.TransformationManager.mapped(TransformationManager.java:104)
      	at org.jboss.tools.fuse.transformation.editor.internal.ModelViewer$LabelProvider.getImage(ModelViewer.java:445)
      	at org.jboss.tools.fuse.transformation.editor.internal.ModelViewer$LabelProvider.update(ModelViewer.java:487)
      	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:144)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:946)
      	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:121)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1024)
      	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:422)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
      	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2097)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:840)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:818)
      	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:604)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:766)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1586)
      	at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:780)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1571)
      	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1393)
      	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:363)
      	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1354)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1565)
      	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282)
      	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1627)
      	at org.jboss.tools.fuse.transformation.editor.internal.ModelViewer.<init>(ModelViewer.java:316)
      	at org.jboss.tools.fuse.transformation.editor.internal.ModelTabFolder.constructModelViewer(ModelTabFolder.java:62)
      	at org.jboss.tools.fuse.transformation.editor.internal.TargetTabFolder.constructModelViewer(TargetTabFolder.java:45)
      	at org.jboss.tools.fuse.transformation.editor.internal.ModelTabFolder.<init>(ModelTabFolder.java:53)
      	at org.jboss.tools.fuse.transformation.editor.internal.TargetTabFolder.<init>(TargetTabFolder.java:39)
      	at org.jboss.tools.fuse.transformation.editor.TransformationEditor.createPartControl(TransformationEditor.java:217)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:154)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:361)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:998)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:963)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:331)
      	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
      	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:1002)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:768)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:739)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:733)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:717)
      	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1293)
      	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.lambda$0(LazyStackRenderer.java:75)
      	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
      	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
      	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:146)
      	at org.eclipse.swt.widgets.Display.syncExec(Display.java:5728)
      	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
      	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
      	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
      	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
      	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
      	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
      	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
      	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
      	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
      	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
      	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
      	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
      	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
      	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
      	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
      	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:651)
      	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:615)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1236)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3205)
      	at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3110)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3108)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3078)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3061)
      	at org.jboss.tools.fuse.transformation.extensions.TransformationDblClickHandler.handleDoubleClick(TransformationDblClickHandler.java:125)
      	at org.fusesource.ide.camel.editor.features.custom.DoubleClickFeature.execute(DoubleClickFeature.java:85)
      	at org.eclipse.graphiti.features.custom.AbstractCustomFeature.execute(AbstractCustomFeature.java:77)
      	at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
      	at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
      	at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
      	at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
      	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
      	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
      	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
      	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:496)
      	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
      	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
      	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
      	at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
      	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.performRequest(ShapeEditPart.java:572)
      	at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:194)
      	at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:137)
      	at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:1069)
      	at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
      	at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:231)
      	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:291)
      	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:518)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:200)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5618)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1405)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4882)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4406)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
      	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rhn-support-agagliar Antonio Gagliardi
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: