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
;
25 * <p>OpenExternalHelpHandler class.</p>
31 public class OpenExternalHelpHandler
extends AbstractHandler
{
32 private static final Logger logger
= Logger
.getLogger(OpenExternalHelpHandler
.class);
35 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
38 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
39 String url
= "http://wp5.e-taxonomy.eu/download/taxeditor/stable/EDITTaxonomicEditor-UserManual.pdf";
42 PlatformUI
.getWorkbench().getBrowserSupport().createBrowser
43 (IWorkbenchBrowserSupport
.AS_EXTERNAL
, "aCustomId", "url", "url").openURL(new URL(url
));
44 } catch (PartInitException e
) {
46 throw new RuntimeException(e
);
47 } catch (MalformedURLException e
) {
49 throw new RuntimeException(e
);