{"action":"created","issue":{"url":"https://api.github.com/repos/INRIA/spoon/issues/932","repository_url":"https://api.github.com/repos/INRIA/spoon","labels_url":"https://api.github.com/repos/INRIA/spoon/issues/932/labels{/name}","comments_url":"https://api.github.com/repos/INRIA/spoon/issues/932/comments","events_url":"https://api.github.com/repos/INRIA/spoon/issues/932/events","html_url":"https://github.com/INRIA/spoon/pull/932","id":187525928,"number":932,"title":"fix bug #921 Duplicity in package-info.java when templates are used","user":{"login":"pvojtechovsky","id":23107345,"avatar_url":"https://avatars.githubusercontent.com/u/23107345?v=3","gravatar_id":"","url":"https://api.github.com/users/pvojtechovsky","html_url":"https://github.com/pvojtechovsky","followers_url":"https://api.github.com/users/pvojtechovsky/followers","following_url":"https://api.github.com/users/pvojtechovsky/following{/other_user}","gists_url":"https://api.github.com/users/pvojtechovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/pvojtechovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvojtechovsky/subscriptions","organizations_url":"https://api.github.com/users/pvojtechovsky/orgs","repos_url":"https://api.github.com/users/pvojtechovsky/repos","events_url":"https://api.github.com/users/pvojtechovsky/events{/privacy}","received_events_url":"https://api.github.com/users/pvojtechovsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-05T21:56:45Z","updated_at":"2016-11-06T12:37:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/INRIA/spoon/pulls/932","html_url":"https://github.com/INRIA/spoon/pull/932","diff_url":"https://github.com/INRIA/spoon/pull/932.diff","patch_url":"https://github.com/INRIA/spoon/pull/932.patch"},"body":"This is next part of #929. It assures that `JDTBasedSpoonCompiler.build()` compiles sources and templates only once. Before it was compiled twice, therefore the annotations were duplicated.\r\n\r\nI had to add new `InputType.UNITS` to tell the `createBatchCompiler` method that it should create JDTBatchCompiler which let's us configure to be compiled files.\r\n\r\nI do not like this solution, because public `InputType.UNITS` is there just for internal purposes and it makes no sense for `JDTBasedSpoonCompiler.compile()` ... so it is confusing... But I was not able to found beter way without changing of contract of createBatchCompiler method, which is may be used by clients to filter files and directories.\r\n\r\n@monperrus if you agree that `InputType.UNITS` is wrong, then please refactor `createBatchCompiler` and related tests by some way, so it can be used in simpler way.\r\n\r\nI vote for removing support of filtering by folders and files (test `testFilterResourcesDir` and `testFilterResourcesFile()`)by overwriting of protected method ... this is not good because protect function becomes a \"public API\""},"comment":{"url":"https://api.github.com/repos/INRIA/spoon/issues/comments/258678339","html_url":"https://github.com/INRIA/spoon/pull/932#issuecomment-258678339","issue_url":"https://api.github.com/repos/INRIA/spoon/issues/932","id":258678339,"user":{"login":"pvojtechovsky","id":23107345,"avatar_url":"https://avatars.githubusercontent.com/u/23107345?v=3","gravatar_id":"","url":"https://api.github.com/users/pvojtechovsky","html_url":"https://github.com/pvojtechovsky","followers_url":"https://api.github.com/users/pvojtechovsky/followers","following_url":"https://api.github.com/users/pvojtechovsky/following{/other_user}","gists_url":"https://api.github.com/users/pvojtechovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/pvojtechovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvojtechovsky/subscriptions","organizations_url":"https://api.github.com/users/pvojtechovsky/orgs","repos_url":"https://api.github.com/users/pvojtechovsky/repos","events_url":"https://api.github.com/users/pvojtechovsky/events{/privacy}","received_events_url":"https://api.github.com/users/pvojtechovsky/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T12:37:50Z","updated_at":"2016-11-06T12:37:50Z","body":"@tdurieux You wrote:\r\n> I like the idea of the stateless JDTBAtchCompiler\r\n\r\ncould you plese explain it in more details? I would like to understand you before I make next PR. Thanks!"}}
{"actor":{"display_login":"pvojtechovsky"}}