Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [elk-dev] Setting up a minimal environment for testing algorithms and visualizing results

Thank you, Ulf, I will try this.

Jake

On Aug 23, 2018, at 4:21 PM, Ulf Rüegg <uru@xxxxxxxxxxxxxxxxxxxxxx> wrote:

At this point the "best" way is to use KIELER's KLighD and formats service. It's by far not the easiest nor a "minimal" setup though. So ...

There's no off-the-shelf solution at the moment. You may be able to copy a solution that Miro created for .kgt files. Have a look at this commit [1] and the API to convert json text into an ELK graph [2]. 

You'll have to copy and adjust these two files from the elk.graph.text.ui plugin (you can put the copies into the elk.graph.json plugin for testing):
    org/eclipse/elk/graph/text/ui/layout/TextLayoutConnector.java
    org/eclipse/elk/graph/text/ui/layout/TextLayoutSetup.java

What you have to do is likely the following:
 1) Adapt the 'buildLayoutGraph' method in the 'TextLayoutConnector' to load the json text from the 'workbenchPart' (which is likely a 'TextEditor') and convert it into an ELK graph.
 2) Adjust the 'TextLayoutSetup' and register it in the elk.graph.json's plugin.xml (along the lines of the plugin.xml changes in the commit)
 3) Make sure you require elk.core.ui in the MANIFEST.MF

I'm sure I forgot something but let me know if give it a shot and have any success.

Regards,
Ulf



On Mon, Aug 20, 2018 at 8:32 PM Jacob Beard <jake@xxxxxxxxxxxxxxx> wrote:
Sounds good. Thank you, Chris.

> On Aug 20, 2018, at 1:45 PM, Christoph Daniel Schulze <cds@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Jake,
>
> just to let you know that we haven't forgotten your request. Our expert
> on the JSON code is currently quite busy, but will try to get around to
> answering eventually.
>
> On a side note, improving the experience for algorithm developers is on
> our agenda.
>
> Cheers,
> Chris
>
>> On 17.08.18 18:13, Jacob Beard wrote:
>> Hi,
>>
>> I am hoping to reproduce some of the issues I have identified in elkjs
>> (e.g. here <https://github.com/OpenKieler/elkjs/issues/48>, and here
>> <https://github.com/OpenKieler/elkjs/issues/44>) in elk, in order to
>> better understand them and resolve them in the Java source code. I
>> reviewed the developer docs, but I am still a bit overwhelmed trying to
>> set up a minimal environment for testing algorithms in Eclipse. I am
>> imagining a sort of minimal setup like:
>>
>> 1. An entry point which loads KGraph JSON into memory, and calls into
>> DiagramLayoutEngine, passing through the kgraph object
>> 2. Layout Graph View is registered with DiagramLayoutEngine, and
>> automatically visualizes the DiagramLayoutEngine response
>>
>> Does a simple tool or example code like this exist?
>>
>> I would appreciate any insight you could share on this. Thank you for
>> your help,
>>
>> Jake
>
> _______________________________________________
> elk-dev mailing list
> elk-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/elk-dev

_______________________________________________
elk-dev mailing list
elk-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/elk-dev
_______________________________________________
elk-dev mailing list
elk-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/elk-dev


Back to the top