X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.structural.synchronization.client%2Fsrc%2Forg%2Fsimantics%2Fstructural%2Fsynchronization%2Fbase%2FSolverNameUtil.java;h=70c9ff7ae667e552587112039ffb377d18163ef8;hb=bb4e04be3cb29a5d08e412cd4eaa90ad0158b954;hp=9a44c012d9704519a9efb3f4a225fe5763094174;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/base/SolverNameUtil.java b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/base/SolverNameUtil.java index 9a44c012d..70c9ff7ae 100644 --- a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/base/SolverNameUtil.java +++ b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/base/SolverNameUtil.java @@ -1,34 +1,34 @@ -package org.simantics.structural.synchronization.base; - -import java.util.function.BiConsumer; - -public interface SolverNameUtil { - - String getFreshName(String parentName, String name); - String ensureNameIsVariationOf(String parentName, int id, String name); - - /** - * The name utility can internally keep track of - * suggested name -> generated - * fresh name associations that it has had to perform during its - * lifetime in {@link #getFreshName(String, String)}. If the implementation - * keeps track of these renames, the purpose of this method is to check - * whether at the time of invocation it is possible to rename the solver - * components to their suggested names or not. For every rename that is - * performed, the specified consumer shall be invoked with the arguments - * (previous name, new name) after the rename has been - * performed. - * - *

- * This method is intended to be invoked right at the end of - * synchronization. - * - * @param callback - * a binary consumer that takes as first argument the previous - * name of the renamed component and as second argument the new - * (current) name of the component or null to skip - * callback invocation - */ - default void applySuggestedNames(BiConsumer callback) {} - -} +package org.simantics.structural.synchronization.base; + +import java.util.function.BiConsumer; + +public interface SolverNameUtil { + + String getFreshName(String parentName, String name); + String ensureNameIsVariationOf(String parentName, int id, String name); + + /** + * The name utility can internally keep track of + * suggested name -> generated + * fresh name associations that it has had to perform during its + * lifetime in {@link #getFreshName(String, String)}. If the implementation + * keeps track of these renames, the purpose of this method is to check + * whether at the time of invocation it is possible to rename the solver + * components to their suggested names or not. For every rename that is + * performed, the specified consumer shall be invoked with the arguments + * (previous name, new name) after the rename has been + * performed. + * + *

+ * This method is intended to be invoked right at the end of + * synchronization. + * + * @param callback + * a binary consumer that takes as first argument the previous + * name of the renamed component and as second argument the new + * (current) name of the component or null to skip + * callback invocation + */ + default void applySuggestedNames(BiConsumer callback) {} + +}