If I add a converter to a bound field (or table-column), i get:
ASTEditor string replacement problem
ASTEditor (internal class for source/ASTNode's manipulations) found a problem while replacing a substring in the compilation unit source code. This problem can be caused by prior problems in AST manipulations. Please contact support and provide a test case and log file.
Show stack trace.
Hide stack trace.
Stack trace:
com.instantiations.designer.core.utils.exception.DesignerException: 201 (ASTEditor string replacement problem).
at com.instantiations.designer.core.utils.ast.ASTEditor$4.postVisit(ASTEditor.java:666)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at com.instantiations.designer.core.utils.ast.ASTEditor.replaceSubstring(ASTEditor.java:698)
at com.instantiations.designer.core.utils.ast.ASTEditor.replaceSubstring(ASTEditor.java:633)
at com.instantiations.designer.core.utils.ast.ASTEditor$14.endVisit(ASTEditor.java:2402)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:173)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.SimpleType.accept0(SimpleType.java:137)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
at org.eclipse.jdt.core.dom.ParameterizedType.accept0(ParameterizedType.java:175)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:272)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:502)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at com.instantiations.designer.core.utils.ast.ASTEditor.resolveImports(ASTEditor.java:2391)
at com.instantiations.designer.core.utils.ast.ASTEditor.addBodyDeclaration(ASTEditor.java:2005)
at com.instantiations.designer.core.utils.ast.ASTEditor.addMethodDeclaration(ASTEditor.java:1724)
at com.instantiations.designer.core.utils.ast.ASTEditor.addMethodDeclaration(ASTEditor.java:1692)
at com.instantiations.designer.swing.databinding.model.DataBindingsRootInfo.commit(DataBindingsRootInfo.java:451)
at com.instantiations.designer.swing.databinding.DatabindingsProvider$5.run(DatabindingsProvider.java:449)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:229)
at com.instantiations.designer.swing.databinding.DatabindingsProvider.saveEdit(DatabindingsProvider.java:447)
at com.instantiations.designer.swing.databinding.DatabindingsProvider.editBinding(DatabindingsProvider.java:418)
at com.instantiations.designer.core.databinding.ui.property.AbstractBindingProperty.editBinding(AbstractBindingProperty.java:60)
at com.instantiations.designer.core.databinding.ui.property.AbstractBindingProperty.editBinding(AbstractBindingProperty.java:49)
at com.instantiations.designer.swing.databinding.ui.property.JTableSelfObserveProperty.createBinding(JTableSelfObserveProperty.java:33)
at com.instantiations.designer.core.databinding.ui.property.ObservePropertyEditor.openDialog(ObservePropertyEditor.java:84)
at com.instantiations.designer.core.model.property.editor.TextDialogPropertyEditor$1.onClick(TextDialogPropertyEditor.java:25)
at com.instantiations.designer.core.model.property.editor.presentation.ButtonPropertyEditorPresentation$3$1.run(ButtonPropertyEditorPresentation.java:92)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.runLog(ExecutionUtils.java:52)
at com.instantiations.designer.core.model.property.editor.presentation.ButtonPropertyEditorPresentation$3.handleEvent(ButtonPropertyEditorPresentation.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Full context stack trace:
com.instantiations.designer.core.utils.exception.DesignerException: 0 (Wrapper).
at com.instantiations.designer.core.utils.ast.ASTEditor$14.endVisit(ASTEditor.java:2413)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:173)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.SimpleType.accept0(SimpleType.java:137)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
at org.eclipse.jdt.core.dom.ParameterizedType.accept0(ParameterizedType.java:175)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:272)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:502)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
at com.instantiations.designer.core.utils.ast.ASTEditor.resolveImports(ASTEditor.java:2391)
at com.instantiations.designer.core.utils.ast.ASTEditor.addBodyDeclaration(ASTEditor.java:2005)
at com.instantiations.designer.core.utils.ast.ASTEditor.addMethodDeclaration(ASTEditor.java:1724)
at com.instantiations.designer.core.utils.ast.ASTEditor.addMethodDeclaration(ASTEditor.java:1692)
at com.instantiations.designer.swing.databinding.model.DataBindingsRootInfo.commit(DataBindingsRootInfo.java:451)
at com.instantiations.designer.swing.databinding.DatabindingsProvider$5.run(DatabindingsProvider.java:449)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:229)
at com.instantiations.designer.swing.databinding.DatabindingsProvider.saveEdit(DatabindingsProvider.java:447)
at com.instantiations.designer.swing.databinding.DatabindingsProvider.editBinding(DatabindingsProvider.java:418)
at com.instantiations.designer.core.databinding.ui.property.AbstractBindingProperty.editBinding(AbstractBindingProperty.java:60)
at com.instantiations.designer.core.databinding.ui.property.AbstractBindingProperty.editBinding(AbstractBindingProperty.java:49)
at com.instantiations.designer.swing.databinding.ui.property.JTableSelfObserveProperty.createBinding(JTableSelfObserveProperty.java:33)
at com.instantiations.designer.core.databinding.ui.property.ObservePropertyEditor.openDialog(ObservePropertyEditor.java:84)
at com.instantiations.designer.core.model.property.editor.TextDialogPropertyEditor$1.onClick(TextDialogPropertyEditor.java:25)
at com.instantiations.designer.core.model.property.editor.presentation.ButtonPropertyEditorPresentation$3$1.run(ButtonPropertyEditorPresentation.java:92)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.runLog(ExecutionUtils.java:52)
at com.instantiations.designer.core.model.property.editor.presentation.ButtonPropertyEditorPresentation$3.handleEvent(ButtonPropertyEditorPresentation.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: com.instantiations.designer.core.utils.exception.DesignerException: 201 (ASTEditor string replacement problem).
at com.instantiations.designer.core.utils.ast.ASTEditor$4.postVisit(ASTEditor.java:666)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at com.instantiations.designer.core.utils.ast.ASTEditor.replaceSubstring(ASTEditor.java:698)
at com.instantiations.designer.core.utils.ast.ASTEditor.replaceSubstring(ASTEditor.java:633)
at com.instantiations.designer.core.utils.ast.ASTEditor$14.endVisit(ASTEditor.java:2402)
... 58 more
Adding the converter in the source manually will work fine, but parsing isnt possible:
- BeanProperty<JTable, Long> jTableBeanProperty_25 = BeanProperty.create("selectedElement.verkaufsdatum.timeInMillis");
ELProperty<JTextField, Object> jTextFieldEvalutionProperty_24 = ELProperty.create("${text}");
AutoBinding<JTable, Long, JTextField, Object> autoBinding_24 = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, jt_losteileigenschaften_losverkaeufe_allgemein, jTableBeanProperty_25, jtf_verkaeufe_verkaufsdatum, jTextFieldEvalutionProperty_24);
autoBinding_24.setConverter(nklTimeInMillisToFormatedDateConverter);
autoBinding_24.bind();
or:
- ELProperty<LosteilPersonZuord, Object> losteilPersonZuordEvalutionProperty_1 = ELProperty.create("${gueltigBis.timeInMillis}");
jTableBinding_2.addColumnBinding(losteilPersonZuordEvalutionProperty_1).setColumnName("g\u00FCeltig bis").setEditable(false).setConverter(nklTimeInMillisToFormatedDateConverter);
Please, I *am* not allowed to give testcases outside, and they would be TO complicate, too.
Could you help although?
Many thanks,
Sandy