Import method content from spreadsheet [message #50823] |
Sun, 08 June 2008 03:09  |
Eclipse User |
|
|
|
Originally posted by: damien.brignell.id.au
I'm trying to import approximately 270 term definitions into a method
library from a spreadsheet with 2 columns (term and definition). Is there
any way I can do this without doing a 'cut and paste' into EPF Composer
270+ times?
It looks like EPFC applies a unique xmi ID and GUI ID to each method
element. Short of writing some Java (which I'm not experienced at) is
there another way?
|
|
|
|
Re: Import method content from spreadsheet [message #51223 is a reply to message #50823] |
Thu, 19 June 2008 04:39  |
Eclipse User |
|
|
|
The getPersister() calls
LibraryServiceUtil.getCurrentPersister().getFailSafePersiste r();
Looking into org.eclipse.epf.library.LibraryServiceUtil;
there is a public void setGUID(MethodElement element) {
to set the GUID for method elements, part of the default persistence I
assume.
The
org.eclipse.epf.library.util.ResourceHelper also looks worth some interest
for ur case.
Maybe it is an idea to use the OAW framework for working directly with the
XMI files?
But it is a bit "cryptic" how the XHTML is stored inside the XMI in EPF.
I guess u could do a manual "copy-paste" and then see how the XMI files
change in various places and simulate this via some kind of scripting...
|
|
|
Re: Import method content from spreadsheet [message #589571 is a reply to message #50823] |
Thu, 19 June 2008 04:08  |
Eclipse User |
|
|
|
Hi,
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();
...
Looks interesting!
|
|
|
Re: Import method content from spreadsheet [message #589580 is a reply to message #50823] |
Thu, 19 June 2008 04:39  |
Eclipse User |
|
|
|
The getPersister() calls
LibraryServiceUtil.getCurrentPersister().getFailSafePersiste r();
Looking into org.eclipse.epf.library.LibraryServiceUtil;
there is a public void setGUID(MethodElement element) {
to set the GUID for method elements, part of the default persistence I
assume.
The
org.eclipse.epf.library.util.ResourceHelper also looks worth some interest
for ur case.
Maybe it is an idea to use the OAW framework for working directly with the
XMI files?
But it is a bit "cryptic" how the XHTML is stored inside the XMI in EPF.
I guess u could do a manual "copy-paste" and then see how the XMI files
change in various places and simulate this via some kind of scripting...
|
|
|
Powered by
FUDForum. Page generated in 0.03535 seconds