Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin 0.3 version features #15

Open
farost opened this issue Feb 26, 2024 · 2 comments
Open

Plugin 0.3 version features #15

farost opened this issue Feb 26, 2024 · 2 comments

Comments

@farost
Copy link
Member

farost commented Feb 26, 2024

We suggest to use this issue as a storage for the most needed features and hottest bugs introduced in the latest version. We may fix the whole bunch of it within the next update or consider creating a separate issue for global and long-lasting issues.

Features

Enhance code completion

Right now it works pretty good, but is really hardcoded. We'd like to spend more time exploring what's going on inside the logic and how to make it cleaner and more efficient.

Enhance name validation

It has been turned off as the generic one does it work well, but we are still interested in exploring the benefits we could get from a custom one.

Return and enhance inspection (unused things)

We disabled it until it works more consistent. Requires refactoring and reconsideration.

Cover everything we can with tests

Right now we only have tests for parsing, but we can do better.

Bugs

Cannot reference relations inside "plays" constraints.

For example, we have these relations and an entity, playing their roles. The highlighting for the role itself works well, which is shown below. However, we cannot highlight the reference to the relation.

Screenshot 2024-02-26 at 09 23 33 Screenshot 2024-02-26 at 09 24 49

This is an additional issue because of the renaming feature: as we don't have a reference, we cannot rename it:
Before renaming:
Screenshot 2024-02-26 at 09 25 56
Screenshot 2024-02-26 at 09 26 19

After renaming:
image

It looks like a grammar-based inconvenience right now as for plays constraints leafs (the minimal entities of the trees without children) are scoped labels without more specification for the labels it consists of.
image

I haven't tried to make two references on one token, though, maybe there is a way to do it. I could also just use children of the entity for additional names, which wouldn't be that generic and clean, but it should work. But right now it just doesn't look that fast, so I wanted to highlight it.

Do not resolve ambiguity well.

For example, we have an incorrect define statement with two concepts with the same name and an entity which "owns" one of these concepts:
image

Even if we don't highlight an error (as we are not a compiler itself), we could at least make referencing based on types. For example, we can store the type of the original concept and also use a "preferable" type for references:

  • "owns" can reference only attributes;
  • "plays" can reference only roles;
  • "sub" can only reference something declared via "sub";
  • ...
@farost
Copy link
Member Author

farost commented Feb 26, 2024

  • there are some refactoring TODOs in the code right now. It wants attention in the next iteration as well.

@farost farost changed the title Referencing bugs collection Plugin 0.3 version features Feb 27, 2024
@farost
Copy link
Member Author

farost commented Apr 5, 2024

Name validations are buggy now as they use the standard Java naming convention, which restricts such-names. To restore the name validator, we also need to restrict the main part of the special symbols and basically depend on our vocabulary. We also need to restrict using some of the keywords, but let the devs use RULE_unreserved tokens! So fixing it properly requires time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant