-/*******************************************************************************\r
- * Copyright (c) 2007, 2012 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.browsing.ui.swt;\r
-\r
-import org.simantics.browsing.ui.content.Imager;\r
-import org.simantics.utils.datastructures.cache.IMapProvider;\r
-import org.simantics.utils.datastructures.cache.ProvisionException;\r
-import org.simantics.utils.ui.ErrorLogger;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class ProviderImager<ImageDescriptor> implements Imager {\r
-\r
- private final IMapProvider<String, ImageDescriptor> provider;\r
-\r
- public ProviderImager(IMapProvider<String, ImageDescriptor> constants) {\r
- this.provider = constants;\r
- }\r
-\r
- @SuppressWarnings("unchecked")\r
- @Override\r
- public ImageDescriptor getImage(String key) {\r
- try {\r
- return provider.get(key);\r
- } catch (ProvisionException e) {\r
- ErrorLogger.defaultLogError(e);\r
- return null;\r
- }\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2012 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.browsing.ui.swt;
+
+import org.simantics.browsing.ui.content.Imager;
+import org.simantics.utils.datastructures.cache.IMapProvider;
+import org.simantics.utils.datastructures.cache.ProvisionException;
+import org.simantics.utils.ui.ErrorLogger;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class ProviderImager<ImageDescriptor> implements Imager {
+
+ private final IMapProvider<String, ImageDescriptor> provider;
+
+ public ProviderImager(IMapProvider<String, ImageDescriptor> constants) {
+ this.provider = constants;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public ImageDescriptor getImage(String key) {
+ try {
+ return provider.get(key);
+ } catch (ProvisionException e) {
+ ErrorLogger.defaultLogError(e);
+ return null;
+ }
+ }
+
+}