Cannot copy a prototype attribute that has Docs content in the attribute's Properties
-------------------------------------------------------------------------------------
Key: WOL-1151
URL: http://issues.objectstyle.org/jira/browse/WOL-1151
Project: WOProject/WOLips
Issue Type: Bug
Components: WOLips General
Affects Versions: WOLips 3.5.x
Environment: wolips 3.5.6031
Reporter: Kieran Kelleher
Attachments: screenshot-1.jpg
java.lang.RuntimeException: Failed to clone [EOModelMap: backingMap = {documentation=00 thru 99}].
at com.uwyn.rife.tools.ObjectUtils.genericClone(ObjectUtils.java:86)
at com.uwyn.rife.tools.ObjectUtils.deepClone(ObjectUtils.java:189)
at com.uwyn.rife.tools.ObjectUtils.deepClone(ObjectUtils.java:197)
at org.objectstyle.wolips.eomodeler.core.model.UserInfoableEOModelObject._cloneUserInfoInto(UserInfoableEOModelObject.java:104)
at org.objectstyle.wolips.eomodeler.core.model.AbstractEOArgument._cloneArgument(AbstractEOArgument.java:151)
at org.objectstyle.wolips.eomodeler.core.model.EOAttribute._cloneModelObject(EOAttribute.java:1103)
at org.objectstyle.wolips.eomodeler.core.model.EOAttribute._cloneModelObject(EOAttribute.java:68)
at org.objectstyle.wolips.eomodeler.actions.CopyAction.run(CopyAction.java:94)
at org.objectstyle.wolips.eomodeler.actions.CopyAction.runWithEvent(CopyAction.java:108)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:770)
at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:756)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:746)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1598)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1622)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1607)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1396)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3484)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
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:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.NoSuchMethodException: org.objectstyle.wolips.eomodeler.core.model.EOModelMap.clone()
at java.lang.Class.getMethod(Class.java:1605)
at com.uwyn.rife.tools.ObjectUtils.genericClone(ObjectUtils.java:81)
... 43 more
WORKAROUND:
Simply removing the Docs content does not work since the userInfo dict still remains. So to allow copying the prototype attribute,
open the plist, find the prototype attribute and delete the userInfo documentation key:
Before: (cannot be copied to clipboard)
{
allowsNull = Y;
columnName = deliverypointcode;
externalType = "SMALLINT UNSIGNED";
name = deliveryPointCode;
userInfo = {"_EntityModeler" = {documentation = ""; }; };
valueClassName = NSNumber;
valueType = i;
},
After: (can be copied)
{
allowsNull = Y;
columnName = deliverypointcode;
externalType = "SMALLINT UNSIGNED";
name = deliveryPointCode;
valueClassName = NSNumber;
valueType = i;
},
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Tue Mar 02 2010 - 11:26:08 EST