org.key_project.slicing.ui.ShowCreatedByAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of keyext.slicing Show documentation
Show all versions of keyext.slicing Show documentation
Computiation of the proof core (the essential rule applications to close a proof)
/* This file is part of KeY - https://key-project.org
* KeY is licensed under the GNU General Public License Version 2
* SPDX-License-Identifier: GPL-2.0-only */
package org.key_project.slicing.ui;
import java.awt.event.ActionEvent;
import de.uka.ilkd.key.gui.MainWindow;
import de.uka.ilkd.key.gui.actions.MainWindowAction;
import de.uka.ilkd.key.proof.Node;
/**
* Context menu action to select the proof step that created a formula.
*
* @author Arne Keller
*/
public class ShowCreatedByAction extends MainWindowAction {
private static final long serialVersionUID = 1475202264543002419L;
/**
* The node to switch to.
*/
private final transient Node node;
/**
* Construct a new action.
*
* @param mw main window
* @param node node to switch to
*/
public ShowCreatedByAction(MainWindow mw, Node node) {
super(mw);
setName(String.format(
"Show proof step that created this formula (switches to proof step %d)",
node.serialNr()));
this.node = node;
}
@Override
public void actionPerformed(ActionEvent e) {
getMediator().getSelectionModel().setSelectedNode(node);
}
}