This is an automated email from the ASF dual-hosted git repository.
sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new a9985ddf6c Recursively print type parameter's type parameters.
new cfcc97ecc5 Merge pull request #4270 from
sdedic/groovy/virtualsource-generics
a9985ddf6c is described below
commit a9985ddf6c17b03f688f68909f94eabf4e7d5d28
Author: Svata Dedic <[email protected]>
AuthorDate: Wed Jun 22 17:17:48 2022 +0200
Recursively print type parameter's type parameters.
---
.../groovy/editor/api/parser/GroovyVirtualSourceProvider.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
index 9d303def45..6e3574d9ef 100644
---
a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
+++
b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
@@ -699,7 +699,12 @@ public class GroovyVirtualSourceProvider implements
VirtualSourceProvider {
if (genericsType.isPlaceholder()) {
out.print(genericsType.getName());
} else {
- printTypeName(genericsType.getType(), out);
+ // Note: Groovy's GenericsType.toString() uses Set<String> to
avoid
+ // recursion through placeholders; but the algorithm here
differs, bcs
+ // placeholders bypass this recursive invocation at all.
+ // If this simplified printing produces some errors, the algo
should be
+ // tuned to be like the GenericsType.toString one.
+ printType(genericsType.getType(), out);
ClassNode[] upperBounds = genericsType.getUpperBounds();
ClassNode lowerBound = genericsType.getLowerBound();
if (upperBounds != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists