TransactionalEditingDomain domain = null;
boolean createContent = PreferencesUtil
.getBooleanPreference(Preferences.EDITOR_ADD_DEFAULT_CONTENT_TO_DIAGRAMS);
final ActivitiDiagramEditor diagramEditor
= (ActivitiDiagramEditor) getFeatureProvider().getDiagramTypeProvider().getDiagramEditor();
if (createContent) {
final InputStream contentStream = Util.getContentStream(Util.Content.NEW_SUBPROCESS_CONTENT);
InputStream replacedStream = Util.swapStreamContents(subprocessName, contentStream);