コード例 #1
0
 @Override
 protected GrReferenceExpression bindWithQualifiedRef(@NotNull String qName) {
   GrReferenceExpression qualifiedRef =
       GroovyPsiElementFactory.getInstance(getProject()).createReferenceExpressionFromText(qName);
   final GrTypeArgumentList list = getTypeArgumentList();
   if (list != null) {
     qualifiedRef.getNode().addChild(list.copy().getNode());
   }
   getNode().getTreeParent().replaceChild(getNode(), qualifiedRef.getNode());
   return qualifiedRef;
 }
コード例 #2
0
 @Override
 protected GrReferenceExpression bindWithQualifiedRef(@NotNull String qName) {
   final GrTypeArgumentList list = getTypeArgumentList();
   final String typeArgs = (list != null) ? list.getText() : "";
   final String text = qName + typeArgs;
   GrReferenceExpression qualifiedRef =
       GroovyPsiElementFactory.getInstance(getProject()).createReferenceExpressionFromText(text);
   getNode().getTreeParent().replaceChild(getNode(), qualifiedRef.getNode());
   return qualifiedRef;
 }