{"action":"created","comment":{"url":"https://api.github.com/repos/wandernauta/Groep10/pulls/comments/28259220","id":28259220,"diff_hunk":"@@ -175,18 +182,22 @@ public final void changed(ObservableValue<? extends Number> observable,\n \n \tpublic final void disconnect(ConnectionAnchor anchor) {\n \t\tif (startAnchor.isPresent() && startAnchor.get().equals(anchor)) {\n-\t\t\tstartAnchor.get().disconnect(this);\n+\t\t\tstartAnchor.get().disconnectFrom(this);\n \t\t\tstartAnchor = Optional.empty();\n \t\t}\n \t\tif (endAnchor.isPresent() && endAnchor.get().equals(anchor)) {\n-\t\t\tendAnchor.get().disconnect(this);\n+\t\t\tendAnchor.get().disconnectFrom(this);\n \t\t\tendAnchor = Optional.empty();\n \t\t}\n \t}\n+\t\n+\tpublic final void disconnect(Optional<? extends ConnectionAnchor> anchor){\n+\t\tdisconnect(anchor.orElse(null));\n+\t}\n \n \tpublic final void disconnect() {\n-\t\tdisconnect(startAnchor.orElse(null));\n-\t\tdisconnect(endAnchor.orElse(null));\n+\t\tdisconnect(startAnchor);\n+\t\tdisconnect(endAnchor);","path":"Code/src/main/java/nl/utwente/group10/ui/components/Connection.java","position":68,"original_position":68,"commit_id":"9fa562f8d77c9b52b6e839003928148184aeee3c","original_commit_id":"59f568e985fbcbe296e99f40de004dacb676beba","user":{"login":"wandernauta","id":126832,"avatar_url":"https://avatars.githubusercontent.com/u/126832?v=3","gravatar_id":"","url":"https://api.github.com/users/wandernauta","html_url":"https://github.com/wandernauta","followers_url":"https://api.github.com/users/wandernauta/followers","following_url":"https://api.github.com/users/wandernauta/following{/other_user}","gists_url":"https://api.github.com/users/wandernauta/gists{/gist_id}","starred_url":"https://api.github.com/users/wandernauta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandernauta/subscriptions","organizations_url":"https://api.github.com/users/wandernauta/orgs","repos_url":"https://api.github.com/users/wandernauta/repos","events_url":"https://api.github.com/users/wandernauta/events{/privacy}","received_events_url":"https://api.github.com/users/wandernauta/received_events","type":"User","site_admin":false},"body":"Ja, precies. `startAnchor` en `endAnchor` zijn `Optional<Anchor>`s. Als je van `disconnect(Anchor)` een methode maakt die niks anders doet dan `disconnect(Optional<Anchor>)` aanroept kun je de logica daarnaartoe verplaatsen en vereenvoudigen.","created_at":"2015-04-13T17:31:47Z","updated_at":"2015-04-13T17:31:47Z","html_url":"https://github.com/wandernauta/Groep10/pull/45#discussion_r28259220","pull_request_url":"https://api.github.com/repos/wandernauta/Groep10/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/comments/28259220"},"html":{"href":"https://github.com/wandernauta/Groep10/pull/45#discussion_r28259220"},"pull_request":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/wandernauta/Groep10/pulls/45","id":33182158,"html_url":"https://github.com/wandernauta/Groep10/pull/45","diff_url":"https://github.com/wandernauta/Groep10/pull/45.diff","patch_url":"https://github.com/wandernauta/Groep10/pull/45.patch","issue_url":"https://api.github.com/repos/wandernauta/Groep10/issues/45","number":45,"state":"open","locked":false,"title":"Ui touch test","user":{"login":"i3anaan","id":2911348,"avatar_url":"https://avatars.githubusercontent.com/u/2911348?v=3","gravatar_id":"","url":"https://api.github.com/users/i3anaan","html_url":"https://github.com/i3anaan","followers_url":"https://api.github.com/users/i3anaan/followers","following_url":"https://api.github.com/users/i3anaan/following{/other_user}","gists_url":"https://api.github.com/users/i3anaan/gists{/gist_id}","starred_url":"https://api.github.com/users/i3anaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i3anaan/subscriptions","organizations_url":"https://api.github.com/users/i3anaan/orgs","repos_url":"https://api.github.com/users/i3anaan/repos","events_url":"https://api.github.com/users/i3anaan/events{/privacy}","received_events_url":"https://api.github.com/users/i3anaan/received_events","type":"User","site_admin":false},"body":"Hiermee zou het lijntjes tekenen volledig moeten werken op het multi touch scherm\r\nHet maakt enkel nog gebruik van Press, Move en Release, ook bij de muis.\r\nDaarnaast een optie toegevoegd om bezette anchors te kunnen overschrijven.\r\nEn een refactor van InputAnchorHandler en OutputAnchorHandler in een AnchorHandler klasse\r\nEn ik heb een eclipse organize imports gedaan (vandaar zoveel veranderde files)","created_at":"2015-04-13T16:58:14Z","updated_at":"2015-04-13T17:31:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dfca89f4613cdf8b3dd518e00374936853520ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wandernauta/Groep10/pulls/45/commits","review_comments_url":"https://api.github.com/repos/wandernauta/Groep10/pulls/45/comments","review_comment_url":"https://api.github.com/repos/wandernauta/Groep10/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wandernauta/Groep10/issues/45/comments","statuses_url":"https://api.github.com/repos/wandernauta/Groep10/statuses/9fa562f8d77c9b52b6e839003928148184aeee3c","head":{"label":"wandernauta:ui-touch-test","ref":"ui-touch-test","sha":"9fa562f8d77c9b52b6e839003928148184aeee3c","user":{"login":"wandernauta","id":126832,"avatar_url":"https://avatars.githubusercontent.com/u/126832?v=3","gravatar_id":"","url":"https://api.github.com/users/wandernauta","html_url":"https://github.com/wandernauta","followers_url":"https://api.github.com/users/wandernauta/followers","following_url":"https://api.github.com/users/wandernauta/following{/other_user}","gists_url":"https://api.github.com/users/wandernauta/gists{/gist_id}","starred_url":"https://api.github.com/users/wandernauta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandernauta/subscriptions","organizations_url":"https://api.github.com/users/wandernauta/orgs","repos_url":"https://api.github.com/users/wandernauta/repos","events_url":"https://api.github.com/users/wandernauta/events{/privacy}","received_events_url":"https://api.github.com/users/wandernauta/received_events","type":"User","site_admin":false},"repo":{"id":30242992,"name":"Groep10","full_name":"wandernauta/Groep10","owner":{"login":"wandernauta","id":126832,"avatar_url":"https://avatars.githubusercontent.com/u/126832?v=3","gravatar_id":"","url":"https://api.github.com/users/wandernauta","html_url":"https://github.com/wandernauta","followers_url":"https://api.github.com/users/wandernauta/followers","following_url":"https://api.github.com/users/wandernauta/following{/other_user}","gists_url":"https://api.github.com/users/wandernauta/gists{/gist_id}","starred_url":"https://api.github.com/users/wandernauta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandernauta/subscriptions","organizations_url":"https://api.github.com/users/wandernauta/orgs","repos_url":"https://api.github.com/users/wandernauta/repos","events_url":"https://api.github.com/users/wandernauta/events{/privacy}","received_events_url":"https://api.github.com/users/wandernauta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wandernauta/Groep10","description":"Ontwerpproject.","fork":false,"url":"https://api.github.com/repos/wandernauta/Groep10","forks_url":"https://api.github.com/repos/wandernauta/Groep10/forks","keys_url":"https://api.github.com/repos/wandernauta/Groep10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wandernauta/Groep10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wandernauta/Groep10/teams","hooks_url":"https://api.github.com/repos/wandernauta/Groep10/hooks","issue_events_url":"https://api.github.com/repos/wandernauta/Groep10/issues/events{/number}","events_url":"https://api.github.com/repos/wandernauta/Groep10/events","assignees_url":"https://api.github.com/repos/wandernauta/Groep10/assignees{/user}","branches_url":"https://api.github.com/repos/wandernauta/Groep10/branches{/branch}","tags_url":"https://api.github.com/repos/wandernauta/Groep10/tags","blobs_url":"https://api.github.com/repos/wandernauta/Groep10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wandernauta/Groep10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wandernauta/Groep10/git/refs{/sha}","trees_url":"https://api.github.com/repos/wandernauta/Groep10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wandernauta/Groep10/statuses/{sha}","languages_url":"https://api.github.com/repos/wandernauta/Groep10/languages","stargazers_url":"https://api.github.com/repos/wandernauta/Groep10/stargazers","contributors_url":"https://api.github.com/repos/wandernauta/Groep10/contributors","subscribers_url":"https://api.github.com/repos/wandernauta/Groep10/subscribers","subscription_url":"https://api.github.com/repos/wandernauta/Groep10/subscription","commits_url":"https://api.github.com/repos/wandernauta/Groep10/commits{/sha}","git_commits_url":"https://api.github.com/repos/wandernauta/Groep10/git/commits{/sha}","comments_url":"https://api.github.com/repos/wandernauta/Groep10/comments{/number}","issue_comment_url":"https://api.github.com/repos/wandernauta/Groep10/issues/comments{/number}","contents_url":"https://api.github.com/repos/wandernauta/Groep10/contents/{+path}","compare_url":"https://api.github.com/repos/wandernauta/Groep10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wandernauta/Groep10/merges","archive_url":"https://api.github.com/repos/wandernauta/Groep10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wandernauta/Groep10/downloads","issues_url":"https://api.github.com/repos/wandernauta/Groep10/issues{/number}","pulls_url":"https://api.github.com/repos/wandernauta/Groep10/pulls{/number}","milestones_url":"https://api.github.com/repos/wandernauta/Groep10/milestones{/number}","notifications_url":"https://api.github.com/repos/wandernauta/Groep10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wandernauta/Groep10/labels{/name}","releases_url":"https://api.github.com/repos/wandernauta/Groep10/releases{/id}","created_at":"2015-02-03T13:04:49Z","updated_at":"2015-04-12T15:30:16Z","pushed_at":"2015-04-13T17:30:48Z","git_url":"git://github.com/wandernauta/Groep10.git","ssh_url":"git@github.com:wandernauta/Groep10.git","clone_url":"https://github.com/wandernauta/Groep10.git","svn_url":"https://github.com/wandernauta/Groep10","homepage":null,"size":3284,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wandernauta:master","ref":"master","sha":"c323aa89582413c3e09682d3ab1e07c1d8899a72","user":{"login":"wandernauta","id":126832,"avatar_url":"https://avatars.githubusercontent.com/u/126832?v=3","gravatar_id":"","url":"https://api.github.com/users/wandernauta","html_url":"https://github.com/wandernauta","followers_url":"https://api.github.com/users/wandernauta/followers","following_url":"https://api.github.com/users/wandernauta/following{/other_user}","gists_url":"https://api.github.com/users/wandernauta/gists{/gist_id}","starred_url":"https://api.github.com/users/wandernauta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandernauta/subscriptions","organizations_url":"https://api.github.com/users/wandernauta/orgs","repos_url":"https://api.github.com/users/wandernauta/repos","events_url":"https://api.github.com/users/wandernauta/events{/privacy}","received_events_url":"https://api.github.com/users/wandernauta/received_events","type":"User","site_admin":false},"repo":{"id":30242992,"name":"Groep10","full_name":"wandernauta/Groep10","owner":{"login":"wandernauta","id":126832,"avatar_url":"https://avatars.githubusercontent.com/u/126832?v=3","gravatar_id":"","url":"https://api.github.com/users/wandernauta","html_url":"https://github.com/wandernauta","followers_url":"https://api.github.com/users/wandernauta/followers","following_url":"https://api.github.com/users/wandernauta/following{/other_user}","gists_url":"https://api.github.com/users/wandernauta/gists{/gist_id}","starred_url":"https://api.github.com/users/wandernauta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wandernauta/subscriptions","organizations_url":"https://api.github.com/users/wandernauta/orgs","repos_url":"https://api.github.com/users/wandernauta/repos","events_url":"https://api.github.com/users/wandernauta/events{/privacy}","received_events_url":"https://api.github.com/users/wandernauta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wandernauta/Groep10","description":"Ontwerpproject.","fork":false,"url":"https://api.github.com/repos/wandernauta/Groep10","forks_url":"https://api.github.com/repos/wandernauta/Groep10/forks","keys_url":"https://api.github.com/repos/wandernauta/Groep10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wandernauta/Groep10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wandernauta/Groep10/teams","hooks_url":"https://api.github.com/repos/wandernauta/Groep10/hooks","issue_events_url":"https://api.github.com/repos/wandernauta/Groep10/issues/events{/number}","events_url":"https://api.github.com/repos/wandernauta/Groep10/events","assignees_url":"https://api.github.com/repos/wandernauta/Groep10/assignees{/user}","branches_url":"https://api.github.com/repos/wandernauta/Groep10/branches{/branch}","tags_url":"https://api.github.com/repos/wandernauta/Groep10/tags","blobs_url":"https://api.github.com/repos/wandernauta/Groep10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wandernauta/Groep10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wandernauta/Groep10/git/refs{/sha}","trees_url":"https://api.github.com/repos/wandernauta/Groep10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wandernauta/Groep10/statuses/{sha}","languages_url":"https://api.github.com/repos/wandernauta/Groep10/languages","stargazers_url":"https://api.github.com/repos/wandernauta/Groep10/stargazers","contributors_url":"https://api.github.com/repos/wandernauta/Groep10/contributors","subscribers_url":"https://api.github.com/repos/wandernauta/Groep10/subscribers","subscription_url":"https://api.github.com/repos/wandernauta/Groep10/subscription","commits_url":"https://api.github.com/repos/wandernauta/Groep10/commits{/sha}","git_commits_url":"https://api.github.com/repos/wandernauta/Groep10/git/commits{/sha}","comments_url":"https://api.github.com/repos/wandernauta/Groep10/comments{/number}","issue_comment_url":"https://api.github.com/repos/wandernauta/Groep10/issues/comments{/number}","contents_url":"https://api.github.com/repos/wandernauta/Groep10/contents/{+path}","compare_url":"https://api.github.com/repos/wandernauta/Groep10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wandernauta/Groep10/merges","archive_url":"https://api.github.com/repos/wandernauta/Groep10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wandernauta/Groep10/downloads","issues_url":"https://api.github.com/repos/wandernauta/Groep10/issues{/number}","pulls_url":"https://api.github.com/repos/wandernauta/Groep10/pulls{/number}","milestones_url":"https://api.github.com/repos/wandernauta/Groep10/milestones{/number}","notifications_url":"https://api.github.com/repos/wandernauta/Groep10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wandernauta/Groep10/labels{/name}","releases_url":"https://api.github.com/repos/wandernauta/Groep10/releases{/id}","created_at":"2015-02-03T13:04:49Z","updated_at":"2015-04-12T15:30:16Z","pushed_at":"2015-04-13T17:30:48Z","git_url":"git://github.com/wandernauta/Groep10.git","ssh_url":"git@github.com:wandernauta/Groep10.git","clone_url":"https://github.com/wandernauta/Groep10.git","svn_url":"https://github.com/wandernauta/Groep10","homepage":null,"size":3284,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/45"},"html":{"href":"https://github.com/wandernauta/Groep10/pull/45"},"issue":{"href":"https://api.github.com/repos/wandernauta/Groep10/issues/45"},"comments":{"href":"https://api.github.com/repos/wandernauta/Groep10/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wandernauta/Groep10/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/wandernauta/Groep10/statuses/9fa562f8d77c9b52b6e839003928148184aeee3c"}}}}