Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Graphiti concepts and tutorial
Graphiti concepts and tutorial [message #1250910] Wed, 19 February 2014 18:29 Go to next message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
Dear all,
I've just started using Graphiti, and I'm a little bit confused about several concepts expressed during the tutorial:

- What do you mean with "context"?
- Is Diagram Type a shorten for Diagram Type Agent? If not, could you please tell me the difference between Diagram Type and Diagram Type Provider?
-In the "Create Conncetion Feature" section, could you please exaplain what these lines of code do?
          // add connection for business object
            AddConnectionContext addContext =
                new AddConnectionContext(context.getSourceAnchor(), context
                    .getTargetAnchor());
            addContext.setNewObject(eReference);
            newConnection =
                (Connection) getFeatureProvider().addIfPossible(addContext);
        }



Thanks for your precious time
Simone
Re: Graphiti concepts and tutorial [message #1251663 is a reply to message #1250910] Thu, 20 February 2014 13:13 Go to previous messageGo to next message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
Hi all,
it is possible that this post have been read by more then 10k people, and nobody has an answer? I know that maybe my questions are quite silly, but I would really be grateful if someone can answer them.

Thanks
Simone
Re: Graphiti concepts and tutorial [message #1251675 is a reply to message #1251663] Thu, 20 February 2014 13:30 Go to previous messageGo to next message
Soeren M is currently offline Soeren MFriend
Messages: 77
Registered: September 2011
Member
First of all I think its not a nice manner to treat us to answer you just because think there are enough views for an answer...
and secondly, the forum is bugged as hell, there were never ever 10k views.

To your questions, a context contains all the informations you need in that moment. So there are diffenrent contexts for different situations.
As you can see you have a AddConnectionContext, this one needs a source and a target, obv Wink otherwise you cant connect two things...

In Graphiti, and I think everywhere else, you have a model behind your graphical representation, so you have to tell your context to which object you want to link the graphical representation...
and last but not least, you have to ask the FeatureProvider if you are able to create this connection...
Re: Graphiti concepts and tutorial [message #1251709 is a reply to message #1251675] Thu, 20 February 2014 14:12 Go to previous messageGo to next message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
Thanks for your answer, and I am very sorry if you'd though I was rude.

Simone
Re: Graphiti concepts and tutorial [message #1252794 is a reply to message #1250910] Fri, 21 February 2014 16:08 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Simone,

context should have been clarified, so I try to answer the remaining
questions.

A Diagram Type defines one special kind of diagram like URL Class Diagram. A
Diagram type provider is an editor that is registered for a diagram type.
There could be more than one diagram type provider for one diagram type.

The snippet in the create connection feature assembles a context suitable
for adding a connection to the diagram and calls the fetaure provider to
search for and possibly execute a feature that can add such a connection to
the diagram.

Michael
Re: Graphiti concepts and tutorial [message #1255431 is a reply to message #1252794] Mon, 24 February 2014 12:39 Go to previous message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
Many thanks Michael.

Simone
Previous Topic:Using SVG-Export directly/NoClassDefFoundError
Next Topic:Problems with calculated text size
Goto Forum:
  


Current Time: Thu Apr 25 10:08:27 GMT 2024

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

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

Back to the top