{"action":"created","comment":{"url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/comments/92818579","pull_request_review_id":13340540,"id":92818579,"diff_hunk":"@@ -56,46 +57,60 @@ class UpdateTestModelByDropTarget {\n \t\t\t\t\ttargetTestStepContextIndex++\n \t\t\t\t\teObjectsToFormat.add(targetTestStepContext.steps.last)\n \t\t\t\t}\n-\t\t\t\tinsertTargetTestStepContext(test, newTestStepContext, dropTarget, targetTestStepContextIndex,\n+\t\t\t\tinsertTargetTestStepContext(tclModel, newTestStepContext, dropTarget, targetTestStepContextIndex,\n \t\t\t\t\teObjectsToFormat)\n \t\t\t\teObjectsToFormat.add(newTestStepContext)\n \t\t\t} else {\n \t\t\t\tdropUtils.addTestStepToModel(testStepIndex, targetTestStepContext, newTestStepContext.steps.head)\n \t\t\t\teObjectsToFormat.add(targetTestStepContext)\n \t\t\t}\n-\t\t}\n \n+\t\t}\n \t}\n \n-\tprivate def void insertTargetTestStepContext(TestCase test, ComponentTestStepContext droppedTestStepContext,\n+\tprivate def void insertTargetTestStepContext(TclModel tclModel, ComponentTestStepContext droppedTestStepContext,\n \t\tEObject dropTarget, int contextIndex, List<EObject> toFormatEObject) {\n \n-\t\tvar SpecificationStepImplementation specification = null\n-\t\tif (test.steps.size() == 0) {\n-\t\t\tspecification = dropUtils.createSpecification\n-\t\t\ttoFormatEObject.add(specification)\n-\t\t\ttest.steps.add(specification)\n-\t\t} else if (test.steps.last.contexts.size() == 0) {\n-\t\t\tspecification = test.steps.last\n+\t\tvar StepContainer specification = null\n+\t\tif (tclModel.test != null) {\n+\t\t\tif (tclModel.test.steps.size() == 0) {\n+\t\t\t\ttclModel.test.steps.add(dropUtils.createSpecification)\n+\t\t\t}\n+\t\t\tspecification = EcoreUtil2.getContainerOfType(dropTarget, StepContainer) ?: tclModel.test.steps.last\n+\t\t}\n+\t\tif (tclModel.macroCollection != null) {\n+\n+\t\t\tif (tclModel.macroCollection.macros.size() == 0) {","path":"tcl/org.testeditor.tcl.dsl.ui/src/org/testeditor/tcl/dsl/ui/editor/UpdateTestModelByDropTarget.xtend","position":93,"original_position":93,"commit_id":"ffc1c89f748c96cbd326ff98a3d92fdd7f15cba4","original_commit_id":"ffc1c89f748c96cbd326ff98a3d92fdd7f15cba4","user":{"login":"gunther-bachmann","id":12764214,"avatar_url":"https://avatars.githubusercontent.com/u/12764214?v=3","gravatar_id":"","url":"https://api.github.com/users/gunther-bachmann","html_url":"https://github.com/gunther-bachmann","followers_url":"https://api.github.com/users/gunther-bachmann/followers","following_url":"https://api.github.com/users/gunther-bachmann/following{/other_user}","gists_url":"https://api.github.com/users/gunther-bachmann/gists{/gist_id}","starred_url":"https://api.github.com/users/gunther-bachmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunther-bachmann/subscriptions","organizations_url":"https://api.github.com/users/gunther-bachmann/orgs","repos_url":"https://api.github.com/users/gunther-bachmann/repos","events_url":"https://api.github.com/users/gunther-bachmann/events{/privacy}","received_events_url":"https://api.github.com/users/gunther-bachmann/received_events","type":"User","site_admin":false},"body":"empty","created_at":"2016-12-16T14:20:52Z","updated_at":"2016-12-16T14:37:41Z","html_url":"https://github.com/test-editor/test-editor-xtext/pull/246#discussion_r92818579","pull_request_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246","_links":{"self":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/comments/92818579"},"html":{"href":"https://github.com/test-editor/test-editor-xtext/pull/246#discussion_r92818579"},"pull_request":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246"}}},"pull_request":{"url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246","id":98340341,"html_url":"https://github.com/test-editor/test-editor-xtext/pull/246","diff_url":"https://github.com/test-editor/test-editor-xtext/pull/246.diff","patch_url":"https://github.com/test-editor/test-editor-xtext/pull/246.patch","issue_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/246","number":246,"state":"open","locked":false,"title":"Feature/te 457 enable drag and drop for macros","user":{"login":"georgportwich","id":12084167,"avatar_url":"https://avatars.githubusercontent.com/u/12084167?v=3","gravatar_id":"","url":"https://api.github.com/users/georgportwich","html_url":"https://github.com/georgportwich","followers_url":"https://api.github.com/users/georgportwich/followers","following_url":"https://api.github.com/users/georgportwich/following{/other_user}","gists_url":"https://api.github.com/users/georgportwich/gists{/gist_id}","starred_url":"https://api.github.com/users/georgportwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgportwich/subscriptions","organizations_url":"https://api.github.com/users/georgportwich/orgs","repos_url":"https://api.github.com/users/georgportwich/repos","events_url":"https://api.github.com/users/georgportwich/events{/privacy}","received_events_url":"https://api.github.com/users/georgportwich/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-16T14:08:03Z","updated_at":"2016-12-16T14:37:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"129e44a319fa913f53bee7a00072c558c6ce0ee8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246/commits","review_comments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246/comments","review_comment_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/246/comments","statuses_url":"https://api.github.com/repos/test-editor/test-editor-xtext/statuses/ffc1c89f748c96cbd326ff98a3d92fdd7f15cba4","head":{"label":"test-editor:feature/TE-457_Enable_drag_and_drop_for_macros","ref":"feature/TE-457_Enable_drag_and_drop_for_macros","sha":"ffc1c89f748c96cbd326ff98a3d92fdd7f15cba4","user":{"login":"test-editor","id":7946408,"avatar_url":"https://avatars.githubusercontent.com/u/7946408?v=3","gravatar_id":"","url":"https://api.github.com/users/test-editor","html_url":"https://github.com/test-editor","followers_url":"https://api.github.com/users/test-editor/followers","following_url":"https://api.github.com/users/test-editor/following{/other_user}","gists_url":"https://api.github.com/users/test-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/test-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/test-editor/subscriptions","organizations_url":"https://api.github.com/users/test-editor/orgs","repos_url":"https://api.github.com/users/test-editor/repos","events_url":"https://api.github.com/users/test-editor/events{/privacy}","received_events_url":"https://api.github.com/users/test-editor/received_events","type":"Organization","site_admin":false},"repo":{"id":35145739,"name":"test-editor-xtext","full_name":"test-editor/test-editor-xtext","owner":{"login":"test-editor","id":7946408,"avatar_url":"https://avatars.githubusercontent.com/u/7946408?v=3","gravatar_id":"","url":"https://api.github.com/users/test-editor","html_url":"https://github.com/test-editor","followers_url":"https://api.github.com/users/test-editor/followers","following_url":"https://api.github.com/users/test-editor/following{/other_user}","gists_url":"https://api.github.com/users/test-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/test-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/test-editor/subscriptions","organizations_url":"https://api.github.com/users/test-editor/orgs","repos_url":"https://api.github.com/users/test-editor/repos","events_url":"https://api.github.com/users/test-editor/events{/privacy}","received_events_url":"https://api.github.com/users/test-editor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/test-editor/test-editor-xtext","description":null,"fork":false,"url":"https://api.github.com/repos/test-editor/test-editor-xtext","forks_url":"https://api.github.com/repos/test-editor/test-editor-xtext/forks","keys_url":"https://api.github.com/repos/test-editor/test-editor-xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/test-editor/test-editor-xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/test-editor/test-editor-xtext/teams","hooks_url":"https://api.github.com/repos/test-editor/test-editor-xtext/hooks","issue_events_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/events{/number}","events_url":"https://api.github.com/repos/test-editor/test-editor-xtext/events","assignees_url":"https://api.github.com/repos/test-editor/test-editor-xtext/assignees{/user}","branches_url":"https://api.github.com/repos/test-editor/test-editor-xtext/branches{/branch}","tags_url":"https://api.github.com/repos/test-editor/test-editor-xtext/tags","blobs_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/test-editor/test-editor-xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/test-editor/test-editor-xtext/languages","stargazers_url":"https://api.github.com/repos/test-editor/test-editor-xtext/stargazers","contributors_url":"https://api.github.com/repos/test-editor/test-editor-xtext/contributors","subscribers_url":"https://api.github.com/repos/test-editor/test-editor-xtext/subscribers","subscription_url":"https://api.github.com/repos/test-editor/test-editor-xtext/subscription","commits_url":"https://api.github.com/repos/test-editor/test-editor-xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/test-editor/test-editor-xtext/contents/{+path}","compare_url":"https://api.github.com/repos/test-editor/test-editor-xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/test-editor/test-editor-xtext/merges","archive_url":"https://api.github.com/repos/test-editor/test-editor-xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/test-editor/test-editor-xtext/downloads","issues_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues{/number}","pulls_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/test-editor/test-editor-xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/test-editor/test-editor-xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/test-editor/test-editor-xtext/labels{/name}","releases_url":"https://api.github.com/repos/test-editor/test-editor-xtext/releases{/id}","deployments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/deployments","created_at":"2015-05-06T07:40:18Z","updated_at":"2016-11-17T16:12:08Z","pushed_at":"2016-12-16T14:13:31Z","git_url":"git://github.com/test-editor/test-editor-xtext.git","ssh_url":"git@github.com:test-editor/test-editor-xtext.git","clone_url":"https://github.com/test-editor/test-editor-xtext.git","svn_url":"https://github.com/test-editor/test-editor-xtext","homepage":"","size":82871,"stargazers_count":4,"watchers_count":4,"language":"Xtend","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"develop"}},"base":{"label":"test-editor:develop","ref":"develop","sha":"9588d41ba93ce68e93b131de1d982cb307be4ac7","user":{"login":"test-editor","id":7946408,"avatar_url":"https://avatars.githubusercontent.com/u/7946408?v=3","gravatar_id":"","url":"https://api.github.com/users/test-editor","html_url":"https://github.com/test-editor","followers_url":"https://api.github.com/users/test-editor/followers","following_url":"https://api.github.com/users/test-editor/following{/other_user}","gists_url":"https://api.github.com/users/test-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/test-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/test-editor/subscriptions","organizations_url":"https://api.github.com/users/test-editor/orgs","repos_url":"https://api.github.com/users/test-editor/repos","events_url":"https://api.github.com/users/test-editor/events{/privacy}","received_events_url":"https://api.github.com/users/test-editor/received_events","type":"Organization","site_admin":false},"repo":{"id":35145739,"name":"test-editor-xtext","full_name":"test-editor/test-editor-xtext","owner":{"login":"test-editor","id":7946408,"avatar_url":"https://avatars.githubusercontent.com/u/7946408?v=3","gravatar_id":"","url":"https://api.github.com/users/test-editor","html_url":"https://github.com/test-editor","followers_url":"https://api.github.com/users/test-editor/followers","following_url":"https://api.github.com/users/test-editor/following{/other_user}","gists_url":"https://api.github.com/users/test-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/test-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/test-editor/subscriptions","organizations_url":"https://api.github.com/users/test-editor/orgs","repos_url":"https://api.github.com/users/test-editor/repos","events_url":"https://api.github.com/users/test-editor/events{/privacy}","received_events_url":"https://api.github.com/users/test-editor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/test-editor/test-editor-xtext","description":null,"fork":false,"url":"https://api.github.com/repos/test-editor/test-editor-xtext","forks_url":"https://api.github.com/repos/test-editor/test-editor-xtext/forks","keys_url":"https://api.github.com/repos/test-editor/test-editor-xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/test-editor/test-editor-xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/test-editor/test-editor-xtext/teams","hooks_url":"https://api.github.com/repos/test-editor/test-editor-xtext/hooks","issue_events_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/events{/number}","events_url":"https://api.github.com/repos/test-editor/test-editor-xtext/events","assignees_url":"https://api.github.com/repos/test-editor/test-editor-xtext/assignees{/user}","branches_url":"https://api.github.com/repos/test-editor/test-editor-xtext/branches{/branch}","tags_url":"https://api.github.com/repos/test-editor/test-editor-xtext/tags","blobs_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/test-editor/test-editor-xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/test-editor/test-editor-xtext/languages","stargazers_url":"https://api.github.com/repos/test-editor/test-editor-xtext/stargazers","contributors_url":"https://api.github.com/repos/test-editor/test-editor-xtext/contributors","subscribers_url":"https://api.github.com/repos/test-editor/test-editor-xtext/subscribers","subscription_url":"https://api.github.com/repos/test-editor/test-editor-xtext/subscription","commits_url":"https://api.github.com/repos/test-editor/test-editor-xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/test-editor/test-editor-xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/test-editor/test-editor-xtext/contents/{+path}","compare_url":"https://api.github.com/repos/test-editor/test-editor-xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/test-editor/test-editor-xtext/merges","archive_url":"https://api.github.com/repos/test-editor/test-editor-xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/test-editor/test-editor-xtext/downloads","issues_url":"https://api.github.com/repos/test-editor/test-editor-xtext/issues{/number}","pulls_url":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/test-editor/test-editor-xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/test-editor/test-editor-xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/test-editor/test-editor-xtext/labels{/name}","releases_url":"https://api.github.com/repos/test-editor/test-editor-xtext/releases{/id}","deployments_url":"https://api.github.com/repos/test-editor/test-editor-xtext/deployments","created_at":"2015-05-06T07:40:18Z","updated_at":"2016-11-17T16:12:08Z","pushed_at":"2016-12-16T14:13:31Z","git_url":"git://github.com/test-editor/test-editor-xtext.git","ssh_url":"git@github.com:test-editor/test-editor-xtext.git","clone_url":"https://github.com/test-editor/test-editor-xtext.git","svn_url":"https://github.com/test-editor/test-editor-xtext","homepage":"","size":82871,"stargazers_count":4,"watchers_count":4,"language":"Xtend","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246"},"html":{"href":"https://github.com/test-editor/test-editor-xtext/pull/246"},"issue":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/246"},"comments":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/issues/246/comments"},"review_comments":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246/comments"},"review_comment":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/pulls/246/commits"},"statuses":{"href":"https://api.github.com/repos/test-editor/test-editor-xtext/statuses/ffc1c89f748c96cbd326ff98a3d92fdd7f15cba4"}}}}
{"actor":{"display_login":"gunther-bachmann"}}