apache / incubator-kie-issues

Apache License 2.0
12 stars 1 forks source link

On the DMN Editor's Boxed Expression Editor, FEEL autocompletion does not suggest the type properties - Part 2 of 2 #1192

Open ljmotta opened 4 months ago

ljmotta commented 4 months ago

On a date and time duration it should appears the suggestion to access the days, hours, minutes and seconds as shown on the FEEL handbook [1]. The same apply for all built-in types.

example of duration: Screenshot 2024-05-10 163518

example of date: image

[1] https://kiegroup.github.io/dmn-feel-handbook/#feel-values

This issue is split into two parts. This ticket is related to Part 2. The Part 1 is here: https://github.com/apache/incubator-kie-issues/issues/1416

tiagobento commented 2 months ago

This issue is actually really complicated, because we would have to infer the type of an arbitrary expression to know what properties are available. A workaround would be to extract this to a context entry and access it in a explicitly-typed manner, like this:

image

However, as you can see, this is not working as well. I propose we fix this in two parts:

  1. Make the screenshot above work.
  2. Make the originally reported screenshots work.

cc @danielzhe