{"action":"created","comment":{"url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/comments/154525935","pull_request_review_id":80703252,"id":154525935,"diff_hunk":"@@ -0,0 +1,267 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ */\n+\n+package com.googlecode.jmeter.plugins.webdriver.sampler.gui;\n+\n+import java.awt.Font;\n+import java.awt.HeadlessException;\n+import java.io.IOException;\n+import java.util.Properties;\n+\n+import org.apache.jmeter.util.JMeterUtils;\n+import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;\n+import org.fife.ui.rsyntaxtextarea.SyntaxConstants;\n+import org.fife.ui.rsyntaxtextarea.Theme;\n+import org.fife.ui.rtextarea.RUndoManager;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+/**\n+ * Utility class to handle RSyntaxTextArea code\n+ * It's not currently possible to instantiate the RSyntaxTextArea class when running headless.\n+ * So we use getInstance methods to create the class and allow for headless testing.\n+ */\n+class JSyntaxTextArea extends RSyntaxTextArea {\n+\n+    private static final long serialVersionUID = 211L;\n+    private static final Logger log              = LoggerFactory.getLogger(JSyntaxTextArea.class);\n+\n+    private static final Theme DARCULA_THEME = initTheme(); ","path":"plugins/webdriver/src/main/java/com/googlecode/jmeter/plugins/webdriver/sampler/gui/JSyntaxTextArea.java","position":44,"original_position":44,"commit_id":"fba9460ca8b0d58c88e52f3c86f7286283ebb421","original_commit_id":"fba9460ca8b0d58c88e52f3c86f7286283ebb421","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid unused private fields such as 'DARCULA_THEME'.](https://www.codacy.com/app/apc4/jmeter-plugins/pullRequest?prid=1126265)","created_at":"2017-12-03T14:47:57Z","updated_at":"2017-12-03T14:47:57Z","html_url":"https://github.com/undera/jmeter-plugins/pull/200#discussion_r154525935","pull_request_url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/comments/154525935"},"html":{"href":"https://github.com/undera/jmeter-plugins/pull/200#discussion_r154525935"},"pull_request":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200"}}},"pull_request":{"url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200","id":156029146,"html_url":"https://github.com/undera/jmeter-plugins/pull/200","diff_url":"https://github.com/undera/jmeter-plugins/pull/200.diff","patch_url":"https://github.com/undera/jmeter-plugins/pull/200.patch","issue_url":"https://api.github.com/repos/undera/jmeter-plugins/issues/200","number":200,"state":"open","locked":false,"title":"Fix bug ReferenceError when using Groovy and use JSyntaxtTextArea ins…","user":{"login":"pmouawad","id":3127467,"avatar_url":"https://avatars1.githubusercontent.com/u/3127467?v=4","gravatar_id":"","url":"https://api.github.com/users/pmouawad","html_url":"https://github.com/pmouawad","followers_url":"https://api.github.com/users/pmouawad/followers","following_url":"https://api.github.com/users/pmouawad/following{/other_user}","gists_url":"https://api.github.com/users/pmouawad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmouawad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmouawad/subscriptions","organizations_url":"https://api.github.com/users/pmouawad/orgs","repos_url":"https://api.github.com/users/pmouawad/repos","events_url":"https://api.github.com/users/pmouawad/events{/privacy}","received_events_url":"https://api.github.com/users/pmouawad/received_events","type":"User","site_admin":false},"body":"…tead of JEditor\r\n\r\nThis PR fixes the bug reported on google group.\r\nSampler has possibility to select an alternative to javascript, but when you select Groovy\r\nan error occurs when selecting another element and then select WDS again, see attached screenshot.\r\n\r\nIssue was due to DefaultSyntaxKit.initKit(). \r\nSo I switched to the JSyntaxtTextArea component which is anyway more uniform.\r\nNote that it would be nice to drop 2.13 support which would allow using JMeter core JSyntaxTextArea#getInstance() which will handle correctly the new Darcula LAF.\r\n\r\nRegards\r\nPhilippe M. from UbikLoadPack Team","created_at":"2017-12-02T20:10:51Z","updated_at":"2017-12-03T14:47:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcf5454eb2da8b5a9a19921bea0f51f157f71936","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200/commits","review_comments_url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200/comments","review_comment_url":"https://api.github.com/repos/undera/jmeter-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/undera/jmeter-plugins/issues/200/comments","statuses_url":"https://api.github.com/repos/undera/jmeter-plugins/statuses/fba9460ca8b0d58c88e52f3c86f7286283ebb421","head":{"label":"pmouawad:fix_webdriver_gui_bug_with_groovy","ref":"fix_webdriver_gui_bug_with_groovy","sha":"fba9460ca8b0d58c88e52f3c86f7286283ebb421","user":{"login":"pmouawad","id":3127467,"avatar_url":"https://avatars1.githubusercontent.com/u/3127467?v=4","gravatar_id":"","url":"https://api.github.com/users/pmouawad","html_url":"https://github.com/pmouawad","followers_url":"https://api.github.com/users/pmouawad/followers","following_url":"https://api.github.com/users/pmouawad/following{/other_user}","gists_url":"https://api.github.com/users/pmouawad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmouawad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmouawad/subscriptions","organizations_url":"https://api.github.com/users/pmouawad/orgs","repos_url":"https://api.github.com/users/pmouawad/repos","events_url":"https://api.github.com/users/pmouawad/events{/privacy}","received_events_url":"https://api.github.com/users/pmouawad/received_events","type":"User","site_admin":false},"repo":{"id":74067054,"name":"jmeter-plugins","full_name":"pmouawad/jmeter-plugins","owner":{"login":"pmouawad","id":3127467,"avatar_url":"https://avatars1.githubusercontent.com/u/3127467?v=4","gravatar_id":"","url":"https://api.github.com/users/pmouawad","html_url":"https://github.com/pmouawad","followers_url":"https://api.github.com/users/pmouawad/followers","following_url":"https://api.github.com/users/pmouawad/following{/other_user}","gists_url":"https://api.github.com/users/pmouawad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmouawad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmouawad/subscriptions","organizations_url":"https://api.github.com/users/pmouawad/orgs","repos_url":"https://api.github.com/users/pmouawad/repos","events_url":"https://api.github.com/users/pmouawad/events{/privacy}","received_events_url":"https://api.github.com/users/pmouawad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmouawad/jmeter-plugins","description":"JMeter Plugins","fork":true,"url":"https://api.github.com/repos/pmouawad/jmeter-plugins","forks_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/forks","keys_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/teams","hooks_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/hooks","issue_events_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/events","assignees_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/tags","blobs_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/languages","stargazers_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/stargazers","contributors_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/contributors","subscribers_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/subscribers","subscription_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/subscription","commits_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/merges","archive_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/downloads","issues_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/labels{/name}","releases_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/pmouawad/jmeter-plugins/deployments","created_at":"2016-11-17T21:00:31Z","updated_at":"2016-11-17T21:00:34Z","pushed_at":"2017-12-03T14:44:14Z","git_url":"git://github.com/pmouawad/jmeter-plugins.git","ssh_url":"git@github.com:pmouawad/jmeter-plugins.git","clone_url":"https://github.com/pmouawad/jmeter-plugins.git","svn_url":"https://github.com/pmouawad/jmeter-plugins","homepage":"http://jmeter-plugins.org","size":21884,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"undera:master","ref":"master","sha":"c736d275a60bb00dc960353f6eb6799e2b04d174","user":{"login":"undera","id":2026469,"avatar_url":"https://avatars0.githubusercontent.com/u/2026469?v=4","gravatar_id":"","url":"https://api.github.com/users/undera","html_url":"https://github.com/undera","followers_url":"https://api.github.com/users/undera/followers","following_url":"https://api.github.com/users/undera/following{/other_user}","gists_url":"https://api.github.com/users/undera/gists{/gist_id}","starred_url":"https://api.github.com/users/undera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/undera/subscriptions","organizations_url":"https://api.github.com/users/undera/orgs","repos_url":"https://api.github.com/users/undera/repos","events_url":"https://api.github.com/users/undera/events{/privacy}","received_events_url":"https://api.github.com/users/undera/received_events","type":"User","site_admin":false},"repo":{"id":8197357,"name":"jmeter-plugins","full_name":"undera/jmeter-plugins","owner":{"login":"undera","id":2026469,"avatar_url":"https://avatars0.githubusercontent.com/u/2026469?v=4","gravatar_id":"","url":"https://api.github.com/users/undera","html_url":"https://github.com/undera","followers_url":"https://api.github.com/users/undera/followers","following_url":"https://api.github.com/users/undera/following{/other_user}","gists_url":"https://api.github.com/users/undera/gists{/gist_id}","starred_url":"https://api.github.com/users/undera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/undera/subscriptions","organizations_url":"https://api.github.com/users/undera/orgs","repos_url":"https://api.github.com/users/undera/repos","events_url":"https://api.github.com/users/undera/events{/privacy}","received_events_url":"https://api.github.com/users/undera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/undera/jmeter-plugins","description":"JMeter Plugins","fork":false,"url":"https://api.github.com/repos/undera/jmeter-plugins","forks_url":"https://api.github.com/repos/undera/jmeter-plugins/forks","keys_url":"https://api.github.com/repos/undera/jmeter-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/undera/jmeter-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/undera/jmeter-plugins/teams","hooks_url":"https://api.github.com/repos/undera/jmeter-plugins/hooks","issue_events_url":"https://api.github.com/repos/undera/jmeter-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/undera/jmeter-plugins/events","assignees_url":"https://api.github.com/repos/undera/jmeter-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/undera/jmeter-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/undera/jmeter-plugins/tags","blobs_url":"https://api.github.com/repos/undera/jmeter-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/undera/jmeter-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/undera/jmeter-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/undera/jmeter-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/undera/jmeter-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/undera/jmeter-plugins/languages","stargazers_url":"https://api.github.com/repos/undera/jmeter-plugins/stargazers","contributors_url":"https://api.github.com/repos/undera/jmeter-plugins/contributors","subscribers_url":"https://api.github.com/repos/undera/jmeter-plugins/subscribers","subscription_url":"https://api.github.com/repos/undera/jmeter-plugins/subscription","commits_url":"https://api.github.com/repos/undera/jmeter-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/undera/jmeter-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/undera/jmeter-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/undera/jmeter-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/undera/jmeter-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/undera/jmeter-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/undera/jmeter-plugins/merges","archive_url":"https://api.github.com/repos/undera/jmeter-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/undera/jmeter-plugins/downloads","issues_url":"https://api.github.com/repos/undera/jmeter-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/undera/jmeter-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/undera/jmeter-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/undera/jmeter-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/undera/jmeter-plugins/labels{/name}","releases_url":"https://api.github.com/repos/undera/jmeter-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/undera/jmeter-plugins/deployments","created_at":"2013-02-14T10:17:40Z","updated_at":"2017-11-29T08:48:00Z","pushed_at":"2017-12-03T14:44:15Z","git_url":"git://github.com/undera/jmeter-plugins.git","ssh_url":"git@github.com:undera/jmeter-plugins.git","clone_url":"https://github.com/undera/jmeter-plugins.git","svn_url":"https://github.com/undera/jmeter-plugins","homepage":"http://jmeter-plugins.org","size":21870,"stargazers_count":257,"watchers_count":257,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":226,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":226,"open_issues":2,"watchers":257,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200"},"html":{"href":"https://github.com/undera/jmeter-plugins/pull/200"},"issue":{"href":"https://api.github.com/repos/undera/jmeter-plugins/issues/200"},"comments":{"href":"https://api.github.com/repos/undera/jmeter-plugins/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/undera/jmeter-plugins/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/undera/jmeter-plugins/statuses/fba9460ca8b0d58c88e52f3c86f7286283ebb421"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}