File tree Expand file tree Collapse file tree
key.core/src/main/java/de/uka/ilkd/key/proof
keyext.caching/src/main/java/de/uka/ilkd/key/gui/plugins/caching Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import javax .swing .*;
88
99import de .uka .ilkd .key .proof .init .InitConfig ;
10+ import de .uka .ilkd .key .proof .reference .ClosedBy ;
1011import de .uka .ilkd .key .rule .NoPosTacletApp ;
1112import de .uka .ilkd .key .rule .merge .MergePartner ;
1213import de .uka .ilkd .key .rule .merge .MergeRuleBuiltInRuleApp ;
@@ -35,6 +36,16 @@ class ProofPruner {
3536 * @return the subtrees whose common root was the given {@code cuttingPoint}
3637 */
3738 public ImmutableList <Node > prune (final Node cuttingPoint ) {
39+ // special case: prune cached goal = only need to re-open the final node
40+ ClosedBy cby = cuttingPoint .lookup (ClosedBy .class );
41+ Goal goal = proof .getClosedGoal (cuttingPoint );
42+ if (cby != null && goal != null ) {
43+ cuttingPoint .deregister (cby , ClosedBy .class );
44+ proof .reOpenGoal (goal );
45+ refreshGoal (goal , cuttingPoint );
46+ return ImmutableList .of (cuttingPoint );
47+ }
48+
3849 // there is only one leaf containing an open goal that is interesting for pruning the
3950 // subtree of <code>node</code>, namely the first leave that is found by a breadth
4051 // first search.
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public void ruleApplied(ProofEvent e) {
146146 if (!CachingSettingsProvider .getCachingSettings ().getEnabled ()) {
147147 return ;
148148 }
149- // new global off switch
149+ // new global off switch (toolbar)
150150 if (!getProofCachingEnabled ()) {
151151 return ;
152152 }
You can’t perform that action at this time.
0 commit comments