Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 43493d77ed77a2276713d77937269f4a4e8826ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * 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»

Back to the top