mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Copyright: do not add double \n for languages with not merged whitespace
tokens
This commit is contained in:
@@ -159,12 +159,17 @@ public abstract class UpdatePsiFileCopyright extends AbstractUpdateCopyright {
|
||||
// TODO - do we need option to remove blank line after?
|
||||
return; // Nothing to do since the comment is the same
|
||||
}
|
||||
int totalNewline = 0;
|
||||
PsiElement next = getNextSibling(range.getLast());
|
||||
if (next != null) {
|
||||
while (next != null && totalNewline <= 1) {
|
||||
final String text = next.getText();
|
||||
if (StringUtil.isEmptyOrSpaces(text) && countNewline(text) > 1) {
|
||||
return;
|
||||
if (!StringUtil.isEmptyOrSpaces(text)) {
|
||||
break;
|
||||
}
|
||||
totalNewline += countNewline(text);
|
||||
}
|
||||
if (totalNewline > 1) {
|
||||
return;
|
||||
}
|
||||
point = range.getFirst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user