Home » Eclipse Projects » Sirius » Format exception handling in property views
Format exception handling in property views [message #1848038] |
Thu, 18 November 2021 03:06 |
Denis Nikiforov Messages: 337 Registered: August 2013 |
Senior Member |
|
|
Hi
When I edit an attribute using legacy property editor I can see a format exception:

But when I edit the same attribute using EEF property editor, I can't see any exceptions:

I can see only an entry in the error log:
org.eclipse.sirius.common.tools.api.interpreter.EvaluationException: An error has appeared during the evaluation of an expression:
Expression: aql:input.emfEditServices(self).setValue(eStructuralFeature, newValue)
Diagnostic: Diagnostic ERROR source=org.eclipse.acceleo.query code=0 setValue(Object=EClassifier=EditSupport,Object=EClassifier=EStructuralFeature,Object=EClassifier=EJavaObject) with arguments [org.eclipse.sirius.properties.core.internal.EditSupportSpec@807dd28, org.eclipse.emf.ecore.impl.EAttributeImpl@6253e59a (name: lowerBound) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false), test] failed:
For input string: "test" data=[org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException: setValue(Object=EClassifier=EditSupport,Object=EClassifier=EStructuralFeature,Object=EClassifier=EJavaObject) with arguments [org.eclipse.sirius.properties.core.internal.EditSupportSpec@807dd28, org.eclipse.emf.ecore.impl.EAttributeImpl@6253e59a (name: lowerBound) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false), test] failed:
For input string: "test"]
Target URI Fragment: platform:/resource/...
Target: org.eclipse.emf.ecore.impl.EReferenceImpl@3462ae9f (name: quantityInput) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (containment: true, resolveProxies: true)
at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.evaluate(AQLSiriusInterpreter.java:203)
at org.eclipse.sirius.tools.internal.interpreter.SessionInterpreter.evaluate(SessionInterpreter.java:179)
at org.eclipse.sirius.common.tools.api.interpreter.IInterpreter.evaluateEObject(IInterpreter.java:180)
at org.eclipse.sirius.business.internal.logger.RuntimeLoggerInterpreterImpl.evaluateEObject(RuntimeLoggerInterpreterImpl.java:106)
at org.eclipse.sirius.business.internal.helper.task.operations.ChangeContextTask.execute(ChangeContextTask.java:60)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.executeTask(ExecuteToolOperationTask.java:119)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.executeTask(ExecuteToolOperationTask.java:126)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.executeTask(ExecuteToolOperationTask.java:126)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.execute(ExecuteToolOperationTask.java:108)
at org.eclipse.sirius.business.api.helper.task.TaskExecutor.execute(TaskExecutor.java:66)
at org.eclipse.sirius.tools.api.command.SiriusCommand.doExecute(SiriusCommand.java:82)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.sirius.properties.core.internal.SiriusToolServices.executeOperation(SiriusToolServices.java:72)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.acceleo.query.runtime.impl.JavaMethodService.internalInvoke(JavaMethodService.java:162)
at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208)
at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189)
at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109)
at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52)
at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.evaluateExpression(AQLSiriusInterpreter.java:218)
at org.eclipse.sirius.tools.internal.interpreter.SessionInterpreter.evaluateExpression(SessionInterpreter.java:161)
at org.eclipse.sirius.properties.core.api.SiriusInterpreter.evaluateExpression(SiriusInterpreter.java:65)
at org.eclipse.eef.core.api.utils.EvalFactory$Eval.call(EvalFactory.java:205)
at org.eclipse.eef.core.api.utils.EvalFactory$Eval.call(EvalFactory.java:182)
at org.eclipse.eef.core.internal.controllers.EEFTextController.lambda$0(EEFTextController.java:76)
at org.eclipse.sirius.ui.properties.internal.TransactionalEditingDomainContextAdapter$1.doExecute(TransactionalEditingDomainContextAdapter.java:120)
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.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.eclipse.sirius.ui.properties.internal.TransactionalEditingDomainContextAdapter.performModelChange(TransactionalEditingDomainContextAdapter.java:126)
at org.eclipse.eef.core.internal.controllers.EEFTextController.updateValue(EEFTextController.java:68)
at org.eclipse.eef.ide.ui.internal.widgets.EEFTextLifecycleManager.updateValue(EEFTextLifecycleManager.java:409)
at org.eclipse.eef.ide.ui.internal.widgets.EEFTextLifecycleManager.lambda$1(EEFTextLifecycleManager.java:264)
at org.eclipse.eef.common.ui.api.SWTUtils$2.focusLost(SWTUtils.java:71)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:147)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1042)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2941)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1799)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:5163)
at org.eclipse.swt.widgets.Canvas.WM_KILLFOCUS(Canvas.java:421)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4774)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4931)
at org.eclipse.swt.internal.win32.OS.PeekMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3625)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
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:154)
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:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
Caused by: org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException: setValue(Object=EClassifier=EditSupport,Object=EClassifier=EStructuralFeature,Object=EClassifier=EJavaObject) with arguments [org.eclipse.sirius.properties.core.internal.EditSupportSpec@807dd28, org.eclipse.emf.ecore.impl.EAttributeImpl@6253e59a (name: lowerBound) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false), test] failed:
For input string: "test"
at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:147)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172)
at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208)
at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189)
at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109)
at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52)
at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.evaluateExpression(AQLSiriusInterpreter.java:218)
at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.evaluate(AQLSiriusInterpreter.java:197)
... 83 more
Caused by: java.lang.NumberFormatException: For input string: "test"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.valueOf(Integer.java:983)
at org.eclipse.emf.ecore.impl.EcoreFactoryImpl.createEIntFromString(EcoreFactoryImpl.java:656)
at org.eclipse.emf.ecore.impl.EcoreFactoryImpl.createFromString(EcoreFactoryImpl.java:142)
at org.eclipse.emf.ecore.util.EcoreUtil.createFromString(EcoreUtil.java:3689)
at org.eclipse.sirius.properties.core.internal.EditSupportSpec.setValue(EditSupportSpec.java:253)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.acceleo.query.runtime.impl.EOperationService.eOperationJavaInvoke(EOperationService.java:246)
at org.eclipse.acceleo.query.runtime.impl.EOperationService.internalInvoke(EOperationService.java:199)
at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135)
... 94 more
Could you please improve it somehow? Is it possible to show a validation error?
|
|
|
Goto Forum:
Current Time: Sat Jun 03 12:30:11 GMT 2023
Powered by FUDForum. Page generated in 0.01709 seconds
|