jhipster / jhipster-ide

An IDE for the JHipster Domain Language
https://jhipster.github.io/jhipster-ide
127 stars 37 forks source link

Words that happen to be keywords elsewhere should not be flagged as errors in names #360

Closed deftdawg closed 4 years ago

deftdawg commented 4 years ago

Describe the bug Keywords that can be used as parts of names (i.e. config, entities) are valid as parts of names, however JDL IDE flags these as errors in the JDL.

If they must be flagged perhaps consider changing this type of error to a warning instead.

To Reproduce This JDL is valid in JDL, jhipster can generate packageName with "entities" as an element of the name.

application {
    config {
        packageName com.test.project.entities
    }
    entities *
}

DEFAULT_MIN_LENGTH = 2
DEFAULT_MAX_LENGTH = 50

entity Company {
    name String required minlength(DEFAULT_MIN_LENGTH)
    abbreviation String required 
    config String required
    entities String required
    logo String
} 

Expected behavior No errors in the above file

colameo commented 4 years ago

yep, this is a known limitation which can be fixed.

colameo commented 4 years ago

ok, something like this:

Screenshot 2020-07-30 at 13 28 31

need to polish a bit ;-)

deftdawg commented 4 years ago

Looking good! Thanks!

Curious what the annotation @Annto does? (I've not used annotations for anything yet)

colameo commented 4 years ago

Looking good! Thanks!

Curious what the annotation @Annto does? (I've not used annotations for anything yet)

custom annotations - see

deftdawg commented 4 years ago

@colameo looks like everything targeted for v2.3.1 is done, any idea when it would be released to be downloadable within VS-code?

colameo commented 4 years ago

this weekend