-// $Id$\r
-/**\r
-* Copyright (C) 2015 EDIT\r
-* European Distributed Institute of Taxonomy\r
-* http://www.e-taxonomy.eu\r
-*\r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-package eu.etaxonomy.taxeditor.editor.handler;\r
-\r
-\r
-import java.net.URL;\r
-\r
-import org.eclipse.core.runtime.FileLocator;\r
-import org.eclipse.core.runtime.Path;\r
-import org.eclipse.jface.resource.ImageDescriptor;\r
-\r
-import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;\r
-\r
-\r
-\r
-/**\r
- * Implements shared functionality for handler implementations using tool bar icons.\r
- *\r
- * @author Ben Stöver\r
- * @date 15.06.2015\r
- */\r
-public class HandlerTools { //TODO Move this class or method somewhere else?\r
- public static ImageDescriptor createImageDescriptor(String iconName) {\r
- URL url = FileLocator.find(TaxeditorEditorPlugin.getDefault().getBundle(),\r
- new Path("icons/" + iconName), null);\r
- if (url != null) {\r
- return ImageDescriptor.createFromURL(url);\r
- }\r
- else {\r
- throw new InternalError("Icon \"" + iconName + "\" could not be loaded."); //TODO Throw other type of exception?\r
- }\r
- }\r
-}\r