Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Fix parameter info not showing issue in connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Shan1024 committed Aug 22, 2017
1 parent 217d74a commit c40f09e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ private void setItemsToShow(PsiElement element, PsiElement parent, CreateParamet
PsiElement namedIdentifierDefNode = null;

if (parent instanceof ExpressionListNode || parent instanceof FunctionInvocationStatementNode
|| parent instanceof ConnectorInitExpressionNode || parent instanceof ExpressionNode) {
|| parent instanceof ExpressionNode) {
namedIdentifierDefNode = PsiTreeUtil.findChildOfType(parent, NameReferenceNode.class);
} else if (parent instanceof NameReferenceNode || parent instanceof FunctionReferenceNode
|| parent instanceof ConnectorReferenceNode || parent instanceof ActionInvocationNode) {
namedIdentifierDefNode = parent;
} else if (parent instanceof ConnectorInitExpressionNode) {
namedIdentifierDefNode = PsiTreeUtil.findChildOfType(parent, ConnectorReferenceNode.class);
}

PsiElement nameIdentifier = null;
Expand Down Expand Up @@ -292,10 +294,10 @@ private void setItemsToShow(PsiElement element, PsiElement parent, CreateParamet
isResolved = true;
// Resolved element will be the identifier of the function node. So we get the parent
// node (FunctionDefinitionNode).
PsiElement functionNode = resolvedElement.getParent();
PsiElement definitionNode = resolvedElement.getParent();
// Since we need the ParameterListNode, search for ParameterListNode child node.
ParameterListNode parameterListNode =
PsiTreeUtil.findChildOfType(functionNode, ParameterListNode.class);
PsiTreeUtil.findChildOfType(definitionNode, ParameterListNode.class);
// Add to the list if the result is not null.
if (parameterListNode != null) {
list.add(parameterListNode);
Expand Down

0 comments on commit c40f09e

Please sign in to comment.