EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.gmf.repository.navigator]

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelNavigatorLabelProvider.java]

nameclass, %method, %block, %line, %
PalladioComponentModelNavigatorLabelProvider.java0%   (0/1)0%   (0/39)0%   (0/1199)0%   (0/405)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelNavigatorLabelProvider0%   (0/1)0%   (0/39)0%   (0/1199)0%   (0/405)
<static initializer> 0%   (0/1)0%   (0/11)0%   (0/9)
PalladioComponentModelNavigatorLabelProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getBasicComponent_2102Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getCompleteComponentTypeParentProvidesComponentTypes_4104Text (View): String 0%   (0/1)0%   (0/33)0%   (0/12)
getCompleteComponentType_2104Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getCompositeComponent_2103Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getDescription (Object): String 0%   (0/1)0%   (0/2)0%   (0/1)
getEventGroup_2108Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getEventType_3107Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getImage (Object): Image 0%   (0/1)0%   (0/35)0%   (0/10)
getImage (String, IElementType): Image 0%   (0/1)0%   (0/33)0%   (0/12)
getImage (View): Image 0%   (0/1)0%   (0/128)0%   (0/50)
getImplementationComponentTypeParentCompleteComponentTypes_4103Text (View): S... 0%   (0/1)0%   (0/33)0%   (0/12)
getInfrastructureInterface_2109Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getInfrastructureProvidedRole_4111Text (View): String 0%   (0/1)0%   (0/33)0%   (0/12)
getInfrastructureRequiredRole_4112Text (View): String 0%   (0/1)0%   (0/33)0%   (0/12)
getInfrastructureSignature_3108Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getOperationInterface_2107Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getOperationProvidedRole_4105Text (View): String 0%   (0/1)0%   (0/33)0%   (0/11)
getOperationRequiredRole_4106Text (View): String 0%   (0/1)0%   (0/33)0%   (0/11)
getOperationSignature_3106Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getPassiveResource_3103Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getProvidesComponentType_2105Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getRepository_1000Text (View): String 0%   (0/1)0%   (0/14)0%   (0/7)
getResourceDemandingSEFF_3102Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getSinkRole_4109Text (View): String 0%   (0/1)0%   (0/33)0%   (0/11)
getSourceRole_4110Text (View): String 0%   (0/1)0%   (0/33)0%   (0/11)
getSubSystem_2106Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getText (Object): String 0%   (0/1)0%   (0/31)0%   (0/9)
getText (View): String 0%   (0/1)0%   (0/114)0%   (0/28)
getUnknownElementText (View): String 0%   (0/1)0%   (0/11)0%   (0/1)
getUnresolvedDomainElementProxyText (View): String 0%   (0/1)0%   (0/11)0%   (0/1)
getVariableCharacterisation_3105Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getVariableUsage_3104Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
init (ICommonContentExtensionSite): void 0%   (0/1)0%   (0/1)0%   (0/1)
isOwnView (View): boolean 0%   (0/1)0%   (0/5)0%   (0/2)
restoreState (IMemento): void 0%   (0/1)0%   (0/1)0%   (0/1)
saveState (IMemento): void 0%   (0/1)0%   (0/1)0%   (0/1)
updateLabel (ViewerLabel, TreePath): void 0%   (0/1)0%   (0/24)0%   (0/8)

1/*
2 * Copyright 2007, IPD, SDQ, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.repository.navigator;
5 
6import org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint;
7import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
8import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
9import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
10import org.eclipse.gmf.runtime.emf.type.core.IElementType;
11import org.eclipse.gmf.runtime.notation.View;
12import org.eclipse.jface.resource.ImageDescriptor;
13import org.eclipse.jface.resource.ImageRegistry;
14import org.eclipse.jface.viewers.ITreePathLabelProvider;
15import org.eclipse.jface.viewers.LabelProvider;
16import org.eclipse.jface.viewers.TreePath;
17import org.eclipse.jface.viewers.ViewerLabel;
18import org.eclipse.swt.graphics.Image;
19import org.eclipse.ui.IMemento;
20import org.eclipse.ui.navigator.ICommonContentExtensionSite;
21import org.eclipse.ui.navigator.ICommonLabelProvider;
22 
23import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.BasicComponentEditPart;
24import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.BasicComponentEntityNameEditPart;
25import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.CompleteComponentTypeEditPart;
26import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.CompleteComponentTypeEntityNameEditPart;
27import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.CompleteComponentTypeParentProvidesComponentTypesEditPart;
28import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.CompositeComponentEditPart;
29import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.CompositeComponentEntityNameEditPart;
30import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.EventGroupEditPart;
31import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.EventGroupEntityNameEditPart;
32import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.EventTypeEditPart;
33import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.ImplementationComponentTypeParentCompleteComponentTypesEditPart;
34import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.InfrastructureInterfaceEditPart;
35import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.InfrastructureInterfaceEntityNameEditPart;
36import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.InfrastructureProvidedRoleEditPart;
37import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.InfrastructureRequiredRoleEditPart;
38import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.InfrastructureSignatureEditPart;
39import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.OperationInterfaceEditPart;
40import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.OperationInterfaceEntityNameEditPart;
41import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.OperationProvidedRoleEditPart;
42import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.OperationRequiredRoleEditPart;
43import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.OperationSignatureEditPart;
44import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.PassiveResourceEditPart;
45import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.ProvidesComponentTypeEditPart;
46import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.ProvidesComponentTypeEntityNameEditPart;
47import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.RepositoryEditPart;
48import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.ResourceDemandingSEFFEditPart;
49import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.SinkRoleEditPart;
50import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.SourceRoleEditPart;
51import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.SubSystemEditPart;
52import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.SubSystemEntityNameEditPart;
53import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.VariableCharacterisationEditPart;
54import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.VariableUsageEditPart;
55import de.uka.ipd.sdq.pcm.gmf.repository.edit.parts.VariableUsageLabelEditPart;
56import de.uka.ipd.sdq.pcm.gmf.repository.part.PalladioComponentModelRepositoryDiagramEditorPlugin;
57import de.uka.ipd.sdq.pcm.gmf.repository.part.PalladioComponentModelVisualIDRegistry;
58import de.uka.ipd.sdq.pcm.gmf.repository.providers.PalladioComponentModelElementTypes;
59import de.uka.ipd.sdq.pcm.gmf.repository.providers.PalladioComponentModelParserProvider;
60import de.uka.ipd.sdq.pcm.repository.Repository;
61import de.uka.ipd.sdq.pcm.repository.SourceRole;
62 
63/**
64 * @generated
65 */
66public class PalladioComponentModelNavigatorLabelProvider extends LabelProvider
67                implements ICommonLabelProvider, ITreePathLabelProvider {
68 
69        /**
70         * @generated
71         */
72        static {
73                PalladioComponentModelRepositoryDiagramEditorPlugin
74                                .getInstance()
75                                .getImageRegistry()
76                                .put(
77                                                "Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
78                PalladioComponentModelRepositoryDiagramEditorPlugin
79                                .getInstance()
80                                .getImageRegistry()
81                                .put(
82                                                "Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
83        }
84 
85        /**
86         * @generated
87         */
88        public void updateLabel(ViewerLabel label, TreePath elementPath) {
89                Object element = elementPath.getLastSegment();
90                if (element instanceof PalladioComponentModelNavigatorItem
91                                && !isOwnView(((PalladioComponentModelNavigatorItem) element)
92                                                .getView())) {
93                        return;
94                }
95                label.setText(getText(element));
96                label.setImage(getImage(element));
97        }
98 
99        /**
100         * @generated
101         */
102        public Image getImage(Object element) {
103                if (element instanceof PalladioComponentModelNavigatorGroup) {
104                        PalladioComponentModelNavigatorGroup group = (PalladioComponentModelNavigatorGroup) element;
105                        return PalladioComponentModelRepositoryDiagramEditorPlugin
106                                        .getInstance().getBundledImage(group.getIcon());
107                }
108 
109                if (element instanceof PalladioComponentModelNavigatorItem) {
110                        PalladioComponentModelNavigatorItem navigatorItem = (PalladioComponentModelNavigatorItem) element;
111                        if (!isOwnView(navigatorItem.getView())) {
112                                return super.getImage(element);
113                        }
114                        return getImage(navigatorItem.getView());
115                }
116 
117                return super.getImage(element);
118        }
119 
120        /**
121         * @generated
122         */
123        public Image getImage(View view) {
124                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
125                case RepositoryEditPart.VISUAL_ID:
126                        return getImage(
127                                        "Navigator?Diagram?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?Repository", PalladioComponentModelElementTypes.Repository_1000); //$NON-NLS-1$
128                case OperationInterfaceEditPart.VISUAL_ID:
129                        return getImage(
130                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?OperationInterface", PalladioComponentModelElementTypes.OperationInterface_2107); //$NON-NLS-1$
131                case EventGroupEditPart.VISUAL_ID:
132                        return getImage(
133                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?EventGroup", PalladioComponentModelElementTypes.EventGroup_2108); //$NON-NLS-1$
134                case BasicComponentEditPart.VISUAL_ID:
135                        return getImage(
136                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?BasicComponent", PalladioComponentModelElementTypes.BasicComponent_2102); //$NON-NLS-1$
137                case CompositeComponentEditPart.VISUAL_ID:
138                        return getImage(
139                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?CompositeComponent", PalladioComponentModelElementTypes.CompositeComponent_2103); //$NON-NLS-1$
140                case CompleteComponentTypeEditPart.VISUAL_ID:
141                        return getImage(
142                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?CompleteComponentType", PalladioComponentModelElementTypes.CompleteComponentType_2104); //$NON-NLS-1$
143                case ProvidesComponentTypeEditPart.VISUAL_ID:
144                        return getImage(
145                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?ProvidesComponentType", PalladioComponentModelElementTypes.ProvidesComponentType_2105); //$NON-NLS-1$
146                case SubSystemEditPart.VISUAL_ID:
147                        return getImage(
148                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/SubSystem/4.0?SubSystem", PalladioComponentModelElementTypes.SubSystem_2106); //$NON-NLS-1$
149                case InfrastructureInterfaceEditPart.VISUAL_ID:
150                        return getImage(
151                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?InfrastructureInterface", PalladioComponentModelElementTypes.InfrastructureInterface_2109); //$NON-NLS-1$
152                case OperationSignatureEditPart.VISUAL_ID:
153                        return getImage(
154                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?OperationSignature", PalladioComponentModelElementTypes.OperationSignature_3106); //$NON-NLS-1$
155                case EventTypeEditPart.VISUAL_ID:
156                        return getImage(
157                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?EventType", PalladioComponentModelElementTypes.EventType_3107); //$NON-NLS-1$
158                case ResourceDemandingSEFFEditPart.VISUAL_ID:
159                        return getImage(
160                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/SEFF/4.0?ResourceDemandingSEFF", PalladioComponentModelElementTypes.ResourceDemandingSEFF_3102); //$NON-NLS-1$
161                case PassiveResourceEditPart.VISUAL_ID:
162                        return getImage(
163                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?PassiveResource", PalladioComponentModelElementTypes.PassiveResource_3103); //$NON-NLS-1$
164                case VariableUsageEditPart.VISUAL_ID:
165                        return getImage(
166                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Parameter/4.0?VariableUsage", PalladioComponentModelElementTypes.VariableUsage_3104); //$NON-NLS-1$
167                case VariableCharacterisationEditPart.VISUAL_ID:
168                        return getImage(
169                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Parameter/4.0?VariableCharacterisation", PalladioComponentModelElementTypes.VariableCharacterisation_3105); //$NON-NLS-1$
170                case InfrastructureSignatureEditPart.VISUAL_ID:
171                        return getImage(
172                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?InfrastructureSignature", PalladioComponentModelElementTypes.InfrastructureSignature_3108); //$NON-NLS-1$
173                case OperationProvidedRoleEditPart.VISUAL_ID:
174                        return getImage(
175                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?OperationProvidedRole", PalladioComponentModelElementTypes.OperationProvidedRole_4105); //$NON-NLS-1$
176                case InfrastructureProvidedRoleEditPart.VISUAL_ID:
177                        return getImage(
178                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?InfrastructureProvidedRole", PalladioComponentModelElementTypes.InfrastructureProvidedRole_4111); //$NON-NLS-1$
179                case InfrastructureRequiredRoleEditPart.VISUAL_ID:
180                        return getImage(
181                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?InfrastructureRequiredRole", PalladioComponentModelElementTypes.InfrastructureRequiredRole_4112); //$NON-NLS-1$
182                case SinkRoleEditPart.VISUAL_ID:
183                        return getImage(
184                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?SinkRole", PalladioComponentModelElementTypes.SinkRole_4109); //$NON-NLS-1$
185                case OperationRequiredRoleEditPart.VISUAL_ID:
186                        return getImage(
187                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?OperationRequiredRole", PalladioComponentModelElementTypes.OperationRequiredRole_4106); //$NON-NLS-1$
188                case ImplementationComponentTypeParentCompleteComponentTypesEditPart.VISUAL_ID:
189                        return getImage(
190                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?ImplementationComponentType?parentCompleteComponentTypes", PalladioComponentModelElementTypes.ImplementationComponentTypeParentCompleteComponentTypes_4103); //$NON-NLS-1$
191                case CompleteComponentTypeParentProvidesComponentTypesEditPart.VISUAL_ID:
192                        return getImage(
193                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?CompleteComponentType?parentProvidesComponentTypes", PalladioComponentModelElementTypes.CompleteComponentTypeParentProvidesComponentTypes_4104); //$NON-NLS-1$
194                case SourceRoleEditPart.VISUAL_ID:
195                        return getImage(
196                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/Repository/4.0?SourceRole", PalladioComponentModelElementTypes.SourceRole_4110); //$NON-NLS-1$
197                }
198                return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
199        }
200 
201        /**
202         * @generated
203         */
204        private Image getImage(String key, IElementType elementType) {
205                ImageRegistry imageRegistry = PalladioComponentModelRepositoryDiagramEditorPlugin
206                                .getInstance().getImageRegistry();
207                Image image = imageRegistry.get(key);
208                if (image == null
209                                && elementType != null
210                                && PalladioComponentModelElementTypes
211                                                .isKnownElementType(elementType)) {
212                        image = PalladioComponentModelElementTypes.getImage(elementType);
213                        imageRegistry.put(key, image);
214                }
215 
216                if (image == null) {
217                        image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
218                        imageRegistry.put(key, image);
219                }
220                return image;
221        }
222 
223        /**
224         * @generated
225         */
226        public String getText(Object element) {
227                if (element instanceof PalladioComponentModelNavigatorGroup) {
228                        PalladioComponentModelNavigatorGroup group = (PalladioComponentModelNavigatorGroup) element;
229                        return group.getGroupName();
230                }
231 
232                if (element instanceof PalladioComponentModelNavigatorItem) {
233                        PalladioComponentModelNavigatorItem navigatorItem = (PalladioComponentModelNavigatorItem) element;
234                        if (!isOwnView(navigatorItem.getView())) {
235                                return null;
236                        }
237                        return getText(navigatorItem.getView());
238                }
239 
240                return super.getText(element);
241        }
242 
243        /**
244         * @generated
245         */
246        public String getText(View view) {
247                if (view.getElement() != null && view.getElement().eIsProxy()) {
248                        return getUnresolvedDomainElementProxyText(view);
249                }
250                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
251                case RepositoryEditPart.VISUAL_ID:
252                        return getRepository_1000Text(view);
253                case OperationInterfaceEditPart.VISUAL_ID:
254                        return getOperationInterface_2107Text(view);
255                case EventGroupEditPart.VISUAL_ID:
256                        return getEventGroup_2108Text(view);
257                case BasicComponentEditPart.VISUAL_ID:
258                        return getBasicComponent_2102Text(view);
259                case CompositeComponentEditPart.VISUAL_ID:
260                        return getCompositeComponent_2103Text(view);
261                case CompleteComponentTypeEditPart.VISUAL_ID:
262                        return getCompleteComponentType_2104Text(view);
263                case ProvidesComponentTypeEditPart.VISUAL_ID:
264                        return getProvidesComponentType_2105Text(view);
265                case SubSystemEditPart.VISUAL_ID:
266                        return getSubSystem_2106Text(view);
267                case InfrastructureInterfaceEditPart.VISUAL_ID:
268                        return getInfrastructureInterface_2109Text(view);
269                case OperationSignatureEditPart.VISUAL_ID:
270                        return getOperationSignature_3106Text(view);
271                case EventTypeEditPart.VISUAL_ID:
272                        return getEventType_3107Text(view);
273                case ResourceDemandingSEFFEditPart.VISUAL_ID:
274                        return getResourceDemandingSEFF_3102Text(view);
275                case PassiveResourceEditPart.VISUAL_ID:
276                        return getPassiveResource_3103Text(view);
277                case VariableUsageEditPart.VISUAL_ID:
278                        return getVariableUsage_3104Text(view);
279                case VariableCharacterisationEditPart.VISUAL_ID:
280                        return getVariableCharacterisation_3105Text(view);
281                case InfrastructureSignatureEditPart.VISUAL_ID:
282                        return getInfrastructureSignature_3108Text(view);
283                case OperationProvidedRoleEditPart.VISUAL_ID:
284                        return getOperationProvidedRole_4105Text(view);
285                case InfrastructureProvidedRoleEditPart.VISUAL_ID:
286                        return getInfrastructureProvidedRole_4111Text(view);
287                case InfrastructureRequiredRoleEditPart.VISUAL_ID:
288                        return getInfrastructureRequiredRole_4112Text(view);
289                case SinkRoleEditPart.VISUAL_ID:
290                        return getSinkRole_4109Text(view);
291                case OperationRequiredRoleEditPart.VISUAL_ID:
292                        return getOperationRequiredRole_4106Text(view);
293                case ImplementationComponentTypeParentCompleteComponentTypesEditPart.VISUAL_ID:
294                        return getImplementationComponentTypeParentCompleteComponentTypes_4103Text(view);
295                case CompleteComponentTypeParentProvidesComponentTypesEditPart.VISUAL_ID:
296                        return getCompleteComponentTypeParentProvidesComponentTypes_4104Text(view);
297                case SourceRoleEditPart.VISUAL_ID:
298                        return getSourceRole_4110Text(view);
299                }
300                return getUnknownElementText(view);
301        }
302 
303        /**
304         * @generated
305         */
306        private String getRepository_1000Text(View view) {
307                Repository domainModelElement = (Repository) view.getElement();
308                if (domainModelElement != null) {
309                        return domainModelElement.getId();
310                } else {
311                        PalladioComponentModelRepositoryDiagramEditorPlugin
312                                        .getInstance()
313                                        .logError(
314                                                        "No domain element for view with visualID = " + 1000); //$NON-NLS-1$
315                        return ""; //$NON-NLS-1$
316                }
317        }
318 
319        /**
320         * @generated
321         */
322        private String getOperationInterface_2107Text(View view) {
323                IParser parser = PalladioComponentModelParserProvider
324                                .getParser(
325                                                PalladioComponentModelElementTypes.OperationInterface_2107,
326                                                view.getElement() != null ? view.getElement() : view,
327                                                PalladioComponentModelVisualIDRegistry
328                                                                .getType(OperationInterfaceEntityNameEditPart.VISUAL_ID));
329                if (parser != null) {
330                        return parser.getPrintString(new EObjectAdapter(
331                                        view.getElement() != null ? view.getElement() : view),
332                                        ParserOptions.NONE.intValue());
333                } else {
334                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
335                                        .logError("Parser was not found for label " + 5108); //$NON-NLS-1$
336                        return ""; //$NON-NLS-1$
337                }
338        }
339 
340        /**
341         * @generated
342         */
343        private String getEventGroup_2108Text(View view) {
344                IParser parser = PalladioComponentModelParserProvider.getParser(
345                                PalladioComponentModelElementTypes.EventGroup_2108, view
346                                                .getElement() != null ? view.getElement() : view,
347                                PalladioComponentModelVisualIDRegistry
348                                                .getType(EventGroupEntityNameEditPart.VISUAL_ID));
349                if (parser != null) {
350                        return parser.getPrintString(new EObjectAdapter(
351                                        view.getElement() != null ? view.getElement() : view),
352                                        ParserOptions.NONE.intValue());
353                } else {
354                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
355                                        .logError("Parser was not found for label " + 5109); //$NON-NLS-1$
356                        return ""; //$NON-NLS-1$
357                }
358        }
359 
360        /**
361         * @generated
362         */
363        private String getBasicComponent_2102Text(View view) {
364                IParser parser = PalladioComponentModelParserProvider.getParser(
365                                PalladioComponentModelElementTypes.BasicComponent_2102, view
366                                                .getElement() != null ? view.getElement() : view,
367                                PalladioComponentModelVisualIDRegistry
368                                                .getType(BasicComponentEntityNameEditPart.VISUAL_ID));
369                if (parser != null) {
370                        return parser.getPrintString(new EObjectAdapter(
371                                        view.getElement() != null ? view.getElement() : view),
372                                        ParserOptions.NONE.intValue());
373                } else {
374                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
375                                        .logError("Parser was not found for label " + 5102); //$NON-NLS-1$
376                        return ""; //$NON-NLS-1$
377                }
378        }
379 
380        /**
381         * @generated
382         */
383        private String getCompositeComponent_2103Text(View view) {
384                IParser parser = PalladioComponentModelParserProvider
385                                .getParser(
386                                                PalladioComponentModelElementTypes.CompositeComponent_2103,
387                                                view.getElement() != null ? view.getElement() : view,
388                                                PalladioComponentModelVisualIDRegistry
389                                                                .getType(CompositeComponentEntityNameEditPart.VISUAL_ID));
390                if (parser != null) {
391                        return parser.getPrintString(new EObjectAdapter(
392                                        view.getElement() != null ? view.getElement() : view),
393                                        ParserOptions.NONE.intValue());
394                } else {
395                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
396                                        .logError("Parser was not found for label " + 5103); //$NON-NLS-1$
397                        return ""; //$NON-NLS-1$
398                }
399        }
400 
401        /**
402         * @generated
403         */
404        private String getCompleteComponentType_2104Text(View view) {
405                IParser parser = PalladioComponentModelParserProvider
406                                .getParser(
407                                                PalladioComponentModelElementTypes.CompleteComponentType_2104,
408                                                view.getElement() != null ? view.getElement() : view,
409                                                PalladioComponentModelVisualIDRegistry
410                                                                .getType(CompleteComponentTypeEntityNameEditPart.VISUAL_ID));
411                if (parser != null) {
412                        return parser.getPrintString(new EObjectAdapter(
413                                        view.getElement() != null ? view.getElement() : view),
414                                        ParserOptions.NONE.intValue());
415                } else {
416                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
417                                        .logError("Parser was not found for label " + 5104); //$NON-NLS-1$
418                        return ""; //$NON-NLS-1$
419                }
420        }
421 
422        /**
423         * @generated
424         */
425        private String getProvidesComponentType_2105Text(View view) {
426                IParser parser = PalladioComponentModelParserProvider
427                                .getParser(
428                                                PalladioComponentModelElementTypes.ProvidesComponentType_2105,
429                                                view.getElement() != null ? view.getElement() : view,
430                                                PalladioComponentModelVisualIDRegistry
431                                                                .getType(ProvidesComponentTypeEntityNameEditPart.VISUAL_ID));
432                if (parser != null) {
433                        return parser.getPrintString(new EObjectAdapter(
434                                        view.getElement() != null ? view.getElement() : view),
435                                        ParserOptions.NONE.intValue());
436                } else {
437                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
438                                        .logError("Parser was not found for label " + 5105); //$NON-NLS-1$
439                        return ""; //$NON-NLS-1$
440                }
441        }
442 
443        /**
444         * @generated
445         */
446        private String getSubSystem_2106Text(View view) {
447                IParser parser = PalladioComponentModelParserProvider.getParser(
448                                PalladioComponentModelElementTypes.SubSystem_2106, view
449                                                .getElement() != null ? view.getElement() : view,
450                                PalladioComponentModelVisualIDRegistry
451                                                .getType(SubSystemEntityNameEditPart.VISUAL_ID));
452                if (parser != null) {
453                        return parser.getPrintString(new EObjectAdapter(
454                                        view.getElement() != null ? view.getElement() : view),
455                                        ParserOptions.NONE.intValue());
456                } else {
457                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
458                                        .logError("Parser was not found for label " + 5107); //$NON-NLS-1$
459                        return ""; //$NON-NLS-1$
460                }
461        }
462 
463        /**
464         * @generated
465         */
466        private String getInfrastructureInterface_2109Text(View view) {
467                IParser parser = PalladioComponentModelParserProvider
468                                .getParser(
469                                                PalladioComponentModelElementTypes.InfrastructureInterface_2109,
470                                                view.getElement() != null ? view.getElement() : view,
471                                                PalladioComponentModelVisualIDRegistry
472                                                                .getType(InfrastructureInterfaceEntityNameEditPart.VISUAL_ID));
473                if (parser != null) {
474                        return parser.getPrintString(new EObjectAdapter(
475                                        view.getElement() != null ? view.getElement() : view),
476                                        ParserOptions.NONE.intValue());
477                } else {
478                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
479                                        .logError("Parser was not found for label " + 5110); //$NON-NLS-1$
480                        return ""; //$NON-NLS-1$
481                }
482        }
483 
484        /**
485         * @generated
486         */
487        private String getOperationSignature_3106Text(View view) {
488                IParser parser = PalladioComponentModelParserProvider.getParser(
489                                PalladioComponentModelElementTypes.OperationSignature_3106,
490                                view.getElement() != null ? view.getElement() : view,
491                                PalladioComponentModelVisualIDRegistry
492                                                .getType(OperationSignatureEditPart.VISUAL_ID));
493                if (parser != null) {
494                        return parser.getPrintString(new EObjectAdapter(
495                                        view.getElement() != null ? view.getElement() : view),
496                                        ParserOptions.NONE.intValue());
497                } else {
498                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
499                                        .logError("Parser was not found for label " + 3106); //$NON-NLS-1$
500                        return ""; //$NON-NLS-1$
501                }
502        }
503 
504        /**
505         * @generated
506         */
507        private String getEventType_3107Text(View view) {
508                IParser parser = PalladioComponentModelParserProvider.getParser(
509                                PalladioComponentModelElementTypes.EventType_3107, view
510                                                .getElement() != null ? view.getElement() : view,
511                                PalladioComponentModelVisualIDRegistry
512                                                .getType(EventTypeEditPart.VISUAL_ID));
513                if (parser != null) {
514                        return parser.getPrintString(new EObjectAdapter(
515                                        view.getElement() != null ? view.getElement() : view),
516                                        ParserOptions.NONE.intValue());
517                } else {
518                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
519                                        .logError("Parser was not found for label " + 3107); //$NON-NLS-1$
520                        return ""; //$NON-NLS-1$
521                }
522        }
523 
524        /**
525         * @generated
526         */
527        private String getResourceDemandingSEFF_3102Text(View view) {
528                IParser parser = PalladioComponentModelParserProvider.getParser(
529                                PalladioComponentModelElementTypes.ResourceDemandingSEFF_3102,
530                                view.getElement() != null ? view.getElement() : view,
531                                PalladioComponentModelVisualIDRegistry
532                                                .getType(ResourceDemandingSEFFEditPart.VISUAL_ID));
533                if (parser != null) {
534                        return parser.getPrintString(new EObjectAdapter(
535                                        view.getElement() != null ? view.getElement() : view),
536                                        ParserOptions.NONE.intValue());
537                } else {
538                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
539                                        .logError("Parser was not found for label " + 3102); //$NON-NLS-1$
540                        return ""; //$NON-NLS-1$
541                }
542        }
543 
544        /**
545         * @generated
546         */
547        private String getPassiveResource_3103Text(View view) {
548                IParser parser = PalladioComponentModelParserProvider.getParser(
549                                PalladioComponentModelElementTypes.PassiveResource_3103, view
550                                                .getElement() != null ? view.getElement() : view,
551                                PalladioComponentModelVisualIDRegistry
552                                                .getType(PassiveResourceEditPart.VISUAL_ID));
553                if (parser != null) {
554                        return parser.getPrintString(new EObjectAdapter(
555                                        view.getElement() != null ? view.getElement() : view),
556                                        ParserOptions.NONE.intValue());
557                } else {
558                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
559                                        .logError("Parser was not found for label " + 3103); //$NON-NLS-1$
560                        return ""; //$NON-NLS-1$
561                }
562        }
563 
564        /**
565         * @generated
566         */
567        private String getVariableUsage_3104Text(View view) {
568                IParser parser = PalladioComponentModelParserProvider.getParser(
569                                PalladioComponentModelElementTypes.VariableUsage_3104, view
570                                                .getElement() != null ? view.getElement() : view,
571                                PalladioComponentModelVisualIDRegistry
572                                                .getType(VariableUsageLabelEditPart.VISUAL_ID));
573                if (parser != null) {
574                        return parser.getPrintString(new EObjectAdapter(
575                                        view.getElement() != null ? view.getElement() : view),
576                                        ParserOptions.NONE.intValue());
577                } else {
578                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
579                                        .logError("Parser was not found for label " + 5106); //$NON-NLS-1$
580                        return ""; //$NON-NLS-1$
581                }
582        }
583 
584        /**
585         * @generated
586         */
587        private String getVariableCharacterisation_3105Text(View view) {
588                IParser parser = PalladioComponentModelParserProvider
589                                .getParser(
590                                                PalladioComponentModelElementTypes.VariableCharacterisation_3105,
591                                                view.getElement() != null ? view.getElement() : view,
592                                                PalladioComponentModelVisualIDRegistry
593                                                                .getType(VariableCharacterisationEditPart.VISUAL_ID));
594                if (parser != null) {
595                        return parser.getPrintString(new EObjectAdapter(
596                                        view.getElement() != null ? view.getElement() : view),
597                                        ParserOptions.NONE.intValue());
598                } else {
599                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
600                                        .logError("Parser was not found for label " + 3105); //$NON-NLS-1$
601                        return ""; //$NON-NLS-1$
602                }
603        }
604 
605        /**
606         * @generated
607         */
608        private String getInfrastructureSignature_3108Text(View view) {
609                IParser parser = PalladioComponentModelParserProvider
610                                .getParser(
611                                                PalladioComponentModelElementTypes.InfrastructureSignature_3108,
612                                                view.getElement() != null ? view.getElement() : view,
613                                                PalladioComponentModelVisualIDRegistry
614                                                                .getType(InfrastructureSignatureEditPart.VISUAL_ID));
615                if (parser != null) {
616                        return parser.getPrintString(new EObjectAdapter(
617                                        view.getElement() != null ? view.getElement() : view),
618                                        ParserOptions.NONE.intValue());
619                } else {
620                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
621                                        .logError("Parser was not found for label " + 3108); //$NON-NLS-1$
622                        return ""; //$NON-NLS-1$
623                }
624        }
625 
626        /**
627         * @generated
628         */
629        private String getOperationProvidedRole_4105Text(View view) {
630                IParser parser = PalladioComponentModelParserProvider.getParser(
631                                PalladioComponentModelElementTypes.OperationProvidedRole_4105,
632                                view.getElement() != null ? view.getElement() : view,
633                                CommonParserHint.DESCRIPTION);
634                if (parser != null) {
635                        return parser.getPrintString(new EObjectAdapter(
636                                        view.getElement() != null ? view.getElement() : view),
637                                        ParserOptions.NONE.intValue());
638                } else {
639                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
640                                        .logError("Parser was not found for label " + 6105); //$NON-NLS-1$
641                        return ""; //$NON-NLS-1$
642                }
643        }
644 
645        /**
646         * @generated
647         */
648        private String getInfrastructureProvidedRole_4111Text(View view) {
649                IParser parser = PalladioComponentModelParserProvider
650                                .getParser(
651                                                PalladioComponentModelElementTypes.InfrastructureProvidedRole_4111,
652                                                view.getElement() != null ? view.getElement() : view,
653                                                CommonParserHint.DESCRIPTION);
654                if (parser != null) {
655                        return parser.getPrintString(new EObjectAdapter(
656                                        view.getElement() != null ? view.getElement() : view),
657                                        ParserOptions.NONE.intValue());
658                } else {
659                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
660                                        .logError("Parser was not found for label " + 6111); //$NON-NLS-1$
661                        return ""; //$NON-NLS-1$
662                }
663        }
664 
665        /**
666         * @generated
667         */
668        private String getInfrastructureRequiredRole_4112Text(View view) {
669                IParser parser = PalladioComponentModelParserProvider
670                                .getParser(
671                                                PalladioComponentModelElementTypes.InfrastructureRequiredRole_4112,
672                                                view.getElement() != null ? view.getElement() : view,
673                                                CommonParserHint.DESCRIPTION);
674                if (parser != null) {
675                        return parser.getPrintString(new EObjectAdapter(
676                                        view.getElement() != null ? view.getElement() : view),
677                                        ParserOptions.NONE.intValue());
678                } else {
679                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
680                                        .logError("Parser was not found for label " + 6112); //$NON-NLS-1$
681                        return ""; //$NON-NLS-1$
682                }
683        }
684 
685        /**
686         * @generated
687         */
688        private String getSinkRole_4109Text(View view) {
689                IParser parser = PalladioComponentModelParserProvider.getParser(
690                                PalladioComponentModelElementTypes.SinkRole_4109, view
691                                                .getElement() != null ? view.getElement() : view,
692                                CommonParserHint.DESCRIPTION);
693                if (parser != null) {
694                        return parser.getPrintString(new EObjectAdapter(
695                                        view.getElement() != null ? view.getElement() : view),
696                                        ParserOptions.NONE.intValue());
697                } else {
698                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
699                                        .logError("Parser was not found for label " + 6109); //$NON-NLS-1$
700                        return ""; //$NON-NLS-1$
701                }
702        }
703 
704        /**
705         * @generated
706         */
707        private String getOperationRequiredRole_4106Text(View view) {
708                IParser parser = PalladioComponentModelParserProvider.getParser(
709                                PalladioComponentModelElementTypes.OperationRequiredRole_4106,
710                                view.getElement() != null ? view.getElement() : view,
711                                CommonParserHint.DESCRIPTION);
712                if (parser != null) {
713                        return parser.getPrintString(new EObjectAdapter(
714                                        view.getElement() != null ? view.getElement() : view),
715                                        ParserOptions.NONE.intValue());
716                } else {
717                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
718                                        .logError("Parser was not found for label " + 6106); //$NON-NLS-1$
719                        return ""; //$NON-NLS-1$
720                }
721        }
722 
723        /**
724         * @generated
725         */
726        private String getImplementationComponentTypeParentCompleteComponentTypes_4103Text(
727                        View view) {
728                IParser parser = PalladioComponentModelParserProvider
729                                .getParser(
730                                                PalladioComponentModelElementTypes.ImplementationComponentTypeParentCompleteComponentTypes_4103,
731                                                view.getElement() != null ? view.getElement() : view,
732                                                CommonParserHint.DESCRIPTION);
733                if (parser != null) {
734                        return parser.getPrintString(new EObjectAdapter(
735                                        view.getElement() != null ? view.getElement() : view),
736                                        ParserOptions.NONE.intValue());
737                } else {
738                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
739                                        .logError("Parser was not found for label " + 6103); //$NON-NLS-1$
740                        return ""; //$NON-NLS-1$
741                }
742        }
743 
744        /**
745         * @generated
746         */
747        private String getCompleteComponentTypeParentProvidesComponentTypes_4104Text(
748                        View view) {
749                IParser parser = PalladioComponentModelParserProvider
750                                .getParser(
751                                                PalladioComponentModelElementTypes.CompleteComponentTypeParentProvidesComponentTypes_4104,
752                                                view.getElement() != null ? view.getElement() : view,
753                                                CommonParserHint.DESCRIPTION);
754                if (parser != null) {
755                        return parser.getPrintString(new EObjectAdapter(
756                                        view.getElement() != null ? view.getElement() : view),
757                                        ParserOptions.NONE.intValue());
758                } else {
759                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
760                                        .logError("Parser was not found for label " + 6104); //$NON-NLS-1$
761                        return ""; //$NON-NLS-1$
762                }
763        }
764 
765        /**
766         * @generated
767         */
768        private String getSourceRole_4110Text(View view) {
769                IParser parser = PalladioComponentModelParserProvider.getParser(
770                                PalladioComponentModelElementTypes.SourceRole_4110, view
771                                                .getElement() != null ? view.getElement() : view,
772                                CommonParserHint.DESCRIPTION);
773                if (parser != null) {
774                        return parser.getPrintString(new EObjectAdapter(
775                                        view.getElement() != null ? view.getElement() : view),
776                                        ParserOptions.NONE.intValue());
777                } else {
778                        PalladioComponentModelRepositoryDiagramEditorPlugin.getInstance()
779                                        .logError("Parser was not found for label " + 6110); //$NON-NLS-1$
780                        return ""; //$NON-NLS-1$
781                }
782        }
783 
784        /**
785         * @generated
786         */
787        private String getUnknownElementText(View view) {
788                return "<UnknownElement Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$  //$NON-NLS-2$
789        }
790 
791        /**
792         * @generated
793         */
794        private String getUnresolvedDomainElementProxyText(View view) {
795                return "<Unresolved domain element Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$  //$NON-NLS-2$
796        }
797 
798        /**
799         * @generated
800         */
801        public void init(ICommonContentExtensionSite aConfig) {
802        }
803 
804        /**
805         * @generated
806         */
807        public void restoreState(IMemento aMemento) {
808        }
809 
810        /**
811         * @generated
812         */
813        public void saveState(IMemento aMemento) {
814        }
815 
816        /**
817         * @generated
818         */
819        public String getDescription(Object anElement) {
820                return null;
821        }
822 
823        /**
824         * @generated
825         */
826        private boolean isOwnView(View view) {
827                return RepositoryEditPart.MODEL_ID
828                                .equals(PalladioComponentModelVisualIDRegistry.getModelID(view));
829        }
830 
831}

[all classes][de.uka.ipd.sdq.pcm.gmf.repository.navigator]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov