{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/elk/issues/106","repository_url":"https://api.github.com/repos/eclipse/elk","labels_url":"https://api.github.com/repos/eclipse/elk/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/elk/issues/106/comments","events_url":"https://api.github.com/repos/eclipse/elk/issues/106/events","html_url":"https://github.com/eclipse/elk/pull/106","id":196938412,"number":106,"title":"Implemented a textual format for ElkGraph","user":{"login":"spoenemann","id":4067210,"avatar_url":"https://avatars.githubusercontent.com/u/4067210?v=3","gravatar_id":"","url":"https://api.github.com/users/spoenemann","html_url":"https://github.com/spoenemann","followers_url":"https://api.github.com/users/spoenemann/followers","following_url":"https://api.github.com/users/spoenemann/following{/other_user}","gists_url":"https://api.github.com/users/spoenemann/gists{/gist_id}","starred_url":"https://api.github.com/users/spoenemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoenemann/subscriptions","organizations_url":"https://api.github.com/users/spoenemann/orgs","repos_url":"https://api.github.com/users/spoenemann/repos","events_url":"https://api.github.com/users/spoenemann/events{/privacy}","received_events_url":"https://api.github.com/users/spoenemann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-21T13:54:38Z","updated_at":"2016-12-22T08:37:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eclipse/elk/pulls/106","html_url":"https://github.com/eclipse/elk/pull/106","diff_url":"https://github.com/eclipse/elk/pull/106.diff","patch_url":"https://github.com/eclipse/elk/pull/106.patch"},"body":"Fixes #101.\r\n\r\nIn contrast to the older kgt format, the new elkt does not need the `persistentEntries` field for storing properties, but parses directly into the `properties` of EMapPropertyHolder (see #75).\r\n\r\nHere's an example graph:\r\n```\r\nalgorithm = org.eclipse.elk.layered\r\nedgeRouting = ORTHOGONAL\r\n\r\nnode n1 {\r\n    layout [ width = 50 height = 50 ]\r\n    nodeLabelPlacement = \"OUTSIDE H_CENTER V_BOTTOM\"\r\n    portLabelPlacement = OUTSIDE\r\n    portConstraints = FREE\r\n    label \"n1\"\r\n    \r\n    port p1 {\r\n        layout [ width = 5 height = 5 ]\r\n        label \"p1\"\r\n    }\r\n    \r\n}\r\nedge n1.p1 -> n2.p1\r\n\r\nnode n2 {\r\n    layout [ width = 50 height = 50 ]\r\n    nodeLabelPlacement = \"OUTSIDE H_CENTER V_BOTTOM\"\r\n    portLabelPlacement = INSIDE\r\n    portConstraints = FREE\r\n    label \"n2\"\r\n    \r\n    port p1 {\r\n        layout [ width = 5 height = 5 ]\r\n        label \"Ein erstes langes Port-Label\"\r\n    }\r\n    \r\n    port p2 {\r\n        layout [ width = 5 height = 5 ]\r\n        label \"Ein zweites langes Port-Label\"\r\n    }\r\n    \r\n    node n2_1 {\r\n        layout [\r\n            position = 12.807, 197\r\n            width = 50\r\n            height = 50\r\n        ]\r\n        nodeLabelPlacement = \"OUTSIDE H_CENTER V_BOTTOM\"\r\n        portLabelPlacement = INSIDE\r\n        portConstraints = FREE\r\n        label \"n2_1\"\r\n        \r\n        port p1 {\r\n            layout [ width = 5 height = 5 ]\r\n            label \"p1\"\r\n        }\r\n        \r\n        port p2 {\r\n            layout [ width = 5 height = 5 ]\r\n            label \"p2\"\r\n        }\r\n        \r\n    }\r\n    edge n2_1.p2 -> p2\r\n    edge p1 -> n2_1.p1 {\r\n        layout [\r\n            start = 32, 438\r\n            bends = 123, 438 | 123, 320 | 92, 320\r\n            end = 92, 300\r\n        ]\r\n        label \"Ich bin ein Kanten-Label\"\r\n    }\r\n}\r\n\r\nedge n2.p1, n2.p2 -> n3.p1 {\r\n    layout [\r\n        section s1 -> s3 [\r\n            incoming = n2.p1\r\n            start = 234, 345\r\n            end = 367, 456\r\n        ]\r\n        section s2 -> s3 [\r\n            incoming = n2.p2\r\n            start = 34, 354\r\n            end = 367, 456\r\n        ]\r\n        section s3 [\r\n            outgoing = n3.p1\r\n            start = 367, 456\r\n            end = 456, 708\r\n        ]\r\n    ]\r\n}\r\n\r\nnode n3 {\r\n    layout [ width = 50 height = 50 ]\r\n    nodeLabelPlacement = \"OUTSIDE H_CENTER V_BOTTOM\"\r\n    portLabelPlacement = INSIDE\r\n    portConstraints = FREE\r\n    label \"n3\"\r\n    \r\n    port p1 {\r\n        layout [ width = 5 height = 5 ]\r\n        label \"p1\"\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/eclipse/elk/issues/comments/268747682","html_url":"https://github.com/eclipse/elk/pull/106#issuecomment-268747682","issue_url":"https://api.github.com/repos/eclipse/elk/issues/106","id":268747682,"user":{"login":"spoenemann","id":4067210,"avatar_url":"https://avatars.githubusercontent.com/u/4067210?v=3","gravatar_id":"","url":"https://api.github.com/users/spoenemann","html_url":"https://github.com/spoenemann","followers_url":"https://api.github.com/users/spoenemann/followers","following_url":"https://api.github.com/users/spoenemann/following{/other_user}","gists_url":"https://api.github.com/users/spoenemann/gists{/gist_id}","starred_url":"https://api.github.com/users/spoenemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoenemann/subscriptions","organizations_url":"https://api.github.com/users/spoenemann/orgs","repos_url":"https://api.github.com/users/spoenemann/repos","events_url":"https://api.github.com/users/spoenemann/events{/privacy}","received_events_url":"https://api.github.com/users/spoenemann/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T08:37:59Z","updated_at":"2016-12-22T08:37:59Z","body":"> why is the layout defined in an explicit block while the layout options are not?\r\n\r\nThis highlights the difference between `width = 20` and `edgeRouting = ORTHOGONAL`, which might not be obvious otherwise.\r\n\r\n> why suddenly square bracket for the layout\r\n\r\nI like those more than the previous `layout:` syntax.\r\n\r\n> what about using size instead of width and height, similar to position?\r\n\r\nInitially I had a single `size` property, but then changed to `width` and `height` so they can be set individually. Or would we always set both together?\r\n\r\n> are we fine with edges being specified anywhere or should we have a convention?\r\n\r\nA validation rule as proposed by @le-cds is a good idea, but I think it should be a warning and not an error.\r\n\r\n> personally I like : more than = but I guess that's just taste\r\n\r\nOk.\r\n\r\n> Perhaps we could change the grammar such that if an edge only has a single edge section, we can simply omit the section keyword and put the section's data directly into the layout block?\r\n\r\nThat's already done, see `edge p1 -> n2_1.p1`"}}
{"actor":{"display_login":"spoenemann"}}