It's not possible to create valid cross references to non-existing targets in EMF.
I would suggest to go with EAttributes instead of EReferences:
- Change the feature=[EClass|ID] by feature=ID in {YourDSL} grammar.
- Provide a scope calculation utility like it's done in *scope_EClass_feature(context, reference)* method in the {YourDSL}ScopeProvider class. As this scoping methods simply use the eType of the given reference the reimplementation should be straightforward.
- Use this scope calculation utility in {YourDSL}ProposalProvider to propose values for the introduced EAttribute.
- Optionally you can use this utility in a validation rule to add a warning/info to this EAttribute if it's not "valid".
- Finally use the utility in your generator to create output based on valid target eObjects.