Community
Participate
Working Groups
org.eclipse.emf.mwe.utils.Writer throws a NullPointerException if the model to be saved does not have a feature "name", i.e. if model.eClass().getEStructuralFeature("name") returns null. This problem can be solved in case of a single model/resource by adding a new attribute "modelName", which can then be configured in the workflow. In case of multiple models/resources, this does not work. But it may help if the feature name is configurable, e.g. String nameFeature = "name"; // default is ok public void setNameFeature(String i_nameFeature) { nameFeature = i_nameFeature; } protected String getName(final EObject model) { return (String) model.eGet(model.eClass().getEStructuralFeature(nameFeature)); } In this context it would be nice to change the visibility of createResourceName and getName to protected, in order to simplify subclassing of the writer class (why are these methods declared private, anyway). Related bugs (concerning Writer extension): https://bugs.eclipse.org/bugs/show_bug.cgi?id=290733 Writer: Make encoding and file extension user configureable options https://bugs.eclipse.org/bugs/show_bug.cgi?id=310077 EType reference of EReference serialization, relative paths do not resolve into absolute ones Jens