Skip to content

Commit

Permalink
Merge pull request #2426 from mbeddr/feature/lazyinit_helpers_2424
Browse files Browse the repository at this point in the history
Add two memoizing supplier implementations
  • Loading branch information
dbinkele authored May 7, 2024
2 parents b441705 + 992e624 commit 37040fa
Show file tree
Hide file tree
Showing 7 changed files with 1,691 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6396,21 +6396,11 @@
<ref role="3bR37D" to="ffeo:mXGwHwhVPj" resolve="JDK" />
</node>
</node>
<node concept="1SiIV0" id="5fGcQI947Ch" role="3bR37C">
<node concept="3bR9La" id="5fGcQI947Ci" role="1SiIV1">
<ref role="3bR37D" to="ffeo:1TaHNgiIbJb" resolve="MPS.Platform" />
</node>
</node>
<node concept="1SiIV0" id="5fGcQI947Cj" role="3bR37C">
<node concept="3bR9La" id="5fGcQI947Ck" role="1SiIV1">
<ref role="3bR37D" to="ffeo:1H905DlDUSw" resolve="MPS.OpenAPI" />
</node>
</node>
<node concept="1SiIV0" id="5fGcQI947Cl" role="3bR37C">
<node concept="3bR9La" id="5fGcQI947Cm" role="1SiIV1">
<ref role="3bR37D" to="ffeo:7Kfy9QB6L8Y" resolve="jetbrains.mps.lang.project" />
</node>
</node>
<node concept="1SiIV0" id="5fGcQI947Cn" role="3bR37C">
<node concept="3bR9La" id="5fGcQI947Co" role="1SiIV1">
<property role="3bR36h" value="true" />
Expand Down Expand Up @@ -6449,6 +6439,11 @@
</node>
</node>
</node>
<node concept="1SiIV0" id="9jWrhFq1E0" role="3bR37C">
<node concept="3bR9La" id="9jWrhFq1E1" role="1SiIV1">
<ref role="3bR37D" to="ffeo:7Kfy9QB6KXW" resolve="jetbrains.mps.lang.core" />
</node>
</node>
</node>
</node>
<node concept="2G$12M" id="3quoVcnRjZi" role="3989C9">
Expand Down Expand Up @@ -21528,6 +21523,9 @@
<node concept="L2wRC" id="7eUZPevvU80" role="39821P">
<ref role="L2wRA" node="Um6saBVXnk" resolve="com.mbeddr.mpsutil.compare.pattern.test" />
</node>
<node concept="L2wRC" id="9jWrhFpWP3" role="39821P">
<ref role="L2wRA" node="9jWrhFpWZO" resolve="test.com.mbeddr.mpsutil.common" />
</node>
<node concept="L2wRC" id="4_9e_MLi3i0" role="39821P">
<ref role="L2wRA" node="4_9e_MLhX80" resolve="test.com.mbeddr.mpsutil.compare" />
</node>
Expand Down Expand Up @@ -22789,10 +22787,82 @@
</node>
</node>
</node>
<node concept="1E1JtA" id="9jWrhFpWZO" role="2G$12L">
<property role="BnDLt" value="true" />
<property role="TrG5h" value="test.com.mbeddr.mpsutil.common" />
<property role="3LESm3" value="fceddec6-7184-49a0-9009-0da4dbdc8b95" />
<property role="aoJFB" value="eYcmk9QOlj/sources_and_tests" />
<node concept="398BVA" id="9jWrhFpXbi" role="3LF7KH">
<ref role="398BVh" node="7hVsScEQJ6E" resolve="mbeddr.mpsutil" />
<node concept="2Ry0Ak" id="9jWrhFpXc0" role="iGT6I">
<property role="2Ry0Am" value="tests" />
<node concept="2Ry0Ak" id="9jWrhFpXfn" role="2Ry0An">
<property role="2Ry0Am" value="test.com.mbeddr.mpsutil.common" />
<node concept="2Ry0Ak" id="9jWrhFpXgK" role="2Ry0An">
<property role="2Ry0Am" value="test.com.mbeddr.mpsutil.common.msd" />
</node>
</node>
</node>
</node>
<node concept="3rtmxn" id="9jWrhFpXjq" role="3bR31x">
<node concept="3LXTmp" id="9jWrhFpXjr" role="3rtmxm">
<node concept="398BVA" id="9jWrhFpXjs" role="3LXTmr">
<ref role="398BVh" node="7hVsScEQJ6E" resolve="mbeddr.mpsutil" />
<node concept="2Ry0Ak" id="9jWrhFpXjt" role="iGT6I">
<property role="2Ry0Am" value="tests" />
<node concept="2Ry0Ak" id="9jWrhFpXju" role="2Ry0An">
<property role="2Ry0Am" value="test.com.mbeddr.mpsutil.common" />
</node>
</node>
</node>
<node concept="3qWCbU" id="9jWrhFpXjw" role="3LXTna">
<property role="3qWCbO" value="icons/**" />
</node>
</node>
</node>
<node concept="1SiIV0" id="9jWrhFpXqt" role="3bR37C">
<node concept="3bR9La" id="9jWrhFpXqu" role="1SiIV1">
<ref role="3bR37D" to="ffeo:mXGwHwhVPj" resolve="JDK" />
</node>
</node>
<node concept="1SiIV0" id="9jWrhFpXqv" role="3bR37C">
<node concept="3bR9La" id="9jWrhFpXqw" role="1SiIV1">
<ref role="3bR37D" node="5fGcQI947Ca" resolve="com.mbeddr.mpsutil.common" />
</node>
</node>
<node concept="1SiIV0" id="9jWrhFpXqx" role="3bR37C">
<node concept="3bR9La" id="9jWrhFpXqy" role="1SiIV1">
<ref role="3bR37D" to="90a9:PE3B26QCrP" resolve="org.apache.commons" />
</node>
</node>
<node concept="1BupzO" id="9jWrhFpXqP" role="3bR31x">
<property role="3ZfqAx" value="models" />
<property role="1Hdu6h" value="true" />
<property role="1HemKv" value="true" />
<node concept="3LXTmp" id="9jWrhFpXqQ" role="1HemKq">
<node concept="398BVA" id="9jWrhFpXqz" role="3LXTmr">
<ref role="398BVh" node="7hVsScEQJ6E" resolve="mbeddr.mpsutil" />
<node concept="2Ry0Ak" id="9jWrhFpXq$" role="iGT6I">
<property role="2Ry0Am" value="tests" />
<node concept="2Ry0Ak" id="9jWrhFpXq_" role="2Ry0An">
<property role="2Ry0Am" value="test.com.mbeddr.mpsutil.common" />
<node concept="2Ry0Ak" id="9jWrhFpXqA" role="2Ry0An">
<property role="2Ry0Am" value="models" />
</node>
</node>
</node>
</node>
<node concept="3qWCbU" id="9jWrhFpXqR" role="3LXTna">
<property role="3qWCbO" value="**/*.mps, **/*.mpsr, **/.model" />
</node>
</node>
</node>
</node>
<node concept="1E1JtA" id="4_9e_MLhX80" role="2G$12L">
<property role="BnDLt" value="true" />
<property role="TrG5h" value="test.com.mbeddr.mpsutil.compare" />
<property role="3LESm3" value="f1331acb-f5b8-487b-9d42-6ffd5fcde7e3" />
<property role="aoJFB" value="eYcmk9QOlj/sources_and_tests" />
<node concept="398BVA" id="4_9e_MLhXgG" role="3LF7KH">
<ref role="398BVh" node="7hVsScEQJ6E" resolve="mbeddr.mpsutil" />
<node concept="2Ry0Ak" id="4_9e_MLhXgH" role="iGT6I">
Expand All @@ -22810,11 +22880,6 @@
<ref role="3bR37D" node="776vT$mQZbf" resolve="com.mbeddr.mpsutil.comparator" />
</node>
</node>
<node concept="1SiIV0" id="4_9e_MLhXo0" role="3bR37C">
<node concept="3bR9La" id="4_9e_MLhXo1" role="1SiIV1">
<ref role="3bR37D" to="ffeo:mXGwHwhVPj" resolve="JDK" />
</node>
</node>
<node concept="1BupzO" id="4_9e_MLhXok" role="3bR31x">
<property role="3ZfqAx" value="models" />
<property role="1Hdu6h" value="true" />
Expand Down Expand Up @@ -23406,6 +23471,9 @@
<node concept="22LTRM" id="7eUZPevvUva" role="22LTRK">
<ref role="22LTRN" node="Um6saBVXnk" resolve="com.mbeddr.mpsutil.compare.pattern.test" />
</node>
<node concept="22LTRM" id="9jWrhFpXuU" role="22LTRK">
<ref role="22LTRN" node="9jWrhFpWZO" resolve="test.com.mbeddr.mpsutil.common" />
</node>
<node concept="22LTRM" id="4_9e_MLi41E" role="22LTRK">
<ref role="22LTRN" node="4_9e_MLhX80" resolve="test.com.mbeddr.mpsutil.compare" />
</node>
Expand Down
3 changes: 2 additions & 1 deletion code/languages/com.mbeddr.mpsutil/.mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.ccmenu.reftarget.runtime/com.mbeddr.mpsutil.ccmenu.reftarget.runtime.msd" folder="rest.ccmenu" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.ccmenu.runtime/com.mbeddr.mpsutil.ccmenu.runtime.msd" folder="rest.ccmenu" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.ccmenu.sandbox/com.mbeddr.mpsutil.ccmenu.sandbox.msd" folder="rest.ccmenu" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.common/com.mbeddr.mpsutil.common.msd" folder="staging" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.common/com.mbeddr.mpsutil.common.msd" folder="staging.common" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.comparator.diff.demo.genplan/com.mbeddr.mpsutil.comparator.diff.demo.genplan.msd" folder="staging.comparator.demo" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.comparator.diff.demo.tests/com.mbeddr.mpsutil.comparator.diff.demo.tests.msd" folder="staging.comparator.demo" />
<modulePath path="$PROJECT_DIR$/solutions/com.mbeddr.mpsutil.comparator/comparator.msd" folder="staging.comparator" />
Expand Down Expand Up @@ -194,6 +194,7 @@
<modulePath path="$PROJECT_DIR$/tests/com.mbeddr.mpsutil.javainterpreter.test/com.mbeddr.mpsutil.javainterpreter.test.mpl" folder="staging.javainterpreter" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.asynccell/test.com.mbeddr.mpsutil.asynccell.msd" folder="asynccell" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.blutil.test.waitfor/test.com.mbeddr.mpsutil.blutil.test.waitfor.msd" folder="waitfor" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.common/test.com.mbeddr.mpsutil.common.msd" folder="staging.common" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.compare.testlang/test.com.mbeddr.mpsutil.compare.testlang.mpl" folder="staging.comparator" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.compare/test.com.mbeddr.mpsutil.compare.msd" folder="staging.comparator" />
<modulePath path="$PROJECT_DIR$/tests/test.com.mbeddr.mpsutil.contextactions/tests.com.mbeddr.mpsutil.contextactions.msd" folder="rest.contextActions" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
<dependency reexport="false">6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)</dependency>
<dependency reexport="true">6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)</dependency>
<dependency reexport="false">8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)</dependency>
<dependency reexport="false">742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)</dependency>
<dependency reexport="false">86ef8290-12bb-4ca7-947f-093788f263a9(jetbrains.mps.lang.project)</dependency>
<dependency reexport="false">3f233e7f-b8a6-46d2-a57f-795d56775243(Annotations)</dependency>
<dependency reexport="false">498d89d2-c2e9-11e2-ad49-6cf049e62fe5(MPS.IDEA)</dependency>
<dependency reexport="false">ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)</dependency>
</dependencies>
<languageVersions>
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
Expand All @@ -43,13 +42,10 @@
<module reference="3f233e7f-b8a6-46d2-a57f-795d56775243(Annotations)" version="0" />
<module reference="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" version="0" />
<module reference="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" version="0" />
<module reference="1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)" version="0" />
<module reference="498d89d2-c2e9-11e2-ad49-6cf049e62fe5(MPS.IDEA)" version="0" />
<module reference="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" version="0" />
<module reference="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)" version="0" />
<module reference="c7a315e6-1d93-4186-85bc-2dfafd1ccc21(com.mbeddr.mpsutil.common)" version="0" />
<module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
<module reference="86ef8290-12bb-4ca7-947f-093788f263a9(jetbrains.mps.lang.project)" version="0" />
</dependencyVersions>
</solution>

Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
<imports>
<import index="c17a" ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.language(MPS.OpenAPI/)" />
<import index="w1kc" ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.smodel(MPS.Core/)" />
<import index="fyhk" ref="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61/java:jetbrains.mps(MPS.Platform/)" />
<import index="33ny" ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.util(JDK/)" />
<import index="vndm" ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.smodel.language(MPS.Core/)" />
<import index="mhbf" ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.model(MPS.OpenAPI/)" />
<import index="lui2" ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.module(MPS.OpenAPI/)" />
<import index="bd8o" ref="498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.openapi.application(MPS.IDEA/)" />
<import index="3a50" ref="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61/java:jetbrains.mps.ide(MPS.Platform/)" />
<import index="z1c3" ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.project(MPS.Core/)" />
<import index="tqvn" ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.smodel.tempmodel(MPS.Core/)" />
<import index="18ew" ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.util(MPS.Core/)" />
Expand Down
Loading

0 comments on commit 37040fa

Please sign in to comment.