Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-3040 Finish the support for Camel Rest DSL
  3. FUSETOOLS-3051

Add ID validation to Add Rest Operation wizard to avoid ID collision

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Major
    • 11.1.0.AM2
    • 11.1.0
    • Camel Editor
    • None

    Description

      During testing of FUSETOOLS-3030, Aurelien noted:

      • it would be nice to add a validation on ID so that 2 elements with same ID cannot be created (in another PR?)
      • I hit this exception when the id used already exists (so either avoid this error or provide the validation in this PR)
      !ENTRY org.fusesource.ide.camel.editor 4 0 2018-07-24 15:43:28.708 !MESSAGE org.fusesource.ide.camel.model.service.core.model.CamelContextElement cannot be cast to org.fusesource.ide.camel.model.service.core.model.RestElement !STACK 0 java.lang.ClassCastException: org.fusesource.ide.camel.model.service.core.model.CamelContextElement cannot be cast to org.fusesource.ide.camel.model.service.core.model.RestElement at org.fusesource.ide.camel.editor.restconfiguration.RestConfigEditor.selectRestVerbElement(RestConfigEditor.java:681) at org.fusesource.ide.camel.editor.restconfiguration.RestConfigEditor.createRestOperation(RestConfigEditor.java:837) at org.fusesource.ide.camel.editor.restconfiguration.wizards.AddRestOperationWizard$1.run(AddRestOperationWizard.java:70) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:974) at org.fusesource.ide.camel.editor.restconfiguration.wizards.AddRestOperationWizard.performFinish(AddRestOperationWizard.java:65) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:772) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:411) at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619) at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4118) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3931) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3534) at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) at org.eclipse.jface.window.Window.open(Window.java:794) at org.fusesource.ide.camel.editor.restconfiguration.RestConfigEditor.lambda$6(RestConfigEditor.java:817) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4567) at org.fusesource.ide.camel.editor.restconfiguration.RestConfigEditor.addRestOperation(RestConfigEditor.java:812) at org.fusesource.ide.camel.editor.restconfiguration.actions.AddRestOperationAction.run(AddRestOperationAction.java:34) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4118) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3931) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3534) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) 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:656) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592) at org.eclipse.equinox.launcher.Main.run(Main.java:1498) at org.eclipse.equinox.launcher.Main.main(Main.java:1471
      

      Attachments

        Activity

          People

            bfitzpat_rh Brian Fitzpatrick (Inactive)
            bfitzpat_rh Brian Fitzpatrick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: