Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Drawing blocks with predefined inputs and outputs
[Eugenia] Drawing blocks with predefined inputs and outputs [message #548633] Thu, 22 July 2010 10:15 Go to next message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
Registered: August 2009
Senior Member
Hello,

I need to create a diagram editor which is somewhat similar to what is shown here: http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-affi xed-nodes/

I need to be able to drop some predefined components on the diagram, but the difference is that I have a couple of different components. Each of these components have a fixed number of input and output ports.
So, when such a component is created on the diagram, all its ports should be immediately visible and the user shouldn't be able to remove a port (or to create additional ports in the component).
You could see this similar as an editor to edit electronic diagrams: each component (like RAM, CPU, ...) has a fixed number of pins.

The code for one of my component looks like this:
class EquivalentBlock extends PLCOpenBlock {
	@gmf.affixed(foo="bar")
	val InputPort Activate; 
	@gmf.affixed(foo="bar")
   	val InputPort S_ChannelA;
   	@gmf.affixed(foo="bar")
   	val InputPort S_ChannelB;
	@gmf.affixed(foo="bar")
   	val InputPort DiscrepancyTime;
   
   	@gmf.affixed(foo="bar")
   	val OutputPort Ready;
   	@gmf.affixed(foo="bar")
   	val OutputPort S_EquivalentOut;
   	@gmf.affixed(foo="bar")
   	val OutputPort Error;
   	@gmf.affixed(foo="bar")
   	val OutputPort DiagCode;
}


Furthermore, those ports should have a fixed position and should have a specific label (for instance, in the previous code example, the Activate port should be labeled "Activate").

I have no clue how to implement such a functionality, and I even don't know if this is possible. This looks like a very useful use case.
Any clue how can reach something like that ?

Thanks
Re: [Eugenia] Drawing blocks with predefined inputs and outputs [message #548854 is a reply to message #548633] Fri, 23 July 2010 05:32 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi,

Unfortunately, Eugenia doesn't support specifying nodes with a fixed
number of ports. Have you perhaps tried posting the GMF newsgroup about
this?

Cheers,
Dimitris

C wrote:
> Hello,
>
> I need to create a diagram editor which is somewhat similar to what is
> shown here:
> http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-affi xed-nodes/
>
> I need to be able to drop some predefined components on the diagram, but
> the difference is that I have a couple of different components. Each of
> these components have a fixed number of input and output ports. So, when
> such a component is created on the diagram, all its ports should be
> immediately visible and the user shouldn't be able to remove a port (or
> to create additional ports in the component). You could see this similar
> as an editor to edit electronic diagrams: each component (like RAM, CPU,
> ...) has a fixed number of pins.
>
> The code for one of my component looks like this:
> class EquivalentBlock extends PLCOpenBlock {
> @gmf.affixed(foo="bar")
> val InputPort Activate; @gmf.affixed(foo="bar")
> val InputPort S_ChannelA;
> @gmf.affixed(foo="bar")
> val InputPort S_ChannelB;
> @gmf.affixed(foo="bar")
> val InputPort DiscrepancyTime;
> @gmf.affixed(foo="bar")
> val OutputPort Ready;
> @gmf.affixed(foo="bar")
> val OutputPort S_EquivalentOut;
> @gmf.affixed(foo="bar")
> val OutputPort Error;
> @gmf.affixed(foo="bar")
> val OutputPort DiagCode;
> }
>
> Furthermore, those ports should have a fixed position and should have a
> specific label (for instance, in the previous code example, the Activate
> port should be labeled "Activate").
>
> I have no clue how to implement such a functionality, and I even don't
> know if this is possible. This looks like a very useful use case.
> Any clue how can reach something like that ?
>
> Thanks
Re: [Eugenia] Drawing blocks with predefined inputs and outputs [message #590891 is a reply to message #548633] Fri, 23 July 2010 05:32 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi,

Unfortunately, Eugenia doesn't support specifying nodes with a fixed
number of ports. Have you perhaps tried posting the GMF newsgroup about
this?

Cheers,
Dimitris

C wrote:
> Hello,
>
> I need to create a diagram editor which is somewhat similar to what is
> shown here:
> http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-affi xed-nodes/
>
> I need to be able to drop some predefined components on the diagram, but
> the difference is that I have a couple of different components. Each of
> these components have a fixed number of input and output ports. So, when
> such a component is created on the diagram, all its ports should be
> immediately visible and the user shouldn't be able to remove a port (or
> to create additional ports in the component). You could see this similar
> as an editor to edit electronic diagrams: each component (like RAM, CPU,
> ...) has a fixed number of pins.
>
> The code for one of my component looks like this:
> class EquivalentBlock extends PLCOpenBlock {
> @gmf.affixed(foo="bar")
> val InputPort Activate; @gmf.affixed(foo="bar")
> val InputPort S_ChannelA;
> @gmf.affixed(foo="bar")
> val InputPort S_ChannelB;
> @gmf.affixed(foo="bar")
> val InputPort DiscrepancyTime;
> @gmf.affixed(foo="bar")
> val OutputPort Ready;
> @gmf.affixed(foo="bar")
> val OutputPort S_EquivalentOut;
> @gmf.affixed(foo="bar")
> val OutputPort Error;
> @gmf.affixed(foo="bar")
> val OutputPort DiagCode;
> }
>
> Furthermore, those ports should have a fixed position and should have a
> specific label (for instance, in the previous code example, the Activate
> port should be labeled "Activate").
>
> I have no clue how to implement such a functionality, and I even don't
> know if this is possible. This looks like a very useful use case.
> Any clue how can reach something like that ?
>
> Thanks
Previous Topic:[Eugenia] Drawing icons instead of labels in links
Next Topic:[EWL] Copy an element
Goto Forum:
  


Current Time: Sun Apr 20 15:49:09 EDT 2014

Powered by FUDForum. Page generated in 0.01939 seconds