Skip to content

Commit 34c3cd8

Browse files
committed
Allow references to libraries in other models
1 parent 9eda7fe commit 34c3cd8

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

samples/robot_Kaja/languages/Kajak/languageModels/constraints.mps

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@
102102
</concept>
103103
<concept id="1143234257716" name="jetbrains.mps.lang.smodel.structure.Node_GetModelOperation" flags="nn" index="I4A8Y" />
104104
<concept id="1171305280644" name="jetbrains.mps.lang.smodel.structure.Node_GetDescendantsOperation" flags="nn" index="2Rf3mk" />
105-
<concept id="1171315804604" name="jetbrains.mps.lang.smodel.structure.Model_RootsOperation" flags="nn" index="2RRcyG">
106-
<reference id="1171315804605" name="concept" index="2RRcyH" />
107-
</concept>
108105
<concept id="1171407110247" name="jetbrains.mps.lang.smodel.structure.Node_GetAncestorOperation" flags="nn" index="2Xjw5R" />
109106
<concept id="2644386474301421077" name="jetbrains.mps.lang.smodel.structure.LinkIdRefExpression" flags="nn" index="359W_D">
110107
<reference id="2644386474301421078" name="conceptDeclaration" index="359W_E" />
111108
<reference id="2644386474301421079" name="linkDeclaration" index="359W_F" />
112109
</concept>
110+
<concept id="1176109685393" name="jetbrains.mps.lang.smodel.structure.Model_RootsIncludingImportedOperation" flags="nn" index="3lApI0">
111+
<reference id="1176109685394" name="concept" index="3lApI3" />
112+
</concept>
113113
<concept id="1139613262185" name="jetbrains.mps.lang.smodel.structure.Node_GetParentOperation" flags="nn" index="1mfA1w" />
114114
<concept id="1139621453865" name="jetbrains.mps.lang.smodel.structure.Node_IsInstanceOfOperation" flags="nn" index="1mIQ4w">
115115
<child id="1177027386292" name="conceptArgument" index="cj9EA" />
@@ -392,8 +392,8 @@
392392
<node concept="2rP1CM" id="5Vvmn_Ql3Pe" role="2Oq$k0" />
393393
<node concept="I4A8Y" id="5Vvmn_Ql3Pf" role="2OqNvi" />
394394
</node>
395-
<node concept="2RRcyG" id="5Vvmn_Ql3Oq" role="2OqNvi">
396-
<ref role="2RRcyH" to="c2kz:3NWQyev6tcm" resolve="Library" />
395+
<node concept="3lApI0" id="5xUc3k5AmDe" role="2OqNvi">
396+
<ref role="3lApI3" to="c2kz:3NWQyev6tcm" resolve="Library" />
397397
</node>
398398
</node>
399399
<node concept="3zZkjj" id="5Vvmn_Ql3Or" role="2OqNvi">
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<dependencies version="2" modelHash="-2ka3yh97j35idl1hfrxknjldqibbx8m" />
2+
<dependencies version="2" modelHash="-v62hx5iccadxc3z4ikz58lj3aph3ec" />
33

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<dependencies version="2" modelHash="-4yeqtabld885uwe2jjmtuggmk566j9s" />
2+
<dependencies version="2" modelHash="-6nj097xgcgbndo54fz7xevf4vatclmi" />
33

samples/robot_Kaja/languages/Kajak/source_gen/jetbrains/mps/samples/Kaja/constraints/Require_Constraints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public SNodeReference getSearchScopeValidatorNode() {
7272
@Override
7373
public Scope createScope(final IOperationContext operationContext, final ReferenceConstraintsContext _context) {
7474
{
75-
final Iterable<SNode> libraries = ListSequence.fromList(SModelOperations.roots(SNodeOperations.getModel(_context.getContextNode()), MetaAdapterFactory.getConcept(0x49a08c51fe543ccL, 0xbd998b46d641d7f5L, 0x3cfcda239f19d316L, "jetbrains.mps.samples.Kaja.structure.Library"))).where(new IWhereFilter<SNode>() {
75+
final Iterable<SNode> libraries = ListSequence.fromList(SModelOperations.rootsIncludingImported(SNodeOperations.getModel(_context.getContextNode()), MetaAdapterFactory.getConcept(0x49a08c51fe543ccL, 0xbd998b46d641d7f5L, 0x3cfcda239f19d316L, "jetbrains.mps.samples.Kaja.structure.Library"))).where(new IWhereFilter<SNode>() {
7676
public boolean accept(final SNode library) {
7777
return ListSequence.fromList(SNodeOperations.getNodeDescendants(SNodeOperations.getNodeAncestor(_context.getContextNode(), MetaAdapterFactory.getConcept(0x49a08c51fe543ccL, 0xbd998b46d641d7f5L, 0x2d523c5e4cc45746L, "jetbrains.mps.samples.Kaja.structure.Script"), true, false), MetaAdapterFactory.getConcept(0x49a08c51fe543ccL, 0xbd998b46d641d7f5L, 0x3cfcda239f1a1049L, "jetbrains.mps.samples.Kaja.structure.Require"), false, new SAbstractConcept[]{})).where(new IWhereFilter<SNode>() {
7878
public boolean accept(SNode it) {

samples/robot_Kaja/languages/Kajak/source_gen/jetbrains/mps/samples/Kaja/constraints/aspectcps-descriptorclasses.mps

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@
185185
</concept>
186186
<concept id="1143234257716" name="jetbrains.mps.lang.smodel.structure.Node_GetModelOperation" flags="nn" index="I4A8Y" />
187187
<concept id="1171305280644" name="jetbrains.mps.lang.smodel.structure.Node_GetDescendantsOperation" flags="nn" index="2Rf3mk" />
188-
<concept id="1171315804604" name="jetbrains.mps.lang.smodel.structure.Model_RootsOperation" flags="nn" index="2RRcyG">
189-
<reference id="1171315804605" name="concept" index="2RRcyH" />
190-
</concept>
191188
<concept id="1171407110247" name="jetbrains.mps.lang.smodel.structure.Node_GetAncestorOperation" flags="nn" index="2Xjw5R" />
192189
<concept id="2644386474301421077" name="jetbrains.mps.lang.smodel.structure.LinkIdRefExpression" flags="nn" index="359W_D">
193190
<reference id="2644386474301421078" name="conceptDeclaration" index="359W_E" />
@@ -197,6 +194,9 @@
197194
<concept id="1154546950173" name="jetbrains.mps.lang.smodel.structure.ConceptReference" flags="ng" index="3gn64h">
198195
<reference id="1154546997487" name="concept" index="3gnhBz" />
199196
</concept>
197+
<concept id="1176109685393" name="jetbrains.mps.lang.smodel.structure.Model_RootsIncludingImportedOperation" flags="nn" index="3lApI0">
198+
<reference id="1176109685394" name="concept" index="3lApI3" />
199+
</concept>
200200
<concept id="1139613262185" name="jetbrains.mps.lang.smodel.structure.Node_GetParentOperation" flags="nn" index="1mfA1w" />
201201
<concept id="1139621453865" name="jetbrains.mps.lang.smodel.structure.Node_IsInstanceOfOperation" flags="nn" index="1mIQ4w">
202202
<child id="1177027386292" name="conceptArgument" index="cj9EA" />
@@ -1435,11 +1435,11 @@
14351435
</node>
14361436
</node>
14371437
</node>
1438-
<node concept="2RRcyG" id="7E" role="2OqNvi">
1439-
<ref role="2RRcyH" to="c2kz:3NWQyev6tcm" resolve="Library" />
1438+
<node concept="3lApI0" id="7E" role="2OqNvi">
1439+
<ref role="3lApI3" to="c2kz:3NWQyev6tcm" resolve="Library" />
14401440
<node concept="cd27G" id="7Q" role="lGtFl">
14411441
<node concept="3u3nmq" id="7R" role="cd27D">
1442-
<property role="3u3nmv" value="6836281137582849306" />
1442+
<property role="3u3nmv" value="6375461226781698638" />
14431443
</node>
14441444
</node>
14451445
</node>

samples/robot_Kaja/languages/Kajak/source_gen/jetbrains/mps/samples/Kaja/constraints/trace.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<unit id="6836281137582849334" at="81,32,85,19" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2$1$1$2" />
212212
<unit id="6836281137582849343" at="85,29,89,19" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2$1$1$3" />
213213
<unit id="4394627182934757713" at="43,15,54,5" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$1" />
214-
<unit id="6836281137582849308" at="75,298,91,15" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2$1$1" />
214+
<unit id="6836281137582849308" at="75,315,91,15" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2$1$1" />
215215
<unit id="4394627182935253713" at="67,19,95,9" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2$1" />
216216
<unit id="4394627182935253713" at="59,154,97,5" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints$2" />
217217
<unit id="4394627182934757713" at="36,0,106,0" name="jetbrains.mps.samples.Kaja.constraints.Require_Constraints" />

0 commit comments

Comments
 (0)