IntelliJ not respecting "Before Imports" for copyright

已回答

I set up a copyright on IntelliJ 2016.3.1 and for Java told it to go above the imports. However, when IntelliJ automatically imports something, that import goes above the copyright. How can I fix this?

0

You may want to provide a reproducible test case to speed up the issue resolution here: https://youtrack.jetbrains.com/v2/issue/IDEA-96725.

0

I don't understand what you mean by providing a reproducible test case. My problem is exactly like the one in that youtrack post, and unchecking "Add blank line after" doesn't fix the problem. I tried this on 2017.3 as well and still see the problem behavior.

0

Do you setup copyright in the file in the default package as in the issue?

0

I'm not sure what you mean; the linked issue doesn't mention setting up the copyright in the file or packages at all. As far as I'm aware you don't set up the copyright at the file or package level; you define it, then when you create a new file the chosen profile is used.

0

Issue reporter was able to reproduce the issue for files in the default package (== without package statement at the top of the file) If you can reproduce the issue for other kind of files, you are welcome to provide more details as we use copyright plugins heavily here and do not see such effects.

0

Oh, ok, I understand. Yes, this happens for a new class anywhere, with and without the blank line after the copyright. I've tested both 2016.3.1 and 2017.3.3. What additional details do you need?

0

Please share a sample project with the copyright profile to reproduce the problem.

0

How do I attach a project?

0

You can report a new issue at https://youtrack.jetbrains.com/issues/IDEA and attach the project there. Please also provide the exact steps to reproduce the issue.

0

请先登录再写评论。