- labels: --> JFireTrade
- milestone: --> none
DO NOT EDIT OR ANSWER THIS ISSUE. SEE THE ORIGINAL ISSUE INSTEAD:
https://www.jfire.org/modules/bugs/view.php?id=1813
ORIGINAL REPORTER: alex
Edit a cell in a price configuration. Enter a cell-reference, enter '+' in your formula and now again open the wizard to enter a new cell-reference.
------------------Script------------------------
cell.resolvePriceCellsAmount(
PriceFragmentTypeID.create("root.myorg.org","vat-de-19-net")
) +
------------------Script------------------------
An unnecessary error dialog appears showing the exception below. This should be changed, there is no need to show that error. I think the error is caused by the Cell-Editor itself as it checks the script on focus out, but in this case, not necessary.
Additional information:
ava.lang.RuntimeException: org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculationException: org.mozilla.javascript.EvaluatorException: Unexpected end of file (org.nightlabs.jfire.accounting.gridpriceconfig.AbsolutePriceCoordinate[hq.wobdemo.org/CustomerGroup-default,hq.wobdemo.org/1,EUR,hq.wobdemo.org/lg_42ld420_55,dev.jfire.org/_Total_]#4)
at org.nightlabs.jfire.trade.admin.ui.gridpriceconfig.PriceConfigGrid$5.propertyChange(PriceConfigGrid.java:647)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at org.nightlabs.jfire.trade.admin.ui.gridpriceconfig.PriceConfigGridCell.setFallbackFormula(PriceConfigGridCell.java:182)
at org.nightlabs.jfire.trade.admin.ui.gridpriceconfig.CellDetail$2.focusLost(CellDetail.java:229)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1125)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1106)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:3045)
at org.eclipse.swt.widgets.Control.gtk_event_after(Control.java:2453)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1481)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4234)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3973)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5593)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1192)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1487)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2969)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.nightlabs.jfire.trade.admin.ui.gridpriceconfig.wizard.cellreference.InsertCellReferenceAction.run(InsertCellReferenceAction.java:26)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2448)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2412)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2278)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.nightlabs.base.ui.app.AbstractApplication.start(AbstractApplication.java:347)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Caused by: org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculationException: org.mozilla.javascript.EvaluatorException: Unexpected end of file (org.nightlabs.jfire.accounting.gridpriceconfig.AbsolutePriceCoordinate[hq.wobdemo.org/CustomerGroup-default,hq.wobdemo.org/1,EUR,hq.wobdemo.org/lg_42ld420_55,dev.jfire.org/_Total_]#4)
at org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculator.calculatePriceCell(PriceCalculator.java:843)
at org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculator.calculatePriceCell(PriceCalculator.java:565)
at org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculator.calculatePrices(PriceCalculator.java:453)
at org.nightlabs.jfire.trade.admin.ui.gridpriceconfig.PriceConfigGrid$5.propertyChange(PriceConfigGrid.java:645)
... 51 more
Caused by: org.mozilla.javascript.EvaluatorException: Unexpected end of file (org.nightlabs.jfire.accounting.gridpriceconfig.AbsolutePriceCoordinate[hq.wobdemo.org/CustomerGroup-default,hq.wobdemo.org/1,EUR,hq.wobdemo.org/lg_42ld420_55,dev.jfire.org/_Total_]#4)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
at org.mozilla.javascript.Parser.addError(Parser.java:146)
at org.mozilla.javascript.Parser.reportError(Parser.java:160)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2465)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
at org.mozilla.javascript.Parser.addExpr(Parser.java:1730)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
at org.mozilla.javascript.Parser.expr(Parser.java:1523)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1202)
at org.mozilla.javascript.Parser.statement(Parser.java:707)
at org.mozilla.javascript.Parser.parse(Parser.java:401)
at org.mozilla.javascript.Parser.parse(Parser.java:338)
at org.mozilla.javascript.Context.compileImpl(Context.java:2368)
at org.mozilla.javascript.Context.compileString(Context.java:1359)
at org.mozilla.javascript.Context.compileString(Context.java:1348)
at org.mozilla.javascript.Context.evaluateString(Context.java:1101)
at org.nightlabs.jfire.accounting.gridpriceconfig.PriceCalculator.calculatePriceCell(PriceCalculator.java:796)
... 54 more