mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-379840 Make ExternalSystemNode comparable over ? instead of T
This gets rid of the raw type in the compareTo method. Additionally, it's more correct anyway as the whole implementation indicates that ExternalSystemNode is comparable regardless of the held data. GitOrigin-RevId: 4ecf8032e7e7d1cd6449cce7da03b69a0c641b9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9e35795ae2
commit
a2da3d416c
+2
-2
@@ -35,7 +35,7 @@ import java.util.function.Function;
|
||||
/**
|
||||
* @author Vladislav.Soroka
|
||||
*/
|
||||
public abstract class ExternalSystemNode<T> extends SimpleNode implements Comparable<ExternalSystemNode<T>> {
|
||||
public abstract class ExternalSystemNode<T> extends SimpleNode implements Comparable<ExternalSystemNode<?>> {
|
||||
|
||||
static final int BUILTIN_TASKS_DATA_NODE_ORDER = 10;
|
||||
static final int BUILTIN_DEPENDENCIES_DATA_NODE_ORDER = BUILTIN_TASKS_DATA_NODE_ORDER + 10;
|
||||
@@ -407,7 +407,7 @@ public abstract class ExternalSystemNode<T> extends SimpleNode implements Compar
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ExternalSystemNode node) {
|
||||
public int compareTo(@NotNull ExternalSystemNode<?> node) {
|
||||
return StringUtil.compare(this.getName(), node.getName(), true);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -422,7 +422,7 @@ final class ExternalSystemViewDefaultContributor extends ExternalSystemViewContr
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ExternalSystemNode node) {
|
||||
public int compareTo(@NotNull ExternalSystemNode<?> node) {
|
||||
final T myData = getData();
|
||||
final Object thatData = node.getData();
|
||||
if (myData instanceof OrderAware && thatData instanceof OrderAware) {
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ public class ModuleNode extends ExternalSystemNode<ModuleData> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ExternalSystemNode node) {
|
||||
public int compareTo(@NotNull ExternalSystemNode<?> node) {
|
||||
return myIsRoot ? -1 : (node instanceof ModuleNode && ((ModuleNode)node).myIsRoot) ? 1 : super.compareTo(node);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ public class TasksNode extends ExternalSystemNode<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ExternalSystemNode node) {
|
||||
public int compareTo(@NotNull ExternalSystemNode<?> node) {
|
||||
return "other".equals(group) ? 1 : super.compareTo(node);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user