mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
2022.1 fixes
GitOrigin-RevId: a6f4021165b6de05aa7dc37621f4a7554ae43459
This commit is contained in:
committed by
intellij-monorepo-bot
parent
966e12fd55
commit
5da46ef55d
@@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "ru.adelf"
|
||||
version = "2021.4"
|
||||
version = "2022.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -32,15 +32,15 @@ sourceSets {
|
||||
}
|
||||
|
||||
intellij {
|
||||
version.set("IU-212.4746.92")
|
||||
version.set("IU-221.3427.89-EAP-SNAPSHOT")
|
||||
plugins.set(
|
||||
listOf(
|
||||
"com.jetbrains.php:212.4746.100",
|
||||
"com.jetbrains.php:221.3427.92",
|
||||
"yaml",
|
||||
"org.jetbrains.plugins.go:212.4746.92",
|
||||
"org.jetbrains.plugins.go:221.3427.89",
|
||||
"Docker",
|
||||
"pythonid:212.4746.96",
|
||||
"org.jetbrains.plugins.ruby:212.4746.92",
|
||||
"pythonid:221.3427.93",
|
||||
"org.jetbrains.plugins.ruby:221.3427.89",
|
||||
"Kotlin",
|
||||
"coverage",
|
||||
"CSS",
|
||||
@@ -55,7 +55,7 @@ intellij {
|
||||
tasks {
|
||||
patchPluginXml {
|
||||
sinceBuild.set("212")
|
||||
untilBuild.set("213.*")
|
||||
untilBuild.set("221.*")
|
||||
}
|
||||
|
||||
buildSearchableOptions {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class DuplicateKeyInspection extends LocalInspectionTool {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "Duplicate Key";
|
||||
return "Duplicate key";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.source.tree.ElementType;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.impl.source.tree.PsiWhiteSpaceImpl;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
@@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.adelf.idea.dotenv.DotEnvFactory;
|
||||
import ru.adelf.idea.dotenv.psi.DotEnvFile;
|
||||
import ru.adelf.idea.dotenv.psi.DotEnvTypes;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -55,8 +56,8 @@ public class ExtraBlankLineInspection extends LocalInspectionTool {
|
||||
|
||||
if (count > 2) {
|
||||
problemsHolder.registerProblem(whiteSpace,
|
||||
"Only one extra line allowed between properties",
|
||||
new RemoveExtraBlankLineQuickFix());
|
||||
"Only one extra line allowed between properties",
|
||||
new RemoveExtraBlankLineQuickFix());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -75,7 +76,7 @@ public class ExtraBlankLineInspection extends LocalInspectionTool {
|
||||
try {
|
||||
PsiElement psiElement = descriptor.getPsiElement();
|
||||
|
||||
PsiElement newPsiElement = DotEnvFactory.createFromText(project, ElementType.WHITE_SPACE, "\n\n");
|
||||
PsiElement newPsiElement = DotEnvFactory.createFromText(project, TokenType.WHITE_SPACE, "\n\n");
|
||||
|
||||
psiElement.replace(newPsiElement);
|
||||
} catch (IncorrectOperationException e) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.source.tree.ElementType;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.impl.source.tree.PsiWhiteSpaceImpl;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
@@ -44,22 +44,22 @@ public class TrailingWhitespaceInspection extends LocalInspectionTool {
|
||||
PsiTreeUtil.findChildrenOfType(file, DotEnvValue.class).forEach(dotEnvValue -> {
|
||||
if (dotEnvValue.getText().matches(".*[ \\t]+")) {
|
||||
problemsHolder.registerProblem(dotEnvValue,
|
||||
new TextRange(dotEnvValue.getText().stripTrailing().length(), dotEnvValue.getText().length()),
|
||||
"Line has trailing whitespace.",
|
||||
new TrailingWhitespaceInspection.RemoveTrailingWhitespaceQuickFix()
|
||||
new TextRange(dotEnvValue.getText().stripTrailing().length(), dotEnvValue.getText().length()),
|
||||
"Line has trailing whitespace.",
|
||||
new TrailingWhitespaceInspection.RemoveTrailingWhitespaceQuickFix()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
PsiTreeUtil.findChildrenOfType(file, PsiWhiteSpaceImpl.class).forEach(whiteSpace -> {
|
||||
if (whiteSpace.getText().matches("\\s*[ \\t]\\n\\s*")) {
|
||||
problemsHolder.registerProblem(whiteSpace,
|
||||
"Line has trailing whitespace.",
|
||||
new TrailingWhitespaceInspection.RemoveTrailingWhitespaceQuickFix()
|
||||
);
|
||||
}
|
||||
if (whiteSpace.getText().matches("\\s*[ \\t]\\n\\s*")) {
|
||||
problemsHolder.registerProblem(whiteSpace,
|
||||
"Line has trailing whitespace.",
|
||||
new TrailingWhitespaceInspection.RemoveTrailingWhitespaceQuickFix()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return problemsHolder;
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ public class TrailingWhitespaceInspection extends LocalInspectionTool {
|
||||
|
||||
if (psiElement instanceof DotEnvValueImpl) {
|
||||
PsiElement newPsiElement = DotEnvFactory.createFromText(project, DotEnvTypes.VALUE,
|
||||
"DUMMY_KEY=" + psiElement.getText().stripTrailing());
|
||||
"DUMMY_KEY=" + psiElement.getText().stripTrailing());
|
||||
psiElement.replace(newPsiElement);
|
||||
} else if (psiElement instanceof PsiWhiteSpaceImpl) {
|
||||
PsiElement newPsiElement = DotEnvFactory.createFromText(project, ElementType.WHITE_SPACE,
|
||||
"DUMMY_KEY='VALUE'" + psiElement.getText().replaceAll("[ \\t]*\\n", "\n"));
|
||||
PsiElement newPsiElement = DotEnvFactory.createFromText(project, TokenType.WHITE_SPACE,
|
||||
"DUMMY_KEY='VALUE'" + psiElement.getText().replaceAll("[ \\t]*\\n", "\n"));
|
||||
psiElement.replace(newPsiElement);
|
||||
}
|
||||
} catch (IncorrectOperationException e) {
|
||||
|
||||
Reference in New Issue
Block a user