Package org.eclipse.jface.text.hyperlink

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


                            final String skypeURL = skypeManager
                                .getSkypeURL(participants.get(0).getBareJID());
                            if (skypeURL != null) {
                                Utils.runSafeSWTSync(log, new Runnable() {
                                    public void run() {
                                        URLHyperlink link = new URLHyperlink(
                                            new Region(0, 0), skypeURL);
                                        link.open();
                                    }
                                });
                            }

                        }
View Full Code Here


    if (uriString != null) {
      String temp = uriString.toLowerCase();
      if (temp.startsWith(HTTP_PROTOCOL)) {
        // this is a URLHyperlink since this is a web address
        link = new URLHyperlink(hyperlinkRegion, uriString);
      }
      else if (temp.startsWith(JAR_PROTOCOL)) {
        // this is a URLFileHyperlink since this is a local address
        try {
          link = new URLFileRegionHyperlink(hyperlinkRegion, TAG, node.getLocalName(), new URL(uriString)) {
View Full Code Here

          IDE.openEditor(page, input, descriptor.getId(), true);
        }
      }
      catch (PartInitException e) {
        Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
        new URLHyperlink(fRegion, fURL.toString()).open();
      }
    }
  }
View Full Code Here

        }
        //always allow browser link (if uri is absolute, text editor will create URLHyperlink anyway)
        EObject actualNode=NodeModelUtils.findActualSemanticObjectFor(node);
        String uri = service.getUriString(actualNode);
        if(uri!=null && !isAbsoluteUri(actualNode)){
          URLHyperlink result = new URLHyperlink(region, uri);
          acceptor.accept(result);
        }
      } else if(!crossLinkedEObject.eIsProxy() && !(node.getGrammarElement() instanceof Keyword)) {
        //non-resource crosslinks are dealt with as in default implementation
        createHyperlinksTo(resource, region, crossLinkedEObject, acceptor);
View Full Code Here

        String revisionId = matcher.group(REVISION_ID_GROUP).trim();

        IRegion region = new Region(start, end - start);

        return new URLHyperlink(region, repository.getRepositoryUrl() + "/source/detail?r=" + revisionId);
    }
View Full Code Here

          Region region = createRegion(textOffset, matcher);
          hyperlinks.add(new TaskHyperlink(region, repository, taskId));
        } else if (user != null && project != null) {
          Region region = createRegion(textOffset, matcher);
          String url = GitHub.createGitHubUrl(user, project)+"/issues/issue/"+taskId;
          hyperlinks.add(new URLHyperlink(region, url));
        }
      }
    }
    return hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
  }
View Full Code Here

    String url = link.getUrl();
    IRegion region = new Region(offset, link.getLength());
    if(!url.startsWith("http")){
      url = "http://" + url;
    }
    return new URLHyperlink(region , url);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.hyperlink.URLHyperlink

Copyright © 2018 www.massapicom. 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.