I am also trying to auto import some external content into EPF. This seems
to be a very common scenario which is as of yet not documented (or
designed for?).
I want to import a stack of html content as XMI.
I've just been checking the src code and checked out the RTE component,
which has a setText(..) method, which calls
// Call JTidy to format the source to XHTML.
newText = formatHTML(newText);
executeCommand(RichTextCommand.SET_TEXT, newText); which calls
notifyModifyListeners()
and inside
org.eclipse.autoring.ui.editors.MethodElementEditor
there is a
saveModifiedRichText(..) and a save(Resource resource)
...
if(canSave) {
ILibraryPersister.FailSafeMethodLibraryPersister persister =
getPersister();
persister.save(resource);
persister.commit();
...