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

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelNavigatorLabelProvider.java]

nameclass, %method, %block, %line, %
PalladioComponentModelNavigatorLabelProvider.java0%   (0/1)0%   (0/32)0%   (0/742)0%   (0/262)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelNavigatorLabelProvider0%   (0/1)0%   (0/32)0%   (0/742)0%   (0/262)
<static initializer> 0%   (0/1)0%   (0/11)0%   (0/9)
PalladioComponentModelNavigatorLabelProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getAbstractUserActionSuccessor_4002Text (View): String 0%   (0/1)0%   (0/2)0%   (0/1)
getBranchTransition_3009Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getBranch_3008Text (View): String 0%   (0/1)0%   (0/14)0%   (0/7)
getClosedWorkload_3015Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getDelay_3017Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getDescription (Object): String 0%   (0/1)0%   (0/2)0%   (0/1)
getEntryLevelSystemCall_3003Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
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/93)0%   (0/36)
getLoop_3005Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getOpenWorkload_3016Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getScenarioBehaviour_3007Text (View): String 0%   (0/1)0%   (0/14)0%   (0/8)
getScenarioBehaviour_3010Text (View): String 0%   (0/1)0%   (0/14)0%   (0/8)
getScenarioBehaviour_3014Text (View): String 0%   (0/1)0%   (0/14)0%   (0/8)
getStart_3001Text (View): String 0%   (0/1)0%   (0/14)0%   (0/7)
getStop_3002Text (View): String 0%   (0/1)0%   (0/14)0%   (0/7)
getText (Object): String 0%   (0/1)0%   (0/31)0%   (0/9)
getText (View): String 0%   (0/1)0%   (0/86)0%   (0/21)
getUnknownElementText (View): String 0%   (0/1)0%   (0/11)0%   (0/1)
getUnresolvedDomainElementProxyText (View): String 0%   (0/1)0%   (0/11)0%   (0/1)
getUsageModel_1000Text (View): String 0%   (0/1)0%   (0/2)0%   (0/1)
getUsageScenario_2004Text (View): String 0%   (0/1)0%   (0/34)0%   (0/11)
getVariableCharacterisation_3013Text (View): String 0%   (0/1)0%   (0/34)0%   (0/12)
getVariableUsage_3012Text (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, SDQ, IPD, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.navigator;
5 
6import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
7import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
8import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
9import org.eclipse.gmf.runtime.emf.type.core.IElementType;
10import org.eclipse.gmf.runtime.notation.View;
11import org.eclipse.jface.resource.ImageDescriptor;
12import org.eclipse.jface.resource.ImageRegistry;
13import org.eclipse.jface.viewers.ITreePathLabelProvider;
14import org.eclipse.jface.viewers.LabelProvider;
15import org.eclipse.jface.viewers.TreePath;
16import org.eclipse.jface.viewers.ViewerLabel;
17import org.eclipse.swt.graphics.Image;
18import org.eclipse.ui.IMemento;
19import org.eclipse.ui.navigator.ICommonContentExtensionSite;
20import org.eclipse.ui.navigator.ICommonLabelProvider;
21 
22import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.AbstractUserActionSuccessorEditPart;
23import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchEditPart;
24import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionBranchProbabilityEditPart;
25import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionEditPart;
26import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadEditPart;
27import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadPopulationEditPart;
28import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ComponentExternalCallNameLabelEditPart;
29import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayEditPart;
30import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayEntityNameEditPart;
31import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.EntryLevelSystemCallEditPart;
32import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.LoopEditPart;
33import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadEditPart;
34import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadSpecLabelEditPart;
35import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour2EditPart;
36import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour3EditPart;
37import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourEditPart;
38import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StartEditPart;
39import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StopEditPart;
40import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageLoopIterationsLabelEditPart;
41import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenario2EditPart;
42import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioEditPart;
43import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioLabelEditPart;
44import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableCharacterisationEditPart;
45import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableUsageEditPart;
46import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.WrappingLabelEditPart;
47import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelUsageDiagramEditorPlugin;
48import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
49import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelElementTypes;
50import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelParserProvider;
51import de.uka.ipd.sdq.pcm.usagemodel.Branch;
52import de.uka.ipd.sdq.pcm.usagemodel.ScenarioBehaviour;
53import de.uka.ipd.sdq.pcm.usagemodel.Start;
54import de.uka.ipd.sdq.pcm.usagemodel.Stop;
55 
56/**
57 * @generated
58 */
59public class PalladioComponentModelNavigatorLabelProvider extends LabelProvider
60                implements ICommonLabelProvider, ITreePathLabelProvider {
61 
62        /**
63         * @generated
64         */
65        static {
66                PalladioComponentModelUsageDiagramEditorPlugin
67                                .getInstance()
68                                .getImageRegistry()
69                                .put(
70                                                "Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
71                PalladioComponentModelUsageDiagramEditorPlugin
72                                .getInstance()
73                                .getImageRegistry()
74                                .put(
75                                                "Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
76        }
77 
78        /**
79         * @generated
80         */
81        public void updateLabel(ViewerLabel label, TreePath elementPath) {
82                Object element = elementPath.getLastSegment();
83                if (element instanceof PalladioComponentModelNavigatorItem
84                                && !isOwnView(((PalladioComponentModelNavigatorItem) element)
85                                                .getView())) {
86                        return;
87                }
88                label.setText(getText(element));
89                label.setImage(getImage(element));
90        }
91 
92        /**
93         * @generated
94         */
95        public Image getImage(Object element) {
96                if (element instanceof PalladioComponentModelNavigatorGroup) {
97                        PalladioComponentModelNavigatorGroup group = (PalladioComponentModelNavigatorGroup) element;
98                        return PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
99                                        .getBundledImage(group.getIcon());
100                }
101 
102                if (element instanceof PalladioComponentModelNavigatorItem) {
103                        PalladioComponentModelNavigatorItem navigatorItem = (PalladioComponentModelNavigatorItem) element;
104                        if (!isOwnView(navigatorItem.getView())) {
105                                return super.getImage(element);
106                        }
107                        return getImage(navigatorItem.getView());
108                }
109 
110                return super.getImage(element);
111        }
112 
113        /**
114         * @generated
115         */
116        public Image getImage(View view) {
117                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
118                case UsageScenarioEditPart.VISUAL_ID:
119                        return getImage(
120                                        "Navigator?Diagram?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?UsageModel", PalladioComponentModelElementTypes.UsageModel_1000); //$NON-NLS-1$
121                case UsageScenario2EditPart.VISUAL_ID:
122                        return getImage(
123                                        "Navigator?TopLevelNode?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?UsageScenario", PalladioComponentModelElementTypes.UsageScenario_2004); //$NON-NLS-1$
124                case ScenarioBehaviourEditPart.VISUAL_ID:
125                        return getImage(
126                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?ScenarioBehaviour", PalladioComponentModelElementTypes.ScenarioBehaviour_3014); //$NON-NLS-1$
127                case StartEditPart.VISUAL_ID:
128                        return getImage(
129                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?Start", PalladioComponentModelElementTypes.Start_3001); //$NON-NLS-1$
130                case StopEditPart.VISUAL_ID:
131                        return getImage(
132                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?Stop", PalladioComponentModelElementTypes.Stop_3002); //$NON-NLS-1$
133                case EntryLevelSystemCallEditPart.VISUAL_ID:
134                        return getImage(
135                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?EntryLevelSystemCall", PalladioComponentModelElementTypes.EntryLevelSystemCall_3003); //$NON-NLS-1$
136                case VariableUsageEditPart.VISUAL_ID:
137                        return getImage(
138                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Parameter/4.0?VariableUsage", PalladioComponentModelElementTypes.VariableUsage_3012); //$NON-NLS-1$
139                case VariableCharacterisationEditPart.VISUAL_ID:
140                        return getImage(
141                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/Parameter/4.0?VariableCharacterisation", PalladioComponentModelElementTypes.VariableCharacterisation_3013); //$NON-NLS-1$
142                case LoopEditPart.VISUAL_ID:
143                        return getImage(
144                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?Loop", PalladioComponentModelElementTypes.Loop_3005); //$NON-NLS-1$
145                case ScenarioBehaviour2EditPart.VISUAL_ID:
146                        return getImage(
147                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?ScenarioBehaviour", PalladioComponentModelElementTypes.ScenarioBehaviour_3007); //$NON-NLS-1$
148                case BranchEditPart.VISUAL_ID:
149                        return getImage(
150                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?Branch", PalladioComponentModelElementTypes.Branch_3008); //$NON-NLS-1$
151                case BranchTransitionEditPart.VISUAL_ID:
152                        return getImage(
153                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?BranchTransition", PalladioComponentModelElementTypes.BranchTransition_3009); //$NON-NLS-1$
154                case ScenarioBehaviour3EditPart.VISUAL_ID:
155                        return getImage(
156                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?ScenarioBehaviour", PalladioComponentModelElementTypes.ScenarioBehaviour_3010); //$NON-NLS-1$
157                case DelayEditPart.VISUAL_ID:
158                        return getImage(
159                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?Delay", PalladioComponentModelElementTypes.Delay_3017); //$NON-NLS-1$
160                case ClosedWorkloadEditPart.VISUAL_ID:
161                        return getImage(
162                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?ClosedWorkload", PalladioComponentModelElementTypes.ClosedWorkload_3015); //$NON-NLS-1$
163                case OpenWorkloadEditPart.VISUAL_ID:
164                        return getImage(
165                                        "Navigator?Node?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?OpenWorkload", PalladioComponentModelElementTypes.OpenWorkload_3016); //$NON-NLS-1$
166                case AbstractUserActionSuccessorEditPart.VISUAL_ID:
167                        return getImage(
168                                        "Navigator?Link?http://sdq.ipd.uka.de/PalladioComponentModel/UsageModel/4.0?AbstractUserAction?successor", PalladioComponentModelElementTypes.AbstractUserActionSuccessor_4002); //$NON-NLS-1$
169                }
170                return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
171        }
172 
173        /**
174         * @generated
175         */
176        private Image getImage(String key, IElementType elementType) {
177                ImageRegistry imageRegistry = PalladioComponentModelUsageDiagramEditorPlugin
178                                .getInstance().getImageRegistry();
179                Image image = imageRegistry.get(key);
180                if (image == null
181                                && elementType != null
182                                && PalladioComponentModelElementTypes
183                                                .isKnownElementType(elementType)) {
184                        image = PalladioComponentModelElementTypes.getImage(elementType);
185                        imageRegistry.put(key, image);
186                }
187 
188                if (image == null) {
189                        image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
190                        imageRegistry.put(key, image);
191                }
192                return image;
193        }
194 
195        /**
196         * @generated
197         */
198        public String getText(Object element) {
199                if (element instanceof PalladioComponentModelNavigatorGroup) {
200                        PalladioComponentModelNavigatorGroup group = (PalladioComponentModelNavigatorGroup) element;
201                        return group.getGroupName();
202                }
203 
204                if (element instanceof PalladioComponentModelNavigatorItem) {
205                        PalladioComponentModelNavigatorItem navigatorItem = (PalladioComponentModelNavigatorItem) element;
206                        if (!isOwnView(navigatorItem.getView())) {
207                                return null;
208                        }
209                        return getText(navigatorItem.getView());
210                }
211 
212                return super.getText(element);
213        }
214 
215        /**
216         * @generated
217         */
218        public String getText(View view) {
219                if (view.getElement() != null && view.getElement().eIsProxy()) {
220                        return getUnresolvedDomainElementProxyText(view);
221                }
222                switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) {
223                case UsageScenarioEditPart.VISUAL_ID:
224                        return getUsageModel_1000Text(view);
225                case UsageScenario2EditPart.VISUAL_ID:
226                        return getUsageScenario_2004Text(view);
227                case ScenarioBehaviourEditPart.VISUAL_ID:
228                        return getScenarioBehaviour_3014Text(view);
229                case StartEditPart.VISUAL_ID:
230                        return getStart_3001Text(view);
231                case StopEditPart.VISUAL_ID:
232                        return getStop_3002Text(view);
233                case EntryLevelSystemCallEditPart.VISUAL_ID:
234                        return getEntryLevelSystemCall_3003Text(view);
235                case VariableUsageEditPart.VISUAL_ID:
236                        return getVariableUsage_3012Text(view);
237                case VariableCharacterisationEditPart.VISUAL_ID:
238                        return getVariableCharacterisation_3013Text(view);
239                case LoopEditPart.VISUAL_ID:
240                        return getLoop_3005Text(view);
241                case ScenarioBehaviour2EditPart.VISUAL_ID:
242                        return getScenarioBehaviour_3007Text(view);
243                case BranchEditPart.VISUAL_ID:
244                        return getBranch_3008Text(view);
245                case BranchTransitionEditPart.VISUAL_ID:
246                        return getBranchTransition_3009Text(view);
247                case ScenarioBehaviour3EditPart.VISUAL_ID:
248                        return getScenarioBehaviour_3010Text(view);
249                case DelayEditPart.VISUAL_ID:
250                        return getDelay_3017Text(view);
251                case ClosedWorkloadEditPart.VISUAL_ID:
252                        return getClosedWorkload_3015Text(view);
253                case OpenWorkloadEditPart.VISUAL_ID:
254                        return getOpenWorkload_3016Text(view);
255                case AbstractUserActionSuccessorEditPart.VISUAL_ID:
256                        return getAbstractUserActionSuccessor_4002Text(view);
257                }
258                return getUnknownElementText(view);
259        }
260 
261        /**
262         * @generated
263         */
264        private String getUsageModel_1000Text(View view) {
265                return ""; //$NON-NLS-1$
266        }
267 
268        /**
269         * @generated
270         */
271        private String getUsageScenario_2004Text(View view) {
272                IParser parser = PalladioComponentModelParserProvider.getParser(
273                                PalladioComponentModelElementTypes.UsageScenario_2004, view
274                                                .getElement() != null ? view.getElement() : view,
275                                PalladioComponentModelVisualIDRegistry
276                                                .getType(UsageScenarioLabelEditPart.VISUAL_ID));
277                if (parser != null) {
278                        return parser.getPrintString(new EObjectAdapter(
279                                        view.getElement() != null ? view.getElement() : view),
280                                        ParserOptions.NONE.intValue());
281                } else {
282                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
283                                        .logError("Parser was not found for label " + 5017); //$NON-NLS-1$
284                        return ""; //$NON-NLS-1$
285                }
286        }
287 
288        /**
289         * @generated
290         */
291        private String getScenarioBehaviour_3014Text(View view) {
292                ScenarioBehaviour domainModelElement = (ScenarioBehaviour) view
293                                .getElement();
294                if (domainModelElement != null) {
295                        return domainModelElement.getId();
296                } else {
297                        PalladioComponentModelUsageDiagramEditorPlugin
298                                        .getInstance()
299                                        .logError(
300                                                        "No domain element for view with visualID = " + 3014); //$NON-NLS-1$
301                        return ""; //$NON-NLS-1$
302                }
303        }
304 
305        /**
306         * @generated
307         */
308        private String getStart_3001Text(View view) {
309                Start domainModelElement = (Start) view.getElement();
310                if (domainModelElement != null) {
311                        return domainModelElement.getId();
312                } else {
313                        PalladioComponentModelUsageDiagramEditorPlugin
314                                        .getInstance()
315                                        .logError(
316                                                        "No domain element for view with visualID = " + 3001); //$NON-NLS-1$
317                        return ""; //$NON-NLS-1$
318                }
319        }
320 
321        /**
322         * @generated
323         */
324        private String getStop_3002Text(View view) {
325                Stop domainModelElement = (Stop) view.getElement();
326                if (domainModelElement != null) {
327                        return domainModelElement.getId();
328                } else {
329                        PalladioComponentModelUsageDiagramEditorPlugin
330                                        .getInstance()
331                                        .logError(
332                                                        "No domain element for view with visualID = " + 3002); //$NON-NLS-1$
333                        return ""; //$NON-NLS-1$
334                }
335        }
336 
337        /**
338         * @generated
339         */
340        private String getEntryLevelSystemCall_3003Text(View view) {
341                IParser parser = PalladioComponentModelParserProvider
342                                .getParser(
343                                                PalladioComponentModelElementTypes.EntryLevelSystemCall_3003,
344                                                view.getElement() != null ? view.getElement() : view,
345                                                PalladioComponentModelVisualIDRegistry
346                                                                .getType(ComponentExternalCallNameLabelEditPart.VISUAL_ID));
347                if (parser != null) {
348                        return parser.getPrintString(new EObjectAdapter(
349                                        view.getElement() != null ? view.getElement() : view),
350                                        ParserOptions.NONE.intValue());
351                } else {
352                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
353                                        .logError("Parser was not found for label " + 5004); //$NON-NLS-1$
354                        return ""; //$NON-NLS-1$
355                }
356        }
357 
358        /**
359         * @generated
360         */
361        private String getVariableUsage_3012Text(View view) {
362                IParser parser = PalladioComponentModelParserProvider.getParser(
363                                PalladioComponentModelElementTypes.VariableUsage_3012, view
364                                                .getElement() != null ? view.getElement() : view,
365                                PalladioComponentModelVisualIDRegistry
366                                                .getType(WrappingLabelEditPart.VISUAL_ID));
367                if (parser != null) {
368                        return parser.getPrintString(new EObjectAdapter(
369                                        view.getElement() != null ? view.getElement() : view),
370                                        ParserOptions.NONE.intValue());
371                } else {
372                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
373                                        .logError("Parser was not found for label " + 5012); //$NON-NLS-1$
374                        return ""; //$NON-NLS-1$
375                }
376        }
377 
378        /**
379         * @generated
380         */
381        private String getVariableCharacterisation_3013Text(View view) {
382                IParser parser = PalladioComponentModelParserProvider
383                                .getParser(
384                                                PalladioComponentModelElementTypes.VariableCharacterisation_3013,
385                                                view.getElement() != null ? view.getElement() : view,
386                                                PalladioComponentModelVisualIDRegistry
387                                                                .getType(VariableCharacterisationEditPart.VISUAL_ID));
388                if (parser != null) {
389                        return parser.getPrintString(new EObjectAdapter(
390                                        view.getElement() != null ? view.getElement() : view),
391                                        ParserOptions.NONE.intValue());
392                } else {
393                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
394                                        .logError("Parser was not found for label " + 3013); //$NON-NLS-1$
395                        return ""; //$NON-NLS-1$
396                }
397        }
398 
399        /**
400         * @generated
401         */
402        private String getLoop_3005Text(View view) {
403                IParser parser = PalladioComponentModelParserProvider.getParser(
404                                PalladioComponentModelElementTypes.Loop_3005,
405                                view.getElement() != null ? view.getElement() : view,
406                                PalladioComponentModelVisualIDRegistry
407                                                .getType(UsageLoopIterationsLabelEditPart.VISUAL_ID));
408                if (parser != null) {
409                        return parser.getPrintString(new EObjectAdapter(
410                                        view.getElement() != null ? view.getElement() : view),
411                                        ParserOptions.NONE.intValue());
412                } else {
413                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
414                                        .logError("Parser was not found for label " + 5005); //$NON-NLS-1$
415                        return ""; //$NON-NLS-1$
416                }
417        }
418 
419        /**
420         * @generated
421         */
422        private String getScenarioBehaviour_3007Text(View view) {
423                ScenarioBehaviour domainModelElement = (ScenarioBehaviour) view
424                                .getElement();
425                if (domainModelElement != null) {
426                        return domainModelElement.getId();
427                } else {
428                        PalladioComponentModelUsageDiagramEditorPlugin
429                                        .getInstance()
430                                        .logError(
431                                                        "No domain element for view with visualID = " + 3007); //$NON-NLS-1$
432                        return ""; //$NON-NLS-1$
433                }
434        }
435 
436        /**
437         * @generated
438         */
439        private String getBranch_3008Text(View view) {
440                Branch domainModelElement = (Branch) view.getElement();
441                if (domainModelElement != null) {
442                        return domainModelElement.getId();
443                } else {
444                        PalladioComponentModelUsageDiagramEditorPlugin
445                                        .getInstance()
446                                        .logError(
447                                                        "No domain element for view with visualID = " + 3008); //$NON-NLS-1$
448                        return ""; //$NON-NLS-1$
449                }
450        }
451 
452        /**
453         * @generated
454         */
455        private String getBranchTransition_3009Text(View view) {
456                IParser parser = PalladioComponentModelParserProvider
457                                .getParser(
458                                                PalladioComponentModelElementTypes.BranchTransition_3009,
459                                                view.getElement() != null ? view.getElement() : view,
460                                                PalladioComponentModelVisualIDRegistry
461                                                                .getType(BranchTransitionBranchProbabilityEditPart.VISUAL_ID));
462                if (parser != null) {
463                        return parser.getPrintString(new EObjectAdapter(
464                                        view.getElement() != null ? view.getElement() : view),
465                                        ParserOptions.NONE.intValue());
466                } else {
467                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
468                                        .logError("Parser was not found for label " + 5007); //$NON-NLS-1$
469                        return ""; //$NON-NLS-1$
470                }
471        }
472 
473        /**
474         * @generated
475         */
476        private String getScenarioBehaviour_3010Text(View view) {
477                ScenarioBehaviour domainModelElement = (ScenarioBehaviour) view
478                                .getElement();
479                if (domainModelElement != null) {
480                        return domainModelElement.getId();
481                } else {
482                        PalladioComponentModelUsageDiagramEditorPlugin
483                                        .getInstance()
484                                        .logError(
485                                                        "No domain element for view with visualID = " + 3010); //$NON-NLS-1$
486                        return ""; //$NON-NLS-1$
487                }
488        }
489 
490        /**
491         * @generated
492         */
493        private String getDelay_3017Text(View view) {
494                IParser parser = PalladioComponentModelParserProvider.getParser(
495                                PalladioComponentModelElementTypes.Delay_3017, view
496                                                .getElement() != null ? view.getElement() : view,
497                                PalladioComponentModelVisualIDRegistry
498                                                .getType(DelayEntityNameEditPart.VISUAL_ID));
499                if (parser != null) {
500                        return parser.getPrintString(new EObjectAdapter(
501                                        view.getElement() != null ? view.getElement() : view),
502                                        ParserOptions.NONE.intValue());
503                } else {
504                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
505                                        .logError("Parser was not found for label " + 5018); //$NON-NLS-1$
506                        return ""; //$NON-NLS-1$
507                }
508        }
509 
510        /**
511         * @generated
512         */
513        private String getClosedWorkload_3015Text(View view) {
514                IParser parser = PalladioComponentModelParserProvider.getParser(
515                                PalladioComponentModelElementTypes.ClosedWorkload_3015, view
516                                                .getElement() != null ? view.getElement() : view,
517                                PalladioComponentModelVisualIDRegistry
518                                                .getType(ClosedWorkloadPopulationEditPart.VISUAL_ID));
519                if (parser != null) {
520                        return parser.getPrintString(new EObjectAdapter(
521                                        view.getElement() != null ? view.getElement() : view),
522                                        ParserOptions.NONE.intValue());
523                } else {
524                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
525                                        .logError("Parser was not found for label " + 5013); //$NON-NLS-1$
526                        return ""; //$NON-NLS-1$
527                }
528        }
529 
530        /**
531         * @generated
532         */
533        private String getOpenWorkload_3016Text(View view) {
534                IParser parser = PalladioComponentModelParserProvider.getParser(
535                                PalladioComponentModelElementTypes.OpenWorkload_3016, view
536                                                .getElement() != null ? view.getElement() : view,
537                                PalladioComponentModelVisualIDRegistry
538                                                .getType(OpenWorkloadSpecLabelEditPart.VISUAL_ID));
539                if (parser != null) {
540                        return parser.getPrintString(new EObjectAdapter(
541                                        view.getElement() != null ? view.getElement() : view),
542                                        ParserOptions.NONE.intValue());
543                } else {
544                        PalladioComponentModelUsageDiagramEditorPlugin.getInstance()
545                                        .logError("Parser was not found for label " + 5016); //$NON-NLS-1$
546                        return ""; //$NON-NLS-1$
547                }
548        }
549 
550        /**
551         * @generated
552         */
553        private String getAbstractUserActionSuccessor_4002Text(View view) {
554                return ""; //$NON-NLS-1$
555        }
556 
557        /**
558         * @generated
559         */
560        private String getUnknownElementText(View view) {
561                return "<UnknownElement Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$  //$NON-NLS-2$
562        }
563 
564        /**
565         * @generated
566         */
567        private String getUnresolvedDomainElementProxyText(View view) {
568                return "<Unresolved domain element Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$  //$NON-NLS-2$
569        }
570 
571        /**
572         * @generated
573         */
574        public void init(ICommonContentExtensionSite aConfig) {
575        }
576 
577        /**
578         * @generated
579         */
580        public void restoreState(IMemento aMemento) {
581        }
582 
583        /**
584         * @generated
585         */
586        public void saveState(IMemento aMemento) {
587        }
588 
589        /**
590         * @generated
591         */
592        public String getDescription(Object anElement) {
593                return null;
594        }
595 
596        /**
597         * @generated
598         */
599        private boolean isOwnView(View view) {
600                return UsageScenarioEditPart.MODEL_ID
601                                .equals(PalladioComponentModelVisualIDRegistry.getModelID(view));
602        }
603 
604}

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