Input and output ports in an element [message #22087] |
Thu, 17 August 2006 05:21  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05588 seconds