Skip to content

Commit

Permalink
Spotless cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
unp1 committed Dec 8, 2023
1 parent c78c1f9 commit e032871
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import de.uka.ilkd.key.gui.keyshortcuts.KeyStrokeManager;
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.pp.LogicPrinter;
import de.uka.ilkd.key.pp.PrettyPrinter;
import de.uka.ilkd.key.proof.*;
Expand Down Expand Up @@ -578,10 +577,10 @@ public void makeNodeVisible(Node n) {
// in this case we have to select a child of an OSS node
ArrayList<TreeNode> pathToOSSChild = new ArrayList<>();
pathToOSSChild.addAll(Arrays.asList(obs));

Check warning on line 579 in key.ui/src/main/java/de/uka/ilkd/key/gui/prooftree/ProofTreeView.java

View workflow job for this annotation

GitHub Actions / qodana

Redundant 'Collection.addAll()' call

'addAll()' call can be replaced with parametrized constructor call
for (int i = 0; i<node.getChildCount(); i++) {
final var child = node.getChildAt(i);
if (child instanceof GUIOneStepChildTreeNode ossChild) {
if (ossChild.getRuleApp() == mediator.getSelectionModel().getSelectedRuleApp()) {
for (int i = 0; i < node.getChildCount(); i++) {
if (node.getChildAt(i) instanceof GUIOneStepChildTreeNode ossChild) {
if (ossChild.getRuleApp() == mediator.getSelectionModel()
.getSelectedRuleApp()) {
pathToOSSChild.add(ossChild);
break;
}
Expand Down Expand Up @@ -622,7 +621,7 @@ private void collapseClosedNodesHelp(TreePath path) {

Object node = path.getLastPathComponent();

if (node instanceof GUIBranchNode && ((GUIBranchNode) node).getNode().isClosed()) {
if (node instanceof GUIBranchNode branchNode && branchNode.getNode().isClosed()) {
delegateView.collapsePath(path);
return;
}
Expand Down Expand Up @@ -720,7 +719,7 @@ public boolean setFilter(ProofTreeViewFilter filter, boolean selected) {
invokedNode = guiNode.getNode();
} else {
branch = selectedPath;
invokedNode = ((GUIAbstractTreeNode)lastPathComponent).getNode();
invokedNode = ((GUIAbstractTreeNode) lastPathComponent).getNode();
}

delegateModel.setFilter(filter, selected);
Expand Down Expand Up @@ -750,7 +749,7 @@ public boolean setFilter(ProofTreeViewFilter filter, boolean selected) {
if (tp.getPathComponent(i) instanceof GUIBranchNode pathComp) {
final Node n = pathComp.getNode();
newTp = newTp.pathByAddingChild(
delegateModel.getBranchNode(n, n.getNodeInfo().getBranchLabel()));
delegateModel.getBranchNode(n, n.getNodeInfo().getBranchLabel()));
}
}
delegateView.expandPath(newTp);
Expand All @@ -770,7 +769,7 @@ private TreePath getPathForBranchNode(Node invokedNode, TreePath defaultPath) {
if (delegateModel.getRoot() instanceof GUIBranchNode rootNode) {
final TreeNode node = rootNode.findBranch(invokedNode);
if (node instanceof GUIBranchNode childAsBranchNode &&
!(defaultPath.getLastPathComponent() instanceof GUIOneStepChildTreeNode)) {
!(defaultPath.getLastPathComponent() instanceof GUIOneStepChildTreeNode)) {
return selectBranchNode(childAsBranchNode);
}
}
Expand Down

0 comments on commit e032871

Please sign in to comment.