Skip to main content



      Home
Home » Modeling » EMF » Is there anyway to save model without eclipse platform dependency?
Is there anyway to save model without eclipse platform dependency? [message #418291] Thu, 10 April 2008 07:33 Go to next message
Eclipse UserFriend
AddressBookModelFactory factory =
AddressBookModelPackage.eINSTANCE.getAddressBookModelFactory ();

AddressBook book = factory.createAddressBook();

AddressBookModelAdapterFactory adapterFactory =
new AddressBookModelAdapterFactory();

Person p = factory.createPerson();
p.setName("이지율");
p.setEmail("softwitch@gmail.com");

book.getPeople().add(p);



In this situation, How can I store this model(book:AddressBook) ?
Re: Is there anyway to save model without eclipse platform dependency? [message #418292 is a reply to message #418291] Thu, 10 April 2008 08:04 Go to previous message
Eclipse UserFriend
Jiyul,

If you invoke "Generate Test Code" and look at AddressBookExample.java
in the *.tests project, you'll see how it loads and saves using
resources. You can use a "file:" URI (as created by URI.createFileURI)
to read and write directly to the file system.


Jiyul wrote:
> AddressBookModelFactory factory =
> AddressBookModelPackage.eINSTANCE.getAddressBookModelFactory ();
>
> AddressBook book = factory.createAddressBook();
>
> AddressBookModelAdapterFactory adapterFactory =
> new AddressBookModelAdapterFactory();
>
> Person p = factory.createPerson();
> p.setName("이지율");
> p.setEmail("softwitch@gmail.com");
>
> book.getPeople().add(p);
>
>
>
> In this situation, How can I store this model(book:AddressBook) ?
Previous Topic:Error Reporting
Next Topic:How to Drag a node from a tree view to EMF editor?
Goto Forum:
  


Current Time: Sun Jul 06 08:19:25 EDT 2025

Powered by FUDForum. Page generated in 0.44265 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top