public boolean canReferencePackage(int index) {
    if (index == myReferences.length - 1) return false;
    String text = getElement().getText();
    int endOffset = myReferences[index].getRangeInElement().getEndOffset();
    return !StringUtil.isChar(text, endOffset, DOLLAR);
  }
public boolean canReferencePackage(int index)