mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-17913 do not include equals and hashCode methods in possible duplicates
[kotlin] KTIJ-30722 create intellij.kotlin.duplicate.scope module, move KotlinDuplicateScope there, create tests [kotlin] KTIJ-30722 ExpectedHighlightingData minor refactoring Merge-request: IJ-MR-176041 Merged-by: Anna Antonova <Anna.Antonova@jetbrains.com> GitOrigin-RevId: f2e3b0d35c0b6ddd83bd521af986f95d10e50078
This commit is contained in:
committed by
intellij-monorepo-bot
parent
85ec96def7
commit
abc33e8fe5
+1
-1
@@ -213,7 +213,7 @@ abstract class KotlinPluginBuilder(val kind : KotlinPluginKind = System.getPrope
|
||||
"kotlin.bundled-compiler-plugins-support",
|
||||
"kotlin.jsr223",
|
||||
"intellij.kotlin.internal",
|
||||
"intellij.kotlin.base.serialization",
|
||||
"intellij.kotlin.base.serialization"
|
||||
)
|
||||
|
||||
private val KOTLIN_SCRIPTING_LIBRARIES = java.util.List.of(
|
||||
|
||||
@@ -565,7 +565,7 @@ public class ExpectedHighlightingData {
|
||||
|
||||
@Override
|
||||
public boolean equals(HighlightInfo o1, HighlightInfo o2) {
|
||||
return o1==null || o2 == null ? o1 == o2 : matchesPattern(o1, o2, false);
|
||||
return o1==null || o2 == null ? o1 == o2 : matchesPattern(o1, o2);
|
||||
}
|
||||
});
|
||||
index.addAll(infos);
|
||||
@@ -739,15 +739,15 @@ public class ExpectedHighlightingData {
|
||||
return ThreeState.NO;
|
||||
}
|
||||
|
||||
private static boolean matchesPattern(@NotNull HighlightInfo expectedInfo, @NotNull HighlightInfo info, boolean strictMatch) {
|
||||
private static boolean matchesPattern(@NotNull HighlightInfo expectedInfo, @NotNull HighlightInfo info) {
|
||||
if (expectedInfo == info) return true;
|
||||
boolean typeMatches = expectedInfo.type.equals(info.type) || !strictMatch && (expectedInfo.type == Holder.WHATEVER || info.type == Holder.WHATEVER);
|
||||
boolean typeMatches = expectedInfo.type.equals(info.type) || (expectedInfo.type == Holder.WHATEVER || info.type == Holder.WHATEVER);
|
||||
boolean textAttributesMatches = sameTextAttributesByValue(expectedInfo.getTextAttributes(null, null), info.getTextAttributes(null, null)) ||
|
||||
!strictMatch && (expectedInfo.forcedTextAttributes == null || info.forcedTextAttributes == null);
|
||||
boolean attributesKeyMatches = !strictMatch && (expectedInfo.forcedTextAttributesKey == null || info.forcedTextAttributesKey == null) ||
|
||||
(expectedInfo.forcedTextAttributes == null || info.forcedTextAttributes == null);
|
||||
boolean attributesKeyMatches = (expectedInfo.forcedTextAttributesKey == null || info.forcedTextAttributesKey == null) ||
|
||||
Objects.equals(expectedInfo.forcedTextAttributesKey, info.forcedTextAttributesKey);
|
||||
return
|
||||
haveSamePresentation(info, expectedInfo, strictMatch) &&
|
||||
haveSamePresentation(info, expectedInfo, false) &&
|
||||
info.getSeverity() == expectedInfo.getSeverity() &&
|
||||
typeMatches &&
|
||||
textAttributesMatches &&
|
||||
|
||||
@@ -399,6 +399,7 @@
|
||||
- name: kotlin-ultimate.profiler
|
||||
- name: kotlin-ultimate.ultimate-plugin
|
||||
- name: intellij.kotlin-ultimate.j2k-llm
|
||||
- name: intellij.kotlin.duplicate.scope
|
||||
- name: kotlin.plugin
|
||||
- name: lib/kotlinc.allopen-compiler-plugin.jar
|
||||
library: kotlinc.allopen-compiler-plugin
|
||||
|
||||
Reference in New Issue
Block a user