Giter VIP home page Giter VIP logo

Comments (8)

WimBast avatar WimBast commented on June 2, 2024

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.

WimBast avatar WimBast commented on June 2, 2024

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.

WimBast avatar WimBast commented on June 2, 2024

Dit you get the ~ working?

from dclareformps.

enikao avatar enikao commented on June 2, 2024

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:

  1. A has a reference x to B, and I can get the backwards reference efficiently (might be multivalued, i.e. A -x-> B and C -x-> B, therefore ~xB is {A, C})
  2. A is in the original model, and I create B with Dclare. Then ~B is A.

from dclareformps.

WimBast avatar WimBast commented on June 2, 2024

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.

enikao avatar enikao commented on June 2, 2024

It's in my "DetailsBack" example, branch master, rule for IOverridable.
I want to get all Overrides 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):

image

from dclareformps.

WimBast avatar WimBast commented on June 2, 2024

I could see it in the scope menu. I wander why you do not see it. It is named ~overrides

tilde

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.

enikao avatar enikao commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.