You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Svatopluk Dedic (Jira)" <ji...@apache.org> on 2021/09/15 14:25:00 UTC
[jira] [Commented] (NETBEANS-6003) Groovy code completion does not
offer field constants for enum values
[ https://issues.apache.org/jira/browse/NETBEANS-6003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17415548#comment-17415548 ]
Svatopluk Dedic commented on NETBEANS-6003:
-------------------------------------------
The AST node is replaced rather early, at the start of semanticAnalysis phase. IMHO best fixed directly in Groovy compiler - some trace should be left in node's metadata; the constants may have to be copied - e.g. enum values are returned directly from the field's initialValueExpression.
> Groovy code completion does not offer field constants for enum values
> ---------------------------------------------------------------------
>
> Key: NETBEANS-6003
> URL: https://issues.apache.org/jira/browse/NETBEANS-6003
> Project: NetBeans
> Issue Type: Bug
> Components: groovy - Editor
> Reporter: Svatopluk Dedic
> Priority: Major
>
> [https://github.com/micronaut-projects/micronaut-core/blob/3.0.x/http-server-netty/src/test/groovy/io/micronaut/http/server/netty/sse/ServerSentEventSpec.groovy#L94]
> The member values of the annotation are evaluated compile-time into *ConstantExpressions* while the original *PropertyExpression* that would provide the proper Class context for the code completion is complete gone.
> The resulting ConstantExpression even does not contain line/column information copied fro the original source; so it won't be properly matched in AST against the source.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists