Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Using meta-model ereferences for connections(How do I associate a model erefence with a connection)
Using meta-model ereferences for connections [message #778218] Wed, 11 January 2012 18:33 Go to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Hi there,

Sorry, I am rather new at this and am digging my way through the tutorial and perhaps I have not gotten to the pertinent information yet.

The problem I am trying to solve is as follows: I have an ecore meta-model which has a set of EClasses (Goal, Strategy, and so on). Each EClass contains one or more EReferences (subgoals, goalstrategies, strategygoals, etc). Some are self-referential (relating a Goal to a different Goal) and some are heterogeneous (Goal to Strategy, Strategy to Goal).

What I would like to do is to relate the actual EReference type (subgoals, goalstrategies,...) to a connection feature. The tutorial makes reference to simply an EReference. But it does not seem to use a distinct instance related to an EClass.

Is there a way to access the actual EReferences in my meta-model for a particular EClass and then create a "domain object" that is related to this reference and hence the given instance of the class (as represented by a shape feature)?

Sorry again if I am missing something obvious and I would be more than willing to clarify my issue if needed.

Thanks in advance,
Josef
Re: Using meta-model ereferences for connections [message #778388 is a reply to message #778218] Thu, 12 January 2012 17:42 Go to previous messageGo to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Hi there,
So I decided to create an explicit EClass in my model to create the connections. However now I have run into the issue that the connections are not being added to the palette.

My model now has a IsSolvedBy and InContextOf EClass which has references to an abstract Node class which has is the super type of Goal, Strategy, ...

From everything I can tell my FeatureProvider is correct.
   public ICreateConnectionFeature[] getCreateCreateConnectionFeatures() {
            return new ICreateConnectionFeature[] { 
               new EgsndiagramCreateIsSolvedByFeature(this), 
               new EgsndiagramCreateInContextOfFeature(this) };
    }


The getAddFeature seems to be correct as well but this would not prevent the item from showing up.

Is there anything else that would prevent these features from showing up in the palette? I get no runtime warnings on it.


Thanks,
Joe
Re: Using meta-model ereferences for connections [message #778509 is a reply to message #778388] Thu, 12 January 2012 23:06 Go to previous message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Hi again,
So I am sort of tossing my hands up as I do not have much to go on. Does anyone have an example where connections are derived from EClasses in the model? (The tutorial and the few examples on line do not seem to have this feature. The presentation from EclipseCon 2011 by Koen Aers comes close but is light on some of the details about the model itself.) I guess I am not certain if this is a problem with the model itself and Graphiti is silently balking or if there is a simpler (and possibly naive ) problem.

Thanks,
Josef
Previous Topic:Marquee vs Select all behavior
Next Topic:Resolving references to external Files in Businessmodels
Goto Forum:
  


Current Time: Thu Mar 28 14:55:08 GMT 2024

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

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

Back to the top