[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: What's the best way to implement "ports"?

I think I have found the solution here:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/msg13408.html

It does not involve compartments! ;-)
Thanks!

Michael.
> Hello Michael,
> 
> ports are created like compartments in the mapping def model, except that
> there is no CompartmentMapping referenced in the ChildReference. In your
> semantic model: the port element must be a child element of your main
> element. This will address your pints 1, 2, 3, 4.2 and 5. For 4.1: This is
> controlled by BorderItemLocator creted in the addFixedChild method in the
> [MainFigure]EditPart (At least in GMF 2.0... does this have changed???).
> 
> Best regards
> 
> Enrico
> 
> TDB wrote:
> 
>> Hi everyone!
>>
>> What's the beast (easiest) way to implement "ports" in GEF/GMF? When I
>> say ports, I mean the following structure:
>>
>> 1) There is a main figure/element
>> 2) The main figure/element "has" ports
>> 3) Port is another figure/element that acts as source/target of edges
>> 4) Size and position of ports is controlled by the main figure; ports
>> move with the main figure.
>> 5) The ports should look like they are located on the outside of the
>> outline of the main figure.
>>
>> Any help greatly appreciated!!!
>> Thanks!
>>
>> Michael.
>