cuba-platform / cuba-gradle-plugin

Gradle plugin for building CUBA platform and applications
https://www.cuba-platform.com
Apache License 2.0
15 stars 18 forks source link

Ability to use view names as class constants #9

Open haulmont-git opened 8 years ago

haulmont-git commented 8 years ago

Problem: When we use JPA Query, we often write a view's name just as a text. After refactoring some names in views.xml can be removed or changed. However, a view's name in code can't be refactored because it text, of course.

Solve: I suggest adding to Gradle a task that will generate a class (e.g ViewRepository) with constants for view.xml. Such mechanism there is in Android SDK and called as R.java (the dynamically generated class).


Original issue: https://youtrack.haulmont.com/issue/PL-7022