Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Input and output ports in an element
Input and output ports in an element [message #22087] Thu, 17 August 2006 05:21 Go to next message
Eclipse UserFriend
Originally posted by: zsolt.sandor.gmail.com

Hi all!

I am working on a diagram editor using GMF. (Previously I used
GEF with POJO classes) I was able to create model elements
represented by rectangles, and I am able to connect them
together. Now, i would like to create elements like in the
IBM's redbook (http://www.redbooks.ibm.com/abstracts/sg246302.html)
which have input and output connections.

How can I decribe, that my node element contains one input
connection, and one output connection, and by creating a new
node element, an input and an output connection must be
created.

In my ecore file, in the Node class I have a reference container
for the InputPorts, and one reference container for the
OutputPorts.

I tried to write in the node's constructor in NodeImpl.java
the following:

getInputPorts().add(FilterFactory.eINSTANCE.createInputPort( ));

The problem with this approach is that every time I load the
diagram, a new InputPort element will be created (because
the constructor is called), so the number of input port will
increase (because the InputNodes from the diagram data file
will be added automatically), which is attractive, but
not something I wanted to do :)

Another question is how can I describe the input and output
port containment in the gmfgraph file, because I did not
found any documentation about the gmfgraph editor (and
about how to use the layouts and so on...), and the
mindmap example is much-much simplier.

Thanks for the answers, regards:

Zsolt Sandor
Re: Input and output ports in an element [message #22219 is a reply to message #22087] Thu, 17 August 2006 05:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Hello!

Ports are supported by GMF runtime but in tooling models there is still
no way to describe them.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=124826

Zsolt Sandor wrote:
> Hi all!
>
> I am working on a diagram editor using GMF. (Previously I used
> GEF with POJO classes) I was able to create model elements
> represented by rectangles, and I am able to connect them
> together. Now, i would like to create elements like in the
> IBM's redbook (http://www.redbooks.ibm.com/abstracts/sg246302.html)
> which have input and output connections.
> How can I decribe, that my node element contains one input connection,
> and one output connection, and by creating a new
> node element, an input and an output connection must be
> created.
> In my ecore file, in the Node class I have a reference container for the
> InputPorts, and one reference container for the OutputPorts.
>
> I tried to write in the node's constructor in NodeImpl.java
> the following:
>
> getInputPorts().add(FilterFactory.eINSTANCE.createInputPort( ));
>
> The problem with this approach is that every time I load the
> diagram, a new InputPort element will be created (because
> the constructor is called), so the number of input port will increase
> (because the InputNodes from the diagram data file
> will be added automatically), which is attractive, but
> not something I wanted to do :)
>
> Another question is how can I describe the input and output
> port containment in the gmfgraph file, because I did not
> found any documentation about the gmfgraph editor (and
> about how to use the layouts and so on...), and the
> mindmap example is much-much simplier.
>
> Thanks for the answers, regards:
>
> Zsolt Sandor
>
>
Re: Input and output ports in an element [message #22259 is a reply to message #22219] Thu, 17 August 2006 05:42 Go to previous message
Eclipse UserFriend
Originally posted by: zsolt.sandor.gmail.com

Oh, thanks. Is there any workaround for it?

Regards:

Zsolti
Previous Topic:How to disable generation of certain actions?
Next Topic:NuB: Where do the Figures come from in the Mindmap-Example
Goto Forum:
  


Current Time: Thu May 01 04:37:38 EDT 2025

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

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

Back to the top