mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] minor: lambdify
This commit is contained in:
+4
-9
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.vcs.log.graph.impl.facade;
|
||||
|
||||
import com.intellij.util.NotNullFunction;
|
||||
import com.intellij.vcs.log.graph.GraphColorManager;
|
||||
import com.intellij.vcs.log.graph.api.LinearGraph;
|
||||
import com.intellij.vcs.log.graph.api.elements.GraphEdge;
|
||||
@@ -46,14 +45,10 @@ class PrintElementManagerImpl implements PrintElementManager {
|
||||
@NotNull GraphColorManager colorManager) {
|
||||
myLinearGraph = linearGraph;
|
||||
myColorGetter = new ColorGetterByLayoutIndex(linearGraph, myPermanentGraph, colorManager);
|
||||
myGraphElementComparator = new GraphElementComparatorByLayoutIndex(new NotNullFunction<Integer, Integer>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public Integer fun(Integer nodeIndex) {
|
||||
int nodeId = linearGraph.getNodeId(nodeIndex);
|
||||
if (nodeId < 0) return nodeId;
|
||||
return myPermanentGraph.getPermanentGraphLayout().getLayoutIndex(nodeId);
|
||||
}
|
||||
myGraphElementComparator = new GraphElementComparatorByLayoutIndex(nodeIndex -> {
|
||||
int nodeId = linearGraph.getNodeId(nodeIndex);
|
||||
if (nodeId < 0) return nodeId;
|
||||
return myPermanentGraph.getPermanentGraphLayout().getLayoutIndex(nodeId);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user