Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:33 Go to next message
Jiyul is currently offline JiyulFriend
Messages: 23
Registered: July 2009
Junior Member
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 12:04 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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) ?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Error Reporting
Next Topic:How to Drag a node from a tree view to EMF editor?
Goto Forum:
  


Current Time: Wed Apr 24 23:54:20 GMT 2024

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

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

Back to the top