Examples of IHyperlink


Examples of org.eclipse.jface.text.hyperlink.IHyperlink

  }

  public IRegion getHyperlinkRegion() {
    IRegion region = null;

    IHyperlink link = getHyperlink();
    if (link != null) {
      region = link.getHyperlinkRegion();
    }
    return region;
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

  public String getHyperlinkText() {
    return JSPUIMessages.TLDHyperlink_hyperlinkText;
  }

  public void open() {
    IHyperlink link = getHyperlink();
    if (link != null) {
      link.open();
    }
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

        name = document.get(hyperlinkRegion.getOffset(), hyperlinkRegion.getLength()).trim();
      }
      catch (BadLocationException e) {
      }
      if (name != null) {
        IHyperlink link = createHyperlink(name, hyperlinkRegion, document);
        if (link != null)
          return new IHyperlink[]{link};
      }
    }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

   * @param uriString
   * @param hyperlinkRegion
   * @return IHyperlink
   */
  private IHyperlink createHyperlink(String uriString, IRegion hyperlinkRegion, IDocument document, Node node) {
    IHyperlink link = null;

    ICatalogEntry entry = getCatalogEntry(uriString);
    if (entry != null) {
      link = new CatalogEntryHyperlink(hyperlinkRegion, entry);
    }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

          currentNode = currentAttr;
        }
        // try to create hyperlink from information gathered
        if ((uriString != null) && (currentNode != null) && isValidURI(uriString)) {
          IRegion hyperlinkRegion = getHyperlinkRegion(currentNode);
          IHyperlink hyperlink = createHyperlink(uriString, hyperlinkRegion, document, currentNode);
          if (hyperlink != null) {
            hyperlinks.add(hyperlink);
          }
        }
      }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

   * (non-Javadoc)
   *
   * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
   */
  public String getHyperlinkText() {
    IHyperlink link = getHyperlink();
    if (link != null)
      return link.getHyperlinkText();
    return NLS.bind(XMLUIMessages.Open, fEntry.getKey());
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

   * (non-Javadoc)
   *
   * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
   */
  public String getTypeLabel() {
    IHyperlink link = getHyperlink();
    if (link != null)
      return link.getTypeLabel();
    return null;
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

   * (non-Javadoc)
   *
   * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
   */
  public void open() {
    IHyperlink link = getHyperlink();
    if (link != null)
      link.open();
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

    }
    return null;
  }

  public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
    IHyperlink hyperlink = detectHyperlink(textViewer.getDocument(), region.getOffset());
    if (hyperlink != null) {
      return new IHyperlink[] { hyperlink };
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.jface.text.hyperlink.IHyperlink

        if (attrs[i].getOffset() < offset && offset < attrs[i].getOffset() + attrs[i].getLength()) {
          int attrOffset = getAttributeValueOffset(doc.get(), attrs[i]);
          int attrLength = attrs[i].getValue().length();
          if (attrOffset >= 0 && attrLength >= 0 && attrOffset <= offset) {
            info = getOpenFileInfo(document, element, attrs[i].getName(), attrs[i].getValue(), offset - attrOffset);
            IHyperlink hyperlink = null;
            if (info != null && info.getObject() != null) {
              if (info.getObject() instanceof IHyperlink) {
                hyperlink = (IHyperlink) info.getObject();
              }
              else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.