Community
Participate
Working Groups
1. Open any ecore model in the standard ecore model editor 2. Select an EClass 3. Click into "Instance Class Name" Now, an empty attribute will have been created. When you no run "Generate Model" on the whole model, there will be exceptions in the Error log: java.lang.IllegalArgumentException: Attempt to insert null sibling at org.eclipse.jdt.internal.core.jdom.DOMNode.insertSibling(DOMNode.java:668) at org.eclipse.emf.codegen.jmerge.JMerger.insertClone(JMerger.java:1052) at org.eclipse.emf.codegen.jmerge.JMerger.pushSourceMethod(JMerger.java:871) at org.eclipse.emf.codegen.jmerge.JMerger.pushSourceType(JMerger.java:837) at org.eclipse.emf.codegen.jmerge.JMerger.pushSourceCompilationUnit(JMerger.java:790) at org.eclipse.emf.codegen.jmerge.JMerger.merge(JMerger.java:91) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenBaseImpl.generate(GenBaseImpl.java:603) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenBaseImpl.generate(GenBaseImpl.java:547) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.generate(GenPackageImpl.java:2515) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.generate(GenModelImpl.java:1932) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenBaseImpl.generate(GenBaseImpl.java:350) at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelActionBarContributor$3.generate(GenModelActionBarContributor.java:167) at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelActionBarContributor$14.execute(GenModelActionBarContributor.java:295) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:100) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1733) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:112) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) plus the generated code will have ".class" in several places. Proposed fix: Treat the empty string in this field like null. "Default Value Literal" suffers from the same bug. Currently, the only workaround is to open the model in a text editor and to delete the attribute.
One of the many constraints we need to enforce is that the name should be a valid Java qualified name. There's a (well hidden) button on the properties view toolbar to restore the default value, i.e., to unset the feature back to null. *** This bug has been marked as a duplicate of 104727 ***
Created attachment 36091 [details] Patch to fix this bug and some related ones This patch fixes the errors we'll get when entering empty strings for named elements (attribute names, for example), instance class names and source property descriptors. This patch also fixes bug 104727.
Reopening bug after mail exchange with Ed Merks.
[contrib email="digulla@hepe.com"/] The changes (with very minor tweaks) have been committed to CVS.
Fixed in 2.2.0 I200603160000
*** Bug 132460 has been marked as a duplicate of this bug. ***
Move to verified as per bug 206558.