Java Code Examples for com.google.javascript.rhino.JSDocInfo#setAssociatedNode()

The following examples show how to use com.google.javascript.rhino.JSDocInfo#setAssociatedNode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Closure_122_IRFactory_t.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 2
Source File: Closure_122_IRFactory_s.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 3
Source File: Closure_37_IRFactory_t.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 4
Source File: Closure_37_IRFactory_s.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 5
Source File: Closure_42_IRFactory_t.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 6
Source File: Closure_42_IRFactory_s.java    From coming with MIT License 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}
 
Example 7
Source File: IRFactory.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
private void setFileOverviewJsDoc(Node irNode) {
  // Only after we've seen all @fileoverview entries, attach the
  // last one to the root node, and copy the found license strings
  // to that node.
  JSDocInfo rootNodeJsDoc = rootNodeJsDocHolder.getJSDocInfo();
  if (rootNodeJsDoc != null) {
    irNode.setJSDocInfo(rootNodeJsDoc);
    rootNodeJsDoc.setAssociatedNode(irNode);
  }

  if (fileOverviewInfo != null) {
    if ((irNode.getJSDocInfo() != null) &&
        (irNode.getJSDocInfo().getLicense() != null)) {
      fileOverviewInfo.setLicense(irNode.getJSDocInfo().getLicense());
    }
    irNode.setJSDocInfo(fileOverviewInfo);
    fileOverviewInfo.setAssociatedNode(irNode);
  }
}