{"action":"created","comment":{"url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/comments/239154406","pull_request_review_id":181868815,"id":239154406,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTE1NDQwNg==","diff_hunk":"@@ -102,6 +109,99 @@ public GroovyCodeEditor(Scene scene) {\n         codeArea.setOnDragOver(this::onDragOver);\n         codeArea.setOnDragDropped(this::onDragDropped);\n         codeArea.setOnSelectionDrag(p -> allowedDrag = true);\n+\n+        positionListener = (observable, oldvalue, newvalue) -> {\n+            if (newvalue > 0) {\n+                mouseClickedBracket = codeArea.getText(newvalue - 1, newvalue);\n+                findBracketsMatches(codeArea.getText());\n+            }\n+        };\n+        codeArea.caretPositionProperty().addListener(positionListener);\n+\n+\n+    }\n+\n+   /* public boolean areBracketsMatched(String text) {\n+        ArrayDeque<Character> stack = new ArrayDeque<>();\n+        char current;\n+        char previous;\n+        for (int i = 0; i < text.length(); i++) {\n+            current = text.charAt(i);\n+            if (current == '(' || current == '[' || current == '{') {\n+                stack.push(current);\n+            } else if (current == ')' || current == ']' || current == '}') {\n+                if (stack.isEmpty()) {\n+                    return false;\n+                } else {\n+                    previous = stack.peek();\n+                    if ((current == ')' && previous == '(') || (current == ']' && previous == '[') || (current == '}' && previous == '{')) {\n+                        stack.pop();\n+                    } else {\n+                        return false;\n+                    }\n+                }\n+            }\n+        }\n+        return stack.isEmpty();\n+    }*/\n+\n+    private void findBracketsMatches(String text) {\n+        //  if(mouseClickedBracket != null ) {","path":"gse-util/src/main/java/com/powsybl/gse/util/GroovyCodeEditor.java","position":77,"original_position":77,"commit_id":"f04c102c048f30c30423f4edbc04a38d06f2e44b","original_commit_id":"f04c102c048f30c30423f4edbc04a38d06f2e44b","user":{"login":"sonarcloud[bot]","id":39514782,"node_id":"MDM6Qm90Mzk1MTQ3ODI=","avatar_url":"https://avatars2.githubusercontent.com/in/12526?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarcloud%5Bbot%5D","html_url":"https://github.com/apps/sonarcloud","followers_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/followers","following_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/repos","events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: This block of commented-out lines of code should be removed. ([squid:CommentedOutCodeLine](https://sonarcloud.io/organizations/powsybl-ci-github/rules#rule_key=squid%3ACommentedOutCodeLine))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=com.powsybl%3Apowsybl-gse&pullRequest=138&issues=AWd_VHdRcrQ7oSxgsiOk&open=AWd_VHdRcrQ7oSxgsiOk)\n\n[ISSUE_KEY]: AWd_VHdRcrQ7oSxgsiOk","created_at":"2018-12-05T17:05:05Z","updated_at":"2018-12-05T17:05:06Z","html_url":"https://github.com/powsybl/powsybl-gse/pull/138#discussion_r239154406","pull_request_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/comments/239154406"},"html":{"href":"https://github.com/powsybl/powsybl-gse/pull/138#discussion_r239154406"},"pull_request":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138","id":236250057,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MjUwMDU3","html_url":"https://github.com/powsybl/powsybl-gse/pull/138","diff_url":"https://github.com/powsybl/powsybl-gse/pull/138.diff","patch_url":"https://github.com/powsybl/powsybl-gse/pull/138.patch","issue_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/138","number":138,"state":"open","locked":false,"title":"[WIP] find and highlight brackets matches","user":{"login":"nashousni","id":42155465,"node_id":"MDQ6VXNlcjQyMTU1NDY1","avatar_url":"https://avatars1.githubusercontent.com/u/42155465?v=4","gravatar_id":"","url":"https://api.github.com/users/nashousni","html_url":"https://github.com/nashousni","followers_url":"https://api.github.com/users/nashousni/followers","following_url":"https://api.github.com/users/nashousni/following{/other_user}","gists_url":"https://api.github.com/users/nashousni/gists{/gist_id}","starred_url":"https://api.github.com/users/nashousni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nashousni/subscriptions","organizations_url":"https://api.github.com/users/nashousni/orgs","repos_url":"https://api.github.com/users/nashousni/repos","events_url":"https://api.github.com/users/nashousni/events{/privacy}","received_events_url":"https://api.github.com/users/nashousni/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-05T16:57:50Z","updated_at":"2018-12-05T17:05:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deb83adc45ebec5089db29846dac3999e60f0abc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138/commits","review_comments_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138/comments","review_comment_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/138/comments","statuses_url":"https://api.github.com/repos/powsybl/powsybl-gse/statuses/f04c102c048f30c30423f4edbc04a38d06f2e44b","head":{"label":"powsybl:edit_script_editor","ref":"edit_script_editor","sha":"f04c102c048f30c30423f4edbc04a38d06f2e44b","user":{"login":"powsybl","id":29916668,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5OTE2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/29916668?v=4","gravatar_id":"","url":"https://api.github.com/users/powsybl","html_url":"https://github.com/powsybl","followers_url":"https://api.github.com/users/powsybl/followers","following_url":"https://api.github.com/users/powsybl/following{/other_user}","gists_url":"https://api.github.com/users/powsybl/gists{/gist_id}","starred_url":"https://api.github.com/users/powsybl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powsybl/subscriptions","organizations_url":"https://api.github.com/users/powsybl/orgs","repos_url":"https://api.github.com/users/powsybl/repos","events_url":"https://api.github.com/users/powsybl/events{/privacy}","received_events_url":"https://api.github.com/users/powsybl/received_events","type":"Organization","site_admin":false},"repo":{"id":133665895,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM2NjU4OTU=","name":"powsybl-gse","full_name":"powsybl/powsybl-gse","private":false,"owner":{"login":"powsybl","id":29916668,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5OTE2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/29916668?v=4","gravatar_id":"","url":"https://api.github.com/users/powsybl","html_url":"https://github.com/powsybl","followers_url":"https://api.github.com/users/powsybl/followers","following_url":"https://api.github.com/users/powsybl/following{/other_user}","gists_url":"https://api.github.com/users/powsybl/gists{/gist_id}","starred_url":"https://api.github.com/users/powsybl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powsybl/subscriptions","organizations_url":"https://api.github.com/users/powsybl/orgs","repos_url":"https://api.github.com/users/powsybl/repos","events_url":"https://api.github.com/users/powsybl/events{/privacy}","received_events_url":"https://api.github.com/users/powsybl/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/powsybl/powsybl-gse","description":"JavaFX UI for powsybl framework","fork":false,"url":"https://api.github.com/repos/powsybl/powsybl-gse","forks_url":"https://api.github.com/repos/powsybl/powsybl-gse/forks","keys_url":"https://api.github.com/repos/powsybl/powsybl-gse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/powsybl/powsybl-gse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/powsybl/powsybl-gse/teams","hooks_url":"https://api.github.com/repos/powsybl/powsybl-gse/hooks","issue_events_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/events{/number}","events_url":"https://api.github.com/repos/powsybl/powsybl-gse/events","assignees_url":"https://api.github.com/repos/powsybl/powsybl-gse/assignees{/user}","branches_url":"https://api.github.com/repos/powsybl/powsybl-gse/branches{/branch}","tags_url":"https://api.github.com/repos/powsybl/powsybl-gse/tags","blobs_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/refs{/sha}","trees_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/powsybl/powsybl-gse/statuses/{sha}","languages_url":"https://api.github.com/repos/powsybl/powsybl-gse/languages","stargazers_url":"https://api.github.com/repos/powsybl/powsybl-gse/stargazers","contributors_url":"https://api.github.com/repos/powsybl/powsybl-gse/contributors","subscribers_url":"https://api.github.com/repos/powsybl/powsybl-gse/subscribers","subscription_url":"https://api.github.com/repos/powsybl/powsybl-gse/subscription","commits_url":"https://api.github.com/repos/powsybl/powsybl-gse/commits{/sha}","git_commits_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/commits{/sha}","comments_url":"https://api.github.com/repos/powsybl/powsybl-gse/comments{/number}","issue_comment_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/comments{/number}","contents_url":"https://api.github.com/repos/powsybl/powsybl-gse/contents/{+path}","compare_url":"https://api.github.com/repos/powsybl/powsybl-gse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/powsybl/powsybl-gse/merges","archive_url":"https://api.github.com/repos/powsybl/powsybl-gse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/powsybl/powsybl-gse/downloads","issues_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues{/number}","pulls_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls{/number}","milestones_url":"https://api.github.com/repos/powsybl/powsybl-gse/milestones{/number}","notifications_url":"https://api.github.com/repos/powsybl/powsybl-gse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/powsybl/powsybl-gse/labels{/name}","releases_url":"https://api.github.com/repos/powsybl/powsybl-gse/releases{/id}","deployments_url":"https://api.github.com/repos/powsybl/powsybl-gse/deployments","created_at":"2018-05-16T12:57:10Z","updated_at":"2018-12-04T06:21:31Z","pushed_at":"2018-12-05T16:57:51Z","git_url":"git://github.com/powsybl/powsybl-gse.git","ssh_url":"git@github.com:powsybl/powsybl-gse.git","clone_url":"https://github.com/powsybl/powsybl-gse.git","svn_url":"https://github.com/powsybl/powsybl-gse","homepage":"http://www.powsybl.com","size":732,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":1,"open_issues":27,"watchers":5,"default_branch":"master"}},"base":{"label":"powsybl:master","ref":"master","sha":"5533e4529ad8249097cde4a6becdf0213e8f5cba","user":{"login":"powsybl","id":29916668,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5OTE2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/29916668?v=4","gravatar_id":"","url":"https://api.github.com/users/powsybl","html_url":"https://github.com/powsybl","followers_url":"https://api.github.com/users/powsybl/followers","following_url":"https://api.github.com/users/powsybl/following{/other_user}","gists_url":"https://api.github.com/users/powsybl/gists{/gist_id}","starred_url":"https://api.github.com/users/powsybl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powsybl/subscriptions","organizations_url":"https://api.github.com/users/powsybl/orgs","repos_url":"https://api.github.com/users/powsybl/repos","events_url":"https://api.github.com/users/powsybl/events{/privacy}","received_events_url":"https://api.github.com/users/powsybl/received_events","type":"Organization","site_admin":false},"repo":{"id":133665895,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM2NjU4OTU=","name":"powsybl-gse","full_name":"powsybl/powsybl-gse","private":false,"owner":{"login":"powsybl","id":29916668,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5OTE2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/29916668?v=4","gravatar_id":"","url":"https://api.github.com/users/powsybl","html_url":"https://github.com/powsybl","followers_url":"https://api.github.com/users/powsybl/followers","following_url":"https://api.github.com/users/powsybl/following{/other_user}","gists_url":"https://api.github.com/users/powsybl/gists{/gist_id}","starred_url":"https://api.github.com/users/powsybl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powsybl/subscriptions","organizations_url":"https://api.github.com/users/powsybl/orgs","repos_url":"https://api.github.com/users/powsybl/repos","events_url":"https://api.github.com/users/powsybl/events{/privacy}","received_events_url":"https://api.github.com/users/powsybl/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/powsybl/powsybl-gse","description":"JavaFX UI for powsybl framework","fork":false,"url":"https://api.github.com/repos/powsybl/powsybl-gse","forks_url":"https://api.github.com/repos/powsybl/powsybl-gse/forks","keys_url":"https://api.github.com/repos/powsybl/powsybl-gse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/powsybl/powsybl-gse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/powsybl/powsybl-gse/teams","hooks_url":"https://api.github.com/repos/powsybl/powsybl-gse/hooks","issue_events_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/events{/number}","events_url":"https://api.github.com/repos/powsybl/powsybl-gse/events","assignees_url":"https://api.github.com/repos/powsybl/powsybl-gse/assignees{/user}","branches_url":"https://api.github.com/repos/powsybl/powsybl-gse/branches{/branch}","tags_url":"https://api.github.com/repos/powsybl/powsybl-gse/tags","blobs_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/refs{/sha}","trees_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/powsybl/powsybl-gse/statuses/{sha}","languages_url":"https://api.github.com/repos/powsybl/powsybl-gse/languages","stargazers_url":"https://api.github.com/repos/powsybl/powsybl-gse/stargazers","contributors_url":"https://api.github.com/repos/powsybl/powsybl-gse/contributors","subscribers_url":"https://api.github.com/repos/powsybl/powsybl-gse/subscribers","subscription_url":"https://api.github.com/repos/powsybl/powsybl-gse/subscription","commits_url":"https://api.github.com/repos/powsybl/powsybl-gse/commits{/sha}","git_commits_url":"https://api.github.com/repos/powsybl/powsybl-gse/git/commits{/sha}","comments_url":"https://api.github.com/repos/powsybl/powsybl-gse/comments{/number}","issue_comment_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues/comments{/number}","contents_url":"https://api.github.com/repos/powsybl/powsybl-gse/contents/{+path}","compare_url":"https://api.github.com/repos/powsybl/powsybl-gse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/powsybl/powsybl-gse/merges","archive_url":"https://api.github.com/repos/powsybl/powsybl-gse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/powsybl/powsybl-gse/downloads","issues_url":"https://api.github.com/repos/powsybl/powsybl-gse/issues{/number}","pulls_url":"https://api.github.com/repos/powsybl/powsybl-gse/pulls{/number}","milestones_url":"https://api.github.com/repos/powsybl/powsybl-gse/milestones{/number}","notifications_url":"https://api.github.com/repos/powsybl/powsybl-gse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/powsybl/powsybl-gse/labels{/name}","releases_url":"https://api.github.com/repos/powsybl/powsybl-gse/releases{/id}","deployments_url":"https://api.github.com/repos/powsybl/powsybl-gse/deployments","created_at":"2018-05-16T12:57:10Z","updated_at":"2018-12-04T06:21:31Z","pushed_at":"2018-12-05T16:57:51Z","git_url":"git://github.com/powsybl/powsybl-gse.git","ssh_url":"git@github.com:powsybl/powsybl-gse.git","clone_url":"https://github.com/powsybl/powsybl-gse.git","svn_url":"https://github.com/powsybl/powsybl-gse","homepage":"http://www.powsybl.com","size":732,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":1,"open_issues":27,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138"},"html":{"href":"https://github.com/powsybl/powsybl-gse/pull/138"},"issue":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/issues/138"},"comments":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/powsybl/powsybl-gse/statuses/f04c102c048f30c30423f4edbc04a38d06f2e44b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sonarcloud"}}