f150a6e06a2229449c628a982c9ceba1c51193c2
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
;
13 import java
.net
.MalformedURLException
;
16 import org
.apache
.log4j
.Logger
;
17 import org
.eclipse
.core
.commands
.AbstractHandler
;
18 import org
.eclipse
.core
.commands
.ExecutionEvent
;
19 import org
.eclipse
.core
.commands
.ExecutionException
;
20 import org
.eclipse
.ui
.PartInitException
;
21 import org
.eclipse
.ui
.PlatformUI
;
22 import org
.eclipse
.ui
.browser
.IWorkbenchBrowserSupport
;
29 public class OpenExternalHelpHandler
extends AbstractHandler
{
30 private static final Logger logger
= Logger
.getLogger(OpenExternalHelpHandler
.class);
33 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
35 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
36 String url
= "http://wp5.e-taxonomy.eu/download/taxeditor/stable/EDITTaxonomicEditor-UserManual.pdf";
39 PlatformUI
.getWorkbench().getBrowserSupport().createBrowser
40 (IWorkbenchBrowserSupport
.AS_EXTERNAL
, "aCustomId", "url", "url").openURL(new URL(url
));
41 } catch (PartInitException e
) {
43 throw new RuntimeException(e
);
44 } catch (MalformedURLException e
) {
46 throw new RuntimeException(e
);