mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] minor: performDelegateUpdate -> delegateGraphChanged, convert -> convertToDelegate
This commit is contained in:
+2
-2
@@ -44,7 +44,7 @@ public class CollapsedLinearGraphController extends CascadeLinearGraphController
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
if (delegateAnswer.getGraphChanges() != null) {
|
||||
LinearGraph delegateGraph = getDelegateLinearGraphController().getCompiledGraph();
|
||||
myCollapsedGraph = CollapsedGraph.updateInstance(myCollapsedGraph, delegateGraph);
|
||||
@@ -108,7 +108,7 @@ public class CollapsedLinearGraphController extends CascadeLinearGraphController
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected GraphElement convert(@NotNull GraphElement graphElement) {
|
||||
protected GraphElement convertToDelegate(@NotNull GraphElement graphElement) {
|
||||
if (graphElement instanceof GraphEdge) {
|
||||
Integer upIndex = ((GraphEdge)graphElement).getUpNodeIndex();
|
||||
Integer downIndex = ((GraphEdge)graphElement).getDownNodeIndex();
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class BaseLinearGraphController extends CascadeLinearGraphController {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ public class BekBaseLinearGraphController extends CascadeLinearGraphController {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class BekBaseLinearGraphController extends CascadeLinearGraphController {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected GraphElement convert(@NotNull GraphElement graphElement) {
|
||||
protected GraphElement convertToDelegate(@NotNull GraphElement graphElement) {
|
||||
if (graphElement instanceof GraphEdge) {
|
||||
Integer upIndex = ((GraphEdge)graphElement).getUpNodeIndex();
|
||||
Integer downIndex = ((GraphEdge)graphElement).getDownNodeIndex();
|
||||
|
||||
+7
-6
@@ -39,8 +39,9 @@ public abstract class CascadeLinearGraphController implements LinearGraphControl
|
||||
public LinearGraphAnswer performLinearGraphAction(@NotNull LinearGraphAction action) {
|
||||
LinearGraphAnswer answer = performAction(action);
|
||||
if (answer == null && myDelegateLinearGraphController != null) {
|
||||
answer = myDelegateLinearGraphController.performLinearGraphAction(new VisibleGraphImpl.LinearGraphActionImpl(convert(action.getAffectedElement()), action.getType()));
|
||||
answer = performDelegateUpdate(answer);
|
||||
answer = myDelegateLinearGraphController.performLinearGraphAction(new VisibleGraphImpl.LinearGraphActionImpl(
|
||||
convertToDelegate(action.getAffectedElement()), action.getType()));
|
||||
answer = delegateGraphChanged(answer);
|
||||
}
|
||||
if (answer != null)
|
||||
return answer;
|
||||
@@ -48,15 +49,15 @@ public abstract class CascadeLinearGraphController implements LinearGraphControl
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private PrintElementWithGraphElement convert(@Nullable PrintElementWithGraphElement element) {
|
||||
private PrintElementWithGraphElement convertToDelegate(@Nullable PrintElementWithGraphElement element) {
|
||||
if (element == null) return null;
|
||||
GraphElement convertedGraphElement = convert(element.getGraphElement());
|
||||
GraphElement convertedGraphElement = convertToDelegate(element.getGraphElement());
|
||||
if (convertedGraphElement == null) return null;
|
||||
return PrintElementWithGraphElement.converted(element, convertedGraphElement);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected GraphElement convert(@NotNull GraphElement graphElement) {
|
||||
protected GraphElement convertToDelegate(@NotNull GraphElement graphElement) {
|
||||
return graphElement;
|
||||
}
|
||||
|
||||
@@ -72,7 +73,7 @@ public abstract class CascadeLinearGraphController implements LinearGraphControl
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected abstract LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer);
|
||||
protected abstract LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer);
|
||||
|
||||
// null mean that this action must be performed by delegateGraphController
|
||||
@Nullable
|
||||
|
||||
+2
-2
@@ -52,14 +52,14 @@ public class FilterLinearGraphController extends CascadeLinearGraphController {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected GraphElement convert(@NotNull GraphElement graphElement) {
|
||||
protected GraphElement convertToDelegate(@NotNull GraphElement graphElement) {
|
||||
// filter prohibits any actions on delegate graph for now
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
if (delegateAnswer == LinearGraphUtils.DEFAULT_GRAPH_ANSWER) return delegateAnswer;
|
||||
throw new UnsupportedOperationException(); // todo fix later
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class LinearBekController extends CascadeLinearGraphController {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LinearGraphAnswer performDelegateUpdate(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
protected LinearGraphAnswer delegateGraphChanged(@NotNull LinearGraphAnswer delegateAnswer) {
|
||||
return delegateAnswer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user