Skip to main content



      Home
Home » Modeling » Graphiti » Store a map in the properties of a pictogramelement
Store a map in the properties of a pictogramelement [message #896271] Tue, 17 July 2012 16:02 Go to next message
Eclipse UserFriend
Hi, I have to store a map in the properties of a pictogramelement. Because this map have to be persistent. But I only can store properties. Is there a way to store the map in or as a property?

Thanks a lot

Patrick
Re: Store a map in the properties of a pictogramelement [message #896474 is a reply to message #896271] Wed, 18 July 2012 09:26 Go to previous messageGo to next message
Eclipse UserFriend
Patrick,

properties can store any kind of String values; you could serialize your map
(rather its content) and store it that way.

Michael
Re: Store a map in the properties of a pictogramelement [message #896502 is a reply to message #896474] Wed, 18 July 2012 10:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

i have tried to serialize it, but in this map is a freeformconnectionimpl and this object ist not serializable. Maybe you could helo me?

Thanks a lot.
Re: Store a map in the properties of a pictogramelement [message #896543 is a reply to message #896502] Wed, 18 July 2012 15:13 Go to previous messageGo to next message
Eclipse UserFriend
Why do you want to serialize an EObject (FreeFormConnection) using java's serialization methods?

If the FreeFormConnection is part of your Diagram, then it will be serialized by graphiti.

If you really need to serialize EObjects manually, then you should have a look at EMF's serialization methods (dont confuse with java's serialization):

http://wiki.eclipse.org/EMF/FAQ#How_do_I_serialize_a_resource_to_a_String_instead_of_a_file.3F


Patrick Rütz wrote on Wed, 18 July 2012 10:59
Hi Michael,

i have tried to serialize it, but in this map is a freeformconnectionimpl and this object ist not serializable. Maybe you could helo me?

Thanks a lot.

Re: Store a map in the properties of a pictogramelement [message #896588 is a reply to message #896543] Wed, 18 July 2012 23:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Erdal,

i have a map mit map<connection, List<Anchor>>, because I had a collapsefeature, but when I close the eclispe Plugin, the Map is set to null and uncollapse. So I have to made my map persistent.

Patrick
Re: Store a map in the properties of a pictogramelement [message #896891 is a reply to message #896588] Fri, 20 July 2012 06:22 Go to previous message
Eclipse UserFriend
Patrick,

I think it would be best not to store the connection directly in the
property, but instead to use a property like Name to identify a connection:
the property Name would be attached to the connection and the name value
could be used as the key in the map.

Michael

"Patrick Rütz" schrieb im Newsbeitrag news:ju7uab$9rj$1@xxxxxxxxe.org...

Hi Erdal,

i have a map mit map<connection, List<Anchor>>, because I had a
collapsefeature, but when I close the eclispe Plugin, the Map is set to
null and uncollapse. So I have to made my map persistent.

Patrick
Previous Topic:Gerrit enabled for Graphiti Git repository
Next Topic:programmatic connection creation
Goto Forum:
  


Current Time: Fri Jul 25 20:49:18 EDT 2025

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

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

Back to the top