Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef-dev] Graph Structure Proposal

Well maybe I haven't either. Nevertheless, let's give it a try. I will try to investigate your issues by this week. We can then see where we are. 

Cheers,
Alexander 

> Am 05.08.2014 um 22:31 schrieb Miro Spönemann <msp@xxxxxxxxxxxxxxxxxxxxxx>:
> 
> Ok, probably there’s a lot of EMF features I haven’t fully understood yet. We can give it a try. I think I could start an evaluation of the new data structure with the existing KIELER code by the end of this month.
> 
> Miro
> 
> 
>> On 05.08.2014, at 17:57, Alexander Nyßen <alexander.nyssen@xxxxxxxxx> wrote:
>> Hi Miro,
>> 
>>> Am 05.08.2014 um 15:22 schrieb Miro Spönemann <msp@xxxxxxxxxxxxxxxxxxxxxx>:
>>> 
>>> Hi all!
>>> 
>>>> On 04.08.2014, at 09:40, Alexander Nyßen <alexander.nyssen@xxxxxxxxx> wrote:
>>>> I have implemented the changes I had in mind with EMapPropertyHolder and MapPropertyHolder: https://github.com/nyssen/kgraph.git. In detail, 
>>>> - I extended IPropertyHolder to provide a getSerializedProperties() method, which can replace the mechanism that was formerly provided by EMapPropertyHolder (makePersistent(), getPersistetProperties()). I added an implementation to MapPropertyHolder.
>>>> - I removed EMapPropertyHolder and related constructs (PropertyMapping) and used IPropertyHolder within the Ecore Model directly (and used MapPropertyHolder within the generated implementation classes).
>>> 
>>> The motivation for the EMapPropertyHolder was to implement the IPropertyHolder interface on an EMF-level, so utilities such as EcoreUtil.copy(..) include the properties in the generic processing. With your solution this would not work, so after copying an instance of the graph the properties must be copied in an additional step.
>> 
>> I now understand what you intended. However, I am not so sure that removing the EMapPropertyHolder necessarily means copying via EcoreUtil.copy() is no longer possible. I will take a look at this.
>> 
>>> 
>>>> I also changed the data of KGraphElement from EObject to Object, so its not EMF-specific.
>>> 
>>> As far as I understand, this means that the data cannot be handled by EMF, i.e. no serializing, parsing, copying etc.
>> 
>> Serializing and parsing is implemented within KGraphFactoryImpl. We would probably have to add a proper generic implementation for EObjects here (by falling back to the EMF-mechanisms).
>> 
>>> 
>>>> What I would like to do in addition (but have not incorporated yet is):
>>>> - If possible, split implementation and interfaces in two bundles (I have not figured out yet, if this is supported by EMF right out of the box).
>>>> - Use GEF4 Geometry Point and Dimension instead of KPoint, etc. The Geometry classes support imprecise comparison and can directly be used within GEF4 (and converted into other representations), so I would prefer these to an additional representation (as GEF4 Geometry does not introduce any new dependencies, there is no drawback included).
>>> 
>>> This means that the points cannot be handled by EMF, too.
>> 
>> No, this is not true. If we implement the serializer and parser methods within KGraphFactoryImpl, that should work (as the types are known within the Ecore-Model).
>> 
>>> 
>>>> I also still need to investigate whether it makes sense to "merge" the properties mechanism with the adapter mechanism. However, do not think that is an urgent matter. I could basically live with what came out of the refactoring now (Property and PropertyHolder), while I am still unaware about the need for the IProperty-interface in addition to the Property-class (What abstraction does it add? What use case is behind it?).
>>> 
>>> We have another IProperty implementation in KIELER in which we store the meta data on layout options gathered from the extension point.
>> 
>> As I said, I think I could live with what we currently have.
>> 
>>> 
>>> 
>>> In summary, my feeling is that your proposed changes remove too much of the EMF functionality that we are actually using in KIELER. This could cause a lot of overhead that we would rather tend to avoid in our project. I’m not sure, but maybe, if our requirements on the data structure are too different, we should take a more decoupled approach, with an EMF-free variant of the data structure in GEF and an EMF variant in KIELER, and add simple translations between the two. In this case the discussions we have made are certainly fruitful, giving us all some understanding of the two projects. If we still go for a common data structure, we need to carefully evaluate the consequences of the modifications with respect to the existing code that uses KGraph, which is a lot!
>> 
>> I do not think that the EMF-functionality is necessarily broken by what I changed (we will probably have to augment the implementation to deal with all cases, this is true). I would propose to investigate this in more detail before ruling out an alternative. If we cannot realize the use case of an EMF-unspecific set of interfaces without actually causing severe consequences on your code base, we could still think of having an completely EMF-based graph data structure in GEF4. However, as long as we have not ruled that out in detail, I would like to consider this as an available option. 
>> 
>>> Regards
>>> Miro
>> 
>> Cheers
>> Alexander
>> 
>>> 
>>> 
>>>>> Am 03.08.2014 um 13:46 schrieb Alexander Nyßen <alexander.nyssen@xxxxxxxxx>:
>>>>> 
>>>>> Hi Miro,
>>>>> 
>>>>>> Am 03.08.2014 um 04:31 schrieb Miro Spönemann <msp@xxxxxxxxxxxxxxxxxxxxxx>:
>>>>>> 
>>>>>> Hi,
>>>>>> see below.
>>>>>> 
>>>>>>> On 28.07.2014, at 19:21, Alexander Nyßen <alexander.nyssen@xxxxxxxxx> wrote:
>>>>>>> 1) Shouldn't we now also split it into two bundles, i.e. have an org.eclipse.gef4.kgraph and org.eclipse.gef4.kgraph.impl?
>>>>>> 
>>>>>> If we have only one implementation, splitting the interfaces from the implementation is not necessary, as far as I understand.
>>>>> 
>>>>> Well, it would IMHO not make much sense to bundle the EMF-independent interfaces within a bundle that has EMF-dependencies.
>>>>> 
>>>>>> 
>>>>>>> 2) Why do we haven a MapPropertyHolder as well as an EMapPropertyHolder and related EMapPropertyHolderImpl? Couldn't we simply remove the manually coded MapPropertyHolder and rename the EMapPropertyHolder to MapPropertyHolder, so that MapPropertyHolderImpl would be its proper replacement?
>>>>>> 
>>>>>> The EMapPropertyHolder is based on an EMap, while the MapPropertyHolder is based on a HashMap. The latter is useful for including the properties mechanism in other data structures without EMF.
>>>>> 
>>>>> Why not use the HashMap-based MapPropertyHolder in both situations? If the Graph-interfaces are intended to be EMF-unspecific, they should be based on HashMap rather than EMap anyway. And why not use the manually implemented MapPropertyHolder also within the EMF-based implementation? Having seems to be somehow strange to me. 
>>>>> 
>>>>>> 
>>>>>>> Miro, Christoph-Daniel, what do you think about Zoltan's result? Would that generally serve to fulfill your requirements as well?
>>>>>>> 
>>>>>>> As announced, I have spent some time on extending the IAdaptable mechanism (we can now bind the adapters under roles; everything is now available within GEF4 Common) and will take another look at the properties mechanism now. Maybe there's a potential for some synergy. I will keep you updated.
>>>>>> 
>>>>>> After a quick look it seemed to me that Zoltan's result could work for us. So the biggest open question is how to handle the properties. We’ll await your proposal.
>>>>> 
>>>>> I will take a look into it next week.
>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> Miro
>>>>> 
>>>>> Cheers
>>>>> Alexander
> 
> _______________________________________________
> gef-dev mailing list
> gef-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/gef-dev


Back to the top