X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2FProviderImager.java;h=3b848d1a791e38407fb6e35f58c19c157a9d8c96;hp=af3bb65ba0935ec71ec152b734a86a0a4a71b472;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/ProviderImager.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/ProviderImager.java index af3bb65ba..3b848d1a7 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/ProviderImager.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/ProviderImager.java @@ -1,41 +1,41 @@ -/******************************************************************************* - * 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 implements Imager { - - private final IMapProvider provider; - - public ProviderImager(IMapProvider 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; - } - } - -} +/******************************************************************************* + * 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 implements Imager { + + private final IMapProvider provider; + + public ProviderImager(IMapProvider 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; + } + } + +}