Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Where to persist a model's graphical information?
Where to persist a model's graphical information? [message #226616] Sun, 19 November 2006 21:03 Go to next message
Steinar Bang is currently offline Steinar BangFriend
Messages: 108
Registered: July 2009
Senior Member
We have a node and edge model that we would like to represent in a GEF
editor. The model has an XML serialization format. The nodes in this
model has a name, that is unique for each graph.

What I would like to know, which is the recommended way to persist the
graphical information for a GEF model displaying one of our graphs?

I can see the following ways of doing it:

1. not persist the graphical information. Just autolayout the graph
each time it is loaded

2. "pollute" the graph model with the graphical information (minimum
the x,y origin of the symbol representing each node)

3. create a wrapper model consisting of view objects that wraps each
node and edge and adds properties for the graphical information,
and that is saved and stored by the Serializable mechanism

4. similar to 3. but instead using an XML format for cross-VM
portability of the files (is it possible to use GMF/EMF for such a
wrapper model? Is it convenient?)

5. create a brand new modelling application using GMF, and create an
export/import functionality for the existing graph XML format

Are there simpler alternatives that I have overlooked? Are there in
other ways better alternatives that I haven't discovered?

Thanx!


- Steinar
Are GEF connection points normally persisted (Was: Where to persist a model's graphical information? [message #226623 is a reply to message #226616] Sun, 19 November 2006 21:06 Go to previous messageGo to next message
Steinar Bang is currently offline Steinar BangFriend
Messages: 108
Registered: July 2009
Senior Member
Are the multiline points of a GEF model connection normally persisted?
Or is the normal procedure to just persist the endpoints, and
autolayut the edges' multilines when a GEF model is restored?

Thanx!


- Steinar
Re: Where to persist a model's graphical information? [message #226645 is a reply to message #226616] Mon, 20 November 2006 11:59 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
On Sun, 19 Nov 2006 22:03:49 +0100, Steinar Bang <sb@dod.no> wrote:

>I can see the following ways of doing it:
>
> 1. not persist the graphical information. Just autolayout the graph
> each time it is loaded

You typically need to persist it if the user needs/wants to edit it.
This also holds for multiline edges (which you asked in another
message). I.e. if the layout algorithm is less than "perfect", you
should persist. Another reason is that it will be easier to import by
other tools, that do not share the layout algorithm.

> 4. similar to 3. but instead using an XML format for cross-VM
> portability of the files (is it possible to use GMF/EMF for such a
> wrapper model? Is it convenient?)

I did 4 by making my own semantic+graphical model pair. Then I moved
to GMF/EMF (GMF wasn't available when I started), which essentially
lets you combine your own semantic model with their graphical one, and
lets you store them in one file or split in two (which I prefer).

> 5. create a brand new modelling application using GMF, and create an
> export/import functionality for the existing graph XML format

I would recommend this approach.

>Are there simpler alternatives that I have overlooked? Are there in
>other ways better alternatives that I haven't discovered?

What does simpler mean? My application is more complex after moving to
GMF, but the part that I'm responsible for is smaller and I can focus
on adding value to GMF, rather than writing lots of code handling
graphical stuff that others do better than me.

Hallvard
Re: Where to persist a model's graphical information? [message #226651 is a reply to message #226645] Mon, 20 November 2006 14:30 Go to previous messageGo to next message
Steinar Bang is currently offline Steinar BangFriend
Messages: 108
Registered: July 2009
Senior Member
>>>>> Hallvard Trætteberg <hal@idi.ntnu.no>:

> On Sun, 19 Nov 2006 22:03:49 +0100, Steinar Bang <sb@dod.no> wrote:
>> I can see the following ways of doing it:

>> 1. not persist the graphical information. Just autolayout the graph
>> each time it is loaded

> You typically need to persist it if the user needs/wants to edit it.
> This also holds for multiline edges (which you asked in another
> message). I.e. if the layout algorithm is less than "perfect", you
> should persist. Another reason is that it will be easier to import
> by other tools, that do not share the layout algorithm.

I agree. I just wanted to put it up as an alternative.

(One reason you didn't mention is that people often put a lot of
effort into making a diagram looking exactly _so_, and are very
annoyed if this work has disappeared the next time the diagram is
opened)

[snip!]
>> Are there simpler alternatives that I have overlooked? Are there
>> in other ways better alternatives that I haven't discovered?

> What does simpler mean?

In this context I meant: with as little coding as possible.

Which votes in favour of GMF I guess...?

Thanx!


- Steinar
Re: Where to persist a model's graphical information? [message #226658 is a reply to message #226645] Mon, 20 November 2006 14:45 Go to previous messageGo to next message
Steinar Bang is currently offline Steinar BangFriend
Messages: 108
Registered: July 2009
Senior Member
>>>>> Hallvard Trætteberg <hal@idi.ntnu.no>:

> On Sun, 19 Nov 2006 22:03:49 +0100, Steinar Bang <sb@dod.no> wrote:

>> 4. similar to 3. but instead using an XML format for cross-VM
>> portability of the files (is it possible to use GMF/EMF for such a
>> wrapper model? Is it convenient?)

> I did 4 by making my own semantic+graphical model pair. Then I moved
> to GMF/EMF (GMF wasn't available when I started), which essentially
> lets you combine your own semantic model with their graphical one,
> and lets you store them in one file or split in two (which I
> prefer).

Hm... GMF/EMF _does_ let you combine your own semantic model, with a
graphical model defined in GMF/EMF if I understand you correctly...?

I guess I have to study the GMF tutorials more closely.

Thanx for the info, btw!


- Steinar
Re: Where to persist a model's graphical information? [message #227424 is a reply to message #226616] Tue, 05 December 2006 08:51 Go to previous message
Eclipse UserFriend
Originally posted by: lms15_84.yahoo.com

MAKE MONEY QUICK!
At 5:08 AM on Jan 30, 2004, Unregistered Guest wrote:
Greetings: I am a retired attorney. A few years ago a man came to me with a letter. He asked me to verify the fact that this was legal to do. I told him I would review it and get back to him. When I first read the letter my client brought me, I thought it was some “off-the-wall” idea to make money. A week and a half later we met in my office to discuss the issue. I told him the letter he originally brought me was not 100% legal. My client then asked me to alter it to make it perfectly legal. I asked him to make one small change in the letter. I was still curious about the letter, so he explained to me how it works. I thought it seemed like a long shot, so I decided against participating. But before my client left, I asked him to keep me updated on his results. About two months later, he called me to tell me he had received over $800,000 in cash. I didn’t believe him, so he asked me to try this idea and find out for myself. I thought about it for a couple of days and decided I really didn’t have anything to lose, so I asked him for a copy of the letters. I followed the instructions exactly, mailed 200 copies, and sure enough, the money started coming in! It arrived slowly at first, but coming. I kept a precise record of the earnings, and in the end, it totaled $978,493! I could hardly believe it. I met with my friend for lunch to find out exactly how it worked. He told me there are quite a few similar letters around, but this one is different because there are six names at the end of the letter, not five like some others. This fact alone results in your name being in far more returns. The other fact was the help I gave him, making sure the whole thing was legal, since no one wants to take the risk of doing something illegal. By now you are surely curious to know what small changes to make. If you sent a letter like this one out, in order to be completely legal, you must actually sell something in order to receive a dollar in return. So when you send a dollar to each of the names on the list, you must include these words, “PLEASE PUT ME ON YOUR MAILING LIST” and include your name and address. This is the key to the program. The item you will receive for the dollar you sent to the six people below is the letter. At the time I first tried this idea, I was earning a good living as a lawyer. But everyone in the legal profession will tell you there is a lot of stress that comes with the job. I told myself if things worked out, I would retired from my practice and play golf. I decided to try the letter again, but this time I sent 500 copies. Three months later , I had totaled $2,341,178! Here are a few reasons a person might give for not trying this program: Ø Some people think they can never make a lot of money with anything this simple. Ø Some are afraid they will be ridiculed for trying Ø Some dream of large sums of money, but do nothing to actually achieve it. Ø Some are just plain lazy. Ø Some are afraid of losing their investment. They think this program is designed to beat them out of a few dollars. The system works if you will just try it. But you must follow the simple instructions exactly, and in less than three months, you will receive $800,000 GUARANTEED! Keep what you are doing to yourself for awhile. Many will tell you it won`t work and will try to talk you out of your dreams. Let them know of your success after it works. LETTERS FROM PARTICIPANTS IN THIS PROGRAM: My name is David Rhodes. In 1992 my car was repossessed and bill collectors were housing my. I was laid off and my unemployment ran out. In October of 1992, I received a letter telling me how to earn $800,000 anytime I wanted. Of course, I was skeptical. But because I was so desperate and virtually had nothing to lose, I gave it a try. In January 1993, my family and I went on a 10-day cruise. The next month I bought a brand new Mercedes with cash! I am currently building a home in Virginia and I will never have to work again. This money program really works perfectly every time. I have never failed to receive less than $500,000. This is a legitimate, money-making opportunity. It does not require you to sell anything or to come in contact with people. And , best of all, you only leave the house to mail the letters. If you have always believed that someday you would get the lucky break, then simply follow the instructions and make dreams come true. Larry McMahon, Norfolk, VA Six months ago, I received this letter and ignored it. Five more came within a period of time and I ignored them also. I was tempted, but I was convinced that they were just a Hoax. After three weeks of deliberating, I decided to give it a try ( not expecting much ). Two weeks went by and nothing happened. The fourth week was unbelievable! I cant say I received $800,000 but I received $400,000. For the first time in years, I am debt free. I am doing this again, only this time starting with 500 post. I strongly recommend that you follow the instructions exactly as outlined in this letter. INSTRUCTIONS 1. Immediately send $1.00 to each of the six people on the list at the end of this letter. Wrap the dollar bill in a note saying “ Please add me to your mailing list” and include your name and address. 2. Copy this letter. You do not have to type it 200 times. Simply place your cursor at the top of the page, hold it and drag it all the way down to the end of the letter. Then click on "edit" and select "copy". Now open up a notepad file on your computer and put the cursor at the top of the page in the notepad, click on 'edit' and then select 'paste' it will copy the letter for you onto your computer. 3. Remove the name next to the #1 on the list and move the rest of the names up one position (#2 becomes #1, #3 becomes #2, etc…..) Then place your name in the #6 position. Then save it, make sure it is saved as a txt. file. 4. When you have completed the instructions, take this letter and then go to (Google,Yahoo,...) and type in (Making Money Massege board,or post massege,...)and start posting your copy to 200 message boards,or more this is only the minimum, you can post as much as you like...The more copies you send the better the results. Keep a copy of this letter so you can use it a second time. Post it out again in six months, but Post it with the addresses you receive with each dollar. It will work better the second time. NOTE: This service is 100% legal - (Refer to title 18 section 1302 of the U.S. Postal & lottery laws) How does it work? When you send out 200 Posts, it is estimated that at least 15 people will respond and send you a $1.00. ($15.00) Those 15 will Post 200 Posts each and 225 people send you $1.00 ($225.00) Those 225 people Post 200 Posts each and 3,375 people send you $1.00 ($3,375.00) Those 3,375 post 200 posts each and 759,375 people send you $1.00 ($759,375.00) At this point your name drops off the list, but so far you have received $813,615.00. P.S. When your money begins to come in, give the first 10% to charity with spirit and share a good fortune!
1. Jacob, Maxime 660 Prevost Street Trois-Rivières, Qc G8Y-4A5 Canada
2. Jose E. Cruz 4440 N.E. 14 Ave. Pompano Beach, FL 33064 USA
3. Cristian Mery El Boldo 8682 906-0272 PUDAHUEL CHILE This really really works,I tried it once and I'm doing it again, first to be honest I only posted 145 posts and I didn't recive alot only 6,689.00$ in 3 months,at least this means that it realy works ,so this time I'm posting 604 posts and I've got so far in 2 month 15,640.00$ this is realy like a dream come true. So go on and try it trust me you've got nothing to lose.... important tip - Cover money by paper fully by which it can not been seen in light , because postal employees do some cheat some times....ok PD: Send this letter to all your email contacts, friends and all the newsgroups you could find. The more you get The best for BOTH of us. Good Luck!
4. Joseph Dushin, 264 B South Bridge Road Singapore 058813
5. Carey Tri, 8756 Brunell Way, Inver Grove Heights, MN 55076
6, Lance Suire 802 Cheneau Rd, Kaplan, LA 70548
Previous Topic:Why nobody cares about Cut, Copy and Paste ?
Next Topic:the problem I add a image in editor
Goto Forum:
  


Current Time: Sat Dec 04 06:02:47 GMT 2021

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

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

Back to the top