1 | /* |
2 | * Copyright 2006 SDQ Research Group, University of Karlsruhe (TH) |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.seff.navigator; |
5 | |
6 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; |
7 | import org.eclipse.jface.viewers.ILabelProviderListener; |
8 | import org.eclipse.swt.graphics.Image; |
9 | import org.eclipse.ui.IMemento; |
10 | import org.eclipse.ui.navigator.ICommonContentExtensionSite; |
11 | import org.eclipse.ui.navigator.ICommonLabelProvider; |
12 | |
13 | import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelSeffDiagramEditorPlugin; |
14 | |
15 | /** |
16 | * @generated |
17 | */ |
18 | public class PalladioComponentModelDomainNavigatorLabelProvider implements |
19 | ICommonLabelProvider { |
20 | |
21 | /** |
22 | * @generated |
23 | */ |
24 | private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider( |
25 | PalladioComponentModelSeffDiagramEditorPlugin.getInstance() |
26 | .getItemProvidersAdapterFactory()); |
27 | |
28 | /** |
29 | * @generated |
30 | */ |
31 | public void init(ICommonContentExtensionSite aConfig) { |
32 | } |
33 | |
34 | /** |
35 | * @generated |
36 | */ |
37 | public Image getImage(Object element) { |
38 | if (element instanceof PalladioComponentModelDomainNavigatorItem) { |
39 | return myAdapterFactoryLabelProvider |
40 | .getImage(((PalladioComponentModelDomainNavigatorItem) element) |
41 | .getEObject()); |
42 | } |
43 | return null; |
44 | } |
45 | |
46 | /** |
47 | * @generated |
48 | */ |
49 | public String getText(Object element) { |
50 | if (element instanceof PalladioComponentModelDomainNavigatorItem) { |
51 | return myAdapterFactoryLabelProvider |
52 | .getText(((PalladioComponentModelDomainNavigatorItem) element) |
53 | .getEObject()); |
54 | } |
55 | return null; |
56 | } |
57 | |
58 | /** |
59 | * @generated |
60 | */ |
61 | public void addListener(ILabelProviderListener listener) { |
62 | myAdapterFactoryLabelProvider.addListener(listener); |
63 | } |
64 | |
65 | /** |
66 | * @generated |
67 | */ |
68 | public void dispose() { |
69 | myAdapterFactoryLabelProvider.dispose(); |
70 | } |
71 | |
72 | /** |
73 | * @generated |
74 | */ |
75 | public boolean isLabelProperty(Object element, String property) { |
76 | return myAdapterFactoryLabelProvider.isLabelProperty(element, property); |
77 | } |
78 | |
79 | /** |
80 | * @generated |
81 | */ |
82 | public void removeListener(ILabelProviderListener listener) { |
83 | myAdapterFactoryLabelProvider.removeListener(listener); |
84 | } |
85 | |
86 | /** |
87 | * @generated |
88 | */ |
89 | public void restoreState(IMemento aMemento) { |
90 | } |
91 | |
92 | /** |
93 | * @generated |
94 | */ |
95 | public void saveState(IMemento aMemento) { |
96 | } |
97 | |
98 | /** |
99 | * @generated |
100 | */ |
101 | public String getDescription(Object anElement) { |
102 | return null; |
103 | } |
104 | |
105 | } |