{"action":"created","issue":{"url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/385","repository_url":"https://api.github.com/repos/ELTE-Soft/txtUML","labels_url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/385/comments","events_url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/385/events","html_url":"https://github.com/ELTE-Soft/txtUML/issues/385","id":163883433,"number":385,"title":"Revise support for action methods in XtxtUML","user":{"login":"djnemeth","id":13290204,"avatar_url":"https://avatars.githubusercontent.com/u/13290204?v=3","gravatar_id":"","url":"https://api.github.com/users/djnemeth","html_url":"https://github.com/djnemeth","followers_url":"https://api.github.com/users/djnemeth/followers","following_url":"https://api.github.com/users/djnemeth/following{/other_user}","gists_url":"https://api.github.com/users/djnemeth/gists{/gist_id}","starred_url":"https://api.github.com/users/djnemeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djnemeth/subscriptions","organizations_url":"https://api.github.com/users/djnemeth/orgs","repos_url":"https://api.github.com/users/djnemeth/repos","events_url":"https://api.github.com/users/djnemeth/events{/privacy}","received_events_url":"https://api.github.com/users/djnemeth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ELTE-Soft/txtUML/labels/category:XtxtUML","name":"category:XtxtUML","color":"d4c5f9"},{"url":"https://api.github.com/repos/ELTE-Soft/txtUML/labels/prio:minor","name":"prio:minor","color":"fad8c7"},{"url":"https://api.github.com/repos/ELTE-Soft/txtUML/labels/type:enhancement","name":"type:enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"djnemeth","id":13290204,"avatar_url":"https://avatars.githubusercontent.com/u/13290204?v=3","gravatar_id":"","url":"https://api.github.com/users/djnemeth","html_url":"https://github.com/djnemeth","followers_url":"https://api.github.com/users/djnemeth/followers","following_url":"https://api.github.com/users/djnemeth/following{/other_user}","gists_url":"https://api.github.com/users/djnemeth/gists{/gist_id}","starred_url":"https://api.github.com/users/djnemeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djnemeth/subscriptions","organizations_url":"https://api.github.com/users/djnemeth/orgs","repos_url":"https://api.github.com/users/djnemeth/repos","events_url":"https://api.github.com/users/djnemeth/events{/privacy}","received_events_url":"https://api.github.com/users/djnemeth/received_events","type":"User","site_admin":false},"assignees":[{"login":"djnemeth","id":13290204,"avatar_url":"https://avatars.githubusercontent.com/u/13290204?v=3","gravatar_id":"","url":"https://api.github.com/users/djnemeth","html_url":"https://github.com/djnemeth","followers_url":"https://api.github.com/users/djnemeth/followers","following_url":"https://api.github.com/users/djnemeth/following{/other_user}","gists_url":"https://api.github.com/users/djnemeth/gists{/gist_id}","starred_url":"https://api.github.com/users/djnemeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djnemeth/subscriptions","organizations_url":"https://api.github.com/users/djnemeth/orgs","repos_url":"https://api.github.com/users/djnemeth/repos","events_url":"https://api.github.com/users/djnemeth/events{/privacy}","received_events_url":"https://api.github.com/users/djnemeth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-05T15:49:31Z","updated_at":"2016-07-12T10:20:05Z","closed_at":null,"body":"The following table shows the action methods available in JtxtUML and their XtxtUML-specific alternatives. Please note that JtxtUML action methods can be used as conventional methods inside XtxtUML nevertheless — this issue is strictly about XtxtUML-specific *language elements* to be provided instead of / along conventional API method calls.\r\n\r\n| JtxtUML action method | XtxtUML-specific alternative |\r\n| ---------- | ----------- |\r\n| [`create(«type», «ctor args...»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L53) | — |\r\n| [`createWithName(«type», «name», «ctor args...»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L83) | — |\r\n| [`delete(«object»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L103) | `delete «object»` |\r\n| [`connect(«endA», «portA», «endB», «portB»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L125) | — |\r\n| [`connect(«parentPort», «childEnd», «childPort»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L145) | — |\r\n| [`link(«endA», «objA», «endB», «objB»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L174) | — |\r\n| [`unlink(«endA», «objA», «endB», «objB»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L201) | — |\r\n| [`start(«object»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L217) | — |\r\n| [`send(«signal», «reception»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L241) | `send «signal» to «port»` |\r\n| [`send(«signal», «object»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L259) | `send «signal» to «object»` |\r\n| [`log(«message»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L269) | — |\r\n| [`logError(«message»)`](https://github.com/ELTE-Soft/txtUML/blob/c94570311efb3ca1a1c8ee728cc0b6ef2daf912c/dev/plugins/hu.elte.txtuml.api.model/src/hu/elte/txtuml/api/model/Action.java#L279) | — |\r\n\r\nWe should consider the following:\r\n\r\n- It can be seen that XtxtUML-specific action support is not extensive, to put it mildly.\r\n- It's clearly inconsistent that we provide a keyword for `delete`, but not for `start`, `log` and `logError`.\r\n- Introducing new language elements would extend our already long list of keywords, which could cause additional nuisance for our users.\r\n- Getting rid of all action-related XtxtUML elements and relying only on JtxtUML-provided action methods would be an option as well.\r\n- Being able to use port instances instead of receptions is a crucial advantage of the XtxtUML-specific `send` statement. See the following example:\r\n\r\n  JtxtUML:\r\n  ```Java\r\nAction.send(new Tick(), port(OutTickPort.class).required::reception);\r\n  ```\r\n  XtxtUML:\r\n  ```Java\r\nsend new Tick() to this->(OutTickPort);\r\n  ```\r\nTherefore I don't recommend scrapping XtxtUML action elements in general.\r\n- Even if we introduced keywords for all *syntactically simple* JtxtUML actions (i.e. `start`, `delete`, `log` and `logError`), it would still be difficult to find suitable keyword-simplifications for *syntactically complex* actions (i.e. `create`, `createWithName`, `connect`, `link` and `unlink`). Of course, we could make the choice that complex actions would be made available only through JtxtUML methods, as it is in the current implementation. (This seems a bit inconsistent for me, though.)\r\n\r\nIn summary, the questions are:\r\n\r\n1. Should we provide XtxtUML-specific action elements *only* for signal sending?\r\n2. If no, which other action methods do you think we should provide language elements for? Do you have any suggestions regarding the syntax?\r\n\r\n@ELTE-Soft/all, what's your opinion?"},"comment":{"url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/comments/231998769","html_url":"https://github.com/ELTE-Soft/txtUML/issues/385#issuecomment-231998769","issue_url":"https://api.github.com/repos/ELTE-Soft/txtUML/issues/385","id":231998769,"user":{"login":"djnemeth","id":13290204,"avatar_url":"https://avatars.githubusercontent.com/u/13290204?v=3","gravatar_id":"","url":"https://api.github.com/users/djnemeth","html_url":"https://github.com/djnemeth","followers_url":"https://api.github.com/users/djnemeth/followers","following_url":"https://api.github.com/users/djnemeth/following{/other_user}","gists_url":"https://api.github.com/users/djnemeth/gists{/gist_id}","starred_url":"https://api.github.com/users/djnemeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djnemeth/subscriptions","organizations_url":"https://api.github.com/users/djnemeth/orgs","repos_url":"https://api.github.com/users/djnemeth/repos","events_url":"https://api.github.com/users/djnemeth/events{/privacy}","received_events_url":"https://api.github.com/users/djnemeth/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T10:20:05Z","updated_at":"2016-07-12T10:20:05Z","body":"As far as I know, Java's `new` operator can be used instead of `Action.create`. Due to static validation, currently it seems to be safer than our action method. @kovacsgabor, I have distant memories about you saying that it's worth it nevertheless, but I don't remember why. Can you tell me what its advantages are?"}}
{"actor":{"display_login":"djnemeth"}}