carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/providers/IconProvider.xpt
/*
* Copyright (c) 2007 Borland Software Corporation
*
* 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:
* Dmitry Stadnik (Borland) - initial API and implementation
*/
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
«DEFINE IconProvider FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::copyright FOR editorGen-»
package «providersPackageName»;
«EXPAND xpt::Common::generatedClassComment»
public class «iconProviderClassName» extends org.eclipse.gmf.runtime.common.core.service.AbstractProvider
implements org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider {
«EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.swt.graphics.Image getIcon(org.eclipse.core.runtime.IAdaptable hint, int flags) {
return «getElementTypesQualifiedClassName()».getImage(hint);
}
«EXPAND xpt::Common::generatedMemberComment»
public boolean provides(org.eclipse.gmf.runtime.common.core.service.IOperation operation) {
if (operation instanceof org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation) {
return ((org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation) operation).execute(this) != null;
}
return false;
}
«EXPAND additions-»
}
«ENDDEFINE»
«DEFINE additions FOR gmfgen::GenDiagram-»«ENDDEFINE»