Comments (8)
It actually only support references. Nodes that reference a single other node. You can use the parent construct to navigate to the opposite of children.
from dclareformps.
You need the structure of the language that you want to navigate imported in your Rule aspect model. It should show in the completion menu after a '.'.
from dclareformps.
Dit you get the ~ working?
from dclareformps.
No, but I also didn't try that hard.
Did I get it correctly, the ~
operator is essentially the same as node.parent
?
What's the big advantage of that?
I hoped for one of these:
A
has a referencex
toB
, and I can get the backwards reference efficiently (might be multivalued, i.e.A -x-> B
andC -x-> B
, therefore~xB
is{A, C}
)A
is in the original model, and I createB
with Dclare. Then~B
isA
.
from dclareformps.
Sorry for the misunderstanding, indeed the ~ is used to navigate in the opposite direction of references of nodes. Hence, not for navigating the opposite of children. What I meant is that you already can use the parent construct for that. So it is exactly what you expect.
I am still curious why it dit not work in your case. Can you give me the example?
from dclareformps.
It's in my "DetailsBack" example, branch master
, rule for IOverridable
.
I want to get all Override
s that point to my IOverridable
via Override.overrides
.
I tried to work around it with this ugliness (it's missing the filter to find only the ones pointing to this
):
from dclareformps.
I could see it in the scope menu. I wander why you do not see it. It is named ~overrides
Also make the attribute optional, because otherwise you get an inconsistency error when it is null (which may intentionally be the case here).
from dclareformps.
Aah, I thought it to be a prefix operator like ~this.Override::overrides.first
or something.
This way, it works for me too.
from dclareformps.
Related Issues (20)
- documentation is needed!
- Use C3 linearization for multimethod dispatch
- Cut/paste and undo/redo do not cause activations on child nodes HOT 1
- Quotation generation should not capture all variables in outer scope, but only variables that are referenced within the closure of the quotation
- Quotations that enclose outer variable references with types dependent on outer type parameters cannot compile
- Value structs should be able to have non constant methods
- Native change handlers are generated without using the meta language adapter for attribute reference
- Minor bug in DShape_GUI HOT 1
- ListBuilder everywhere
- Inner for StructBuilders
- Allow native groups to specify relative order
- compilation problem in repository rule HOT 1
- Anonymous structs with proper rules that capture nothing can have the wrong identity HOT 1
- the spacing between rules in the editors has vanished since we moved to MPS2022.3 HOT 1
- Differentiate MPS from Dclare checks with auto checking
- sometimes the engine threads get caught in ForkJoinPool.WorkQueue.helpComplete()
- Native block initialization order should depend on C3 linearization
- Evaluate and add return type to method specialization
- Composite attributes should be able to have a model type HOT 1
- Strange "TooManyChanges" exception (in cdm)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dclareformps.