Project

General

Profile

Download (1.58 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
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.
9
*/
10

    
11
package eu.etaxonomy.taxeditor;
12

    
13
import java.net.MalformedURLException;
14
import java.net.URL;
15

    
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;
23

    
24
/**
25
 * @author p.ciardelli
26
 * @created 04.09.2009
27
 * @version 1.0
28
 */
29
public class OpenExternalParserHelpHandler extends AbstractHandler {
30
	private static final Logger logger = Logger.getLogger(OpenExternalParserHelpHandler.class);
31

    
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
34
	 */
35
	public Object execute(ExecutionEvent event) throws ExecutionException {
36
		String url = "http://dev.e-taxonomy.eu/trac/wiki/NameParserDocumentation";
37
		try {
38
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser
39
					(IWorkbenchBrowserSupport.AS_EXTERNAL, "aCustomId", "url", "url").openURL(new URL(url));
40
		} catch (PartInitException e) {
41
			// TODO Auto-generated catch block
42
			e.printStackTrace();
43
		} catch (MalformedURLException e) {
44
			// TODO Auto-generated catch block
45
			e.printStackTrace();
46
		}
47
		return null;
48
	}
49
}
(7-7/11)