X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fscl%2FSimantics%2FEntity.scl;h=7426c2d5f8d0a706947a943cabecf2d8bd657437;hb=0f7642b3bd653687a880733e4673b450e3612c6c;hp=0857e00e2e01aea74f02384b50dc37da005ea5c3;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/scl/Simantics/Entity.scl b/bundles/org.simantics.modeling/scl/Simantics/Entity.scl index 0857e00e2..7426c2d5f 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Entity.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Entity.scl @@ -1,29 +1,29 @@ -include "Simantics/DB" -import "http://www.simantics.org/Layer0-1.1" as L0 - -@deprecated -toResource :: Resource -> Resource -toResource = id - -@deprecated -fromResource :: Resource -> Resource -fromResource = id - -labelOf :: Resource -> String -labelOf entity = relatedValue2 entity L0.HasLabel - -"""Renames an entity.""" -rename :: Resource -> String -> () -rename entity newName = do - oldName = (nameOf entity) - claimRelatedValue entity L0.HasName newName - addCommentMetadata ("Renamed " + oldName + " to " + newName) - -importJava "org.simantics.db.layer0.util.RemoverUtil" where - """Removes a given entity.""" - @JavaName remove - remove :: Resource -> () - -@deprecated -remove_ :: Resource -> () -remove_ = remove +include "Simantics/DB" +import "http://www.simantics.org/Layer0-1.1" as L0 + +@deprecated +toResource :: Resource -> Resource +toResource = id + +@deprecated +fromResource :: Resource -> Resource +fromResource = id + +labelOf :: Resource -> String +labelOf entity = relatedValue2 entity L0.HasLabel + +"""Renames an entity.""" +rename :: Resource -> String -> () +rename entity newName = do + oldName = (nameOf entity) + claimRelatedValue entity L0.HasName newName + addCommentMetadata ("Renamed " + oldName + " to " + newName) + +importJava "org.simantics.db.layer0.util.RemoverUtil" where + """Removes a given entity.""" + @JavaName remove + remove :: Resource -> () + +@deprecated +remove_ :: Resource -> () +remove_ = remove