422
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Borland Software Corporation
|
|
3 |
*
|
|
4 |
* All rights reserved. This program and the accompanying materials
|
|
5 |
* are made available under the terms of the Eclipse Public License v1.0
|
|
6 |
* which accompanies this distribution, and is available at
|
|
7 |
* http://www.eclipse.org/legal/epl-v10.html
|
|
8 |
*
|
|
9 |
* Contributors:
|
|
10 |
* Dmitry Stadnik (Borland) - initial API and implementation
|
|
11 |
*/
|
|
12 |
|
|
13 |
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
|
|
14 |
|
|
15 |
«DEFINE IconProvider FOR gmfgen::GenDiagram-»
|
|
16 |
«EXPAND xpt::Common::copyright FOR editorGen-»
|
|
17 |
package «providersPackageName»;
|
|
18 |
|
|
19 |
«EXPAND xpt::Common::generatedClassComment»
|
|
20 |
public class «iconProviderClassName» extends org.eclipse.gmf.runtime.common.core.service.AbstractProvider
|
|
21 |
implements org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider {
|
|
22 |
|
|
23 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
24 |
public org.eclipse.swt.graphics.Image getIcon(org.eclipse.core.runtime.IAdaptable hint, int flags) {
|
|
25 |
return «getElementTypesQualifiedClassName()».getImage(hint);
|
|
26 |
}
|
|
27 |
|
|
28 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
29 |
public boolean provides(org.eclipse.gmf.runtime.common.core.service.IOperation operation) {
|
|
30 |
if (operation instanceof org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation) {
|
|
31 |
return ((org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation) operation).execute(this) != null;
|
|
32 |
}
|
|
33 |
return false;
|
|
34 |
}
|
|
35 |
«EXPAND additions-»
|
|
36 |
}
|
|
37 |
«ENDDEFINE»
|
|
38 |
|
|
39 |
«DEFINE additions FOR gmfgen::GenDiagram-»«ENDDEFINE»
|