Skip to main content


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 #590828] Thu, 22 July 2010 14:15
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
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
Previous Topic:[Eugenia] Package references in generated models
Next Topic:[ETL] parameterised equivalent("rule")
Goto Forum:
  


Current Time: Fri Apr 26 20:36:31 GMT 2024

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

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

Back to the top