コード例 #1
0
  @Override
  protected void doOKAction() {
    if (hasPatch()) {
      super.doOKAction();
      return;
    }

    if (myLatestBuild.getButtons().size() > 0) {
      BrowserUtil.launchBrowser(myLatestBuild.getButtons().get(0).getUrl());
    } else {
      openDownloadPage();
    }
    super.doOKAction();
  }
コード例 #2
0
 @Override
 public void selectIn(SelectInContext context, boolean requestFocus) {
   PsiElement psiElement = (PsiElement) context.getSelectorInFile();
   LOG.assertTrue(psiElement != null);
   PsiFile psiFile = psiElement.getContainingFile();
   LOG.assertTrue(psiFile != null);
   try {
     Url url = WebBrowserService.getInstance().getUrlToOpen(psiFile, false);
     if (url != null) {
       ApplicationManager.getApplication().saveAll();
       BrowserUtil.launchBrowser(url.toExternalForm());
     }
   } catch (WebBrowserUrlProvider.BrowserException e1) {
     Messages.showErrorDialog(e1.getMessage(), XmlBundle.message("browser.error"));
   } catch (Exception e1) {
     LOG.error(e1);
   }
 }
コード例 #3
0
 private void openDownloadPage() {
   BrowserUtil.launchBrowser(myUpdatedChannel.getHomePageUrl());
 }
コード例 #4
0
 @Override
 public void actionPerformed(ActionEvent e) {
   BrowserUtil.launchBrowser(myInfo.getUrl());
 }
コード例 #5
0
 @Override
 public void actionPerformed(AnActionEvent e) {
   BrowserUtil.launchBrowser(myUrl);
 }