From: Marko Luukkainen Date: Wed, 25 Jan 2023 09:47:36 +0000 (+0200) Subject: Re-export Simantics/DB/findFreshName from Rename X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F4935%2F1;p=simantics%2Fplatform.git Re-export Simantics/DB/findFreshName from Rename Removed the duplicate findFreshName function imported from java in Simantics/Rename. gitlab #904 Change-Id: I3f7232788a28012a0beb033af15263c7e9dcdd16 --- diff --git a/bundles/org.simantics.modeling/scl/Simantics/Rename.scl b/bundles/org.simantics.modeling/scl/Simantics/Rename.scl index e7667ed87..a597368f1 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Rename.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Rename.scl @@ -1,4 +1,5 @@ import "Simantics/Entity" hiding (findFreshName) +include "Simantics/DB" (findFreshName) importJava "org.simantics.modeling.Rename" where @JavaName renameNode @@ -35,18 +36,6 @@ renameMBNode :: Resource -> String -> String renameMBNode entity newname = renameNode entity newname importJava "org.simantics.db.common.utils.NameUtils" where - @JavaName findFreshName - """ - findFreshName name container - - Finds fresh and unused name with proposition `name` under the given `container` - and returns the freshName - - Example: - - freshName = findFreshName "Model" currentProject () - """ - findFreshName :: String -> Resource -> String @JavaName getSafeName """