Integration of the KIELER Framework [message #1090462] |
Tue, 20 August 2013 07:00 |
Juliane Mueller Messages: 30 Registered: August 2011 |
Member |
|
|
Dear all,
I've found the KIELER-Framework and it looks very interesting. Especially in cooperation with the graphiti-framework it would be very useful for me.
But I have some problems to integrate KIELER into my application. At first I want to tell you my scenario:
I've created an Eclipse RCP-application with an own datamodel and graphiti diagrams representing it. I use Maven Tycho. In my target platform I've added the KIELER-Updatesite and selected all needed Elements (all without optional in the end). Do I need all or less of them, when I just want to use it to layout my graphiti diagrams? I've found no solution in the help.
Then I've added all plug-Ins from KIELER to the .product file. Afterwards I've wanted to run the "Maven Build" with "clean install" as goals, but everytime an exception is thrown. Maven can't find "com.google.guava.runtime.feature.feature.group 8.0.0". I don't find this plug-In on the Updatesite. Where should I get it? Do you have any idea?
My next problem is to integrate KIELER into my diagram. I've created the diagrams automatically and want to layout them automatically, too. Therefor I've created a LayoutFeature, but I don't know how to integrate KIELER? Also only a few elements of my diagram, differed by the ObjectModels behind the pictogramElements, should be arrayed. Other ones should be ignored. How can I define these elements? Do you have any example, tutorial or something like this?
I'm looking forward for your reply!
Best regards,
Juliane
|
|
|
|
|
Re: Integration of the KIELER Framework [message #1096262 is a reply to message #1092771] |
Wed, 28 August 2013 06:40 |
Hallvard Traetteberg Messages: 673 Registered: July 2009 Location: Trondheim, Norway |
Senior Member |
|
|
Hi,
As you seem to have understood, you need to add an extension for the
extension point de.cau.cs.kieler.kiml.ui.layoutManagers and refer to an
implementation of IDiagramLayoutManager, usually a subclass of
GraphitiDiagramLayoutManager. Here's how the extension is defined in my
plugin.xml:
<extension point="de.cau.cs.kieler.kiml.ui.layoutManagers">
<manager
class="org.ptolemy.graphiti.generic.kieler.ActorDiagramLayoutManager"/>
</extension>
In your subclass you will typically override the supports method, to
make the layout apply to your specific objects.
public boolean supports(Object pictogramElement) { ... }
Note that this method is not called on you domain objects, but on some
graphical object (PictogramElement), so you may need to lookup the
underlying domain object. It may be that the existing implementation
works for you, in case you do not necessarily need to create your own
subclass.
The default implementation includes code for navigating through the
shapes to figure out what are the nodes and edges. You may have to
override this code, too.
Hallvard
On 23.08.13 09.17, Juliane Mueller wrote:
> I've solved the problem with maven. For Graphiti only the plugin for KIELER integration in Graphiti is needed. For the com.google.guava plugin I've found an updatesite. This url is: http://guava-osgi.googlecode.com/svn/trunk/repository/ .
>
> But there are still some problems with the alignment of KIELER to my own datamodel. In the eTrice project I've seen that they've implemented theyr own type of GaphitiDiagramLayoutManager. I've made the same. But when I want to define my own manager in the extension "de.cau.cs.kieler.kiml.ui.layoutManagers" no manager could be defined, like you can see in the picture.
>
> Am I on the right way? Does anyone of you has an idea how to solve the problem?
>
> I'm really looking forward for your reply!
> Best regards, Juliane
>
|
|
|
|
|
|
Re: Integration of the KIELER Framework [message #1722235 is a reply to message #1690885] |
Wed, 03 February 2016 15:07 |
|
You need to extend the de.cau.cs.kieler.kiml.graphiti.GraphitiDiagramLayoutManager class , rather than implementing yours own.
Now to introduce your nodes and edges to the LayoutManager you can override these and check if it works for you.
protected void buildLayoutGraphRecursively(LayoutMapping<PictogramElement> mapping, ContainerShape parentElement,KNode parentNode)
protected KNode createNode(final LayoutMapping<PictogramElement> mapping, final KNode parentNode, final Shape shape)
protected KEdge createEdge(final LayoutMapping<PictogramElement> mapping, final Connection connection)
Regards,
Abhishek Chakraborty
|
|
|
Powered by
FUDForum. Page generated in 0.04482 seconds