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

COVERAGE SUMMARY FOR SOURCE FILE [ComponentExternalCallNameLabelEditPart.java]

nameclass, %method, %block, %line, %
ComponentExternalCallNameLabelEditPart.java0%   (0/6)0%   (0/52)0%   (0/768)0%   (0/229)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComponentExternalCallNameLabelEditPart0%   (0/1)0%   (0/40)0%   (0/590)0%   (0/189)
ComponentExternalCallNameLabelEditPart (View): void 0%   (0/1)0%   (0/4)0%   (0/2)
access$0 (ComponentExternalCallNameLabelEditPart, char): void 0%   (0/1)0%   (0/4)0%   (0/1)
addNotationalListeners (): void 0%   (0/1)0%   (0/9)0%   (0/3)
addSemanticListeners (): void 0%   (0/1)0%   (0/42)0%   (0/9)
createDefaultEditPolicies (): void 0%   (0/1)0%   (0/22)0%   (0/8)
createFigure (): IFigure 0%   (0/1)0%   (0/2)0%   (0/1)
getAccessibleEditPart (): AccessibleEditPart 0%   (0/1)0%   (0/13)0%   (0/3)
getChildBySemanticHint (String): IGraphicalEditPart 0%   (0/1)0%   (0/2)0%   (0/1)
getCompletionProcessor (): IContentAssistProcessor 0%   (0/1)0%   (0/17)0%   (0/4)
getEditText (): String 0%   (0/1)0%   (0/20)0%   (0/5)
getEditTextValidator (): ICellEditorValidator 0%   (0/1)0%   (0/5)0%   (0/1)
getFontStyleOwnerView (): View 0%   (0/1)0%   (0/3)0%   (0/1)
getLabelIcon (): Image 0%   (0/1)0%   (0/11)0%   (0/5)
getLabelIconHelper (IFigure): Image 0%   (0/1)0%   (0/11)0%   (0/3)
getLabelText (): String 0%   (0/1)0%   (0/40)0%   (0/13)
getLabelTextHelper (IFigure): String 0%   (0/1)0%   (0/11)0%   (0/3)
getManager (): DirectEditManager 0%   (0/1)0%   (0/16)0%   (0/5)
getModelChildren (): List 0%   (0/1)0%   (0/2)0%   (0/1)
getParser (): IParser 0%   (0/1)0%   (0/14)0%   (0/7)
getParserElement (): EObject 0%   (0/1)0%   (0/3)0%   (0/1)
getParserOptions (): ParserOptions 0%   (0/1)0%   (0/2)0%   (0/1)
handleNotificationEvent (Notification): void 0%   (0/1)0%   (0/63)0%   (0/22)
isEditable (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
performDirectEdit (): void 0%   (0/1)0%   (0/4)0%   (0/2)
performDirectEdit (Point): void 0%   (0/1)0%   (0/12)0%   (0/4)
performDirectEdit (char): void 0%   (0/1)0%   (0/13)0%   (0/4)
performDirectEditRequest (Request): void 0%   (0/1)0%   (0/16)0%   (0/5)
refreshFont (): void 0%   (0/1)0%   (0/34)0%   (0/8)
refreshLabel (): void 0%   (0/1)0%   (0/33)0%   (0/11)
refreshStrikeThrough (): void 0%   (0/1)0%   (0/20)0%   (0/6)
refreshUnderline (): void 0%   (0/1)0%   (0/20)0%   (0/5)
refreshVisuals (): void 0%   (0/1)0%   (0/13)0%   (0/7)
removeNotationalListeners (): void 0%   (0/1)0%   (0/6)0%   (0/3)
removeSemanticListeners (): void 0%   (0/1)0%   (0/25)0%   (0/5)
setFontColor (Color): void 0%   (0/1)0%   (0/5)0%   (0/2)
setLabel (WrappingLabel): void 0%   (0/1)0%   (0/15)0%   (0/6)
setLabelIconHelper (IFigure, Image): void 0%   (0/1)0%   (0/13)0%   (0/4)
setLabelText (String): void 0%   (0/1)0%   (0/26)0%   (0/10)
setLabelTextHelper (IFigure, String): void 0%   (0/1)0%   (0/13)0%   (0/4)
setManager (DirectEditManager): void 0%   (0/1)0%   (0/4)0%   (0/2)
     
class ComponentExternalCallNameLabelEditPart$10%   (0/1)0%   (0/4)0%   (0/27)0%   (0/9)
ComponentExternalCallNameLabelEditPart$1 (ComponentExternalCallNameLabelEditP... 0%   (0/1)0%   (0/6)0%   (0/2)
createSelectionHandles (): List 0%   (0/1)0%   (0/17)0%   (0/5)
getCommand (Request): Command 0%   (0/1)0%   (0/2)0%   (0/1)
understandsRequest (Request): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
     
class ComponentExternalCallNameLabelEditPart$20%   (0/1)0%   (0/2)0%   (0/43)0%   (0/12)
ComponentExternalCallNameLabelEditPart$2 (ComponentExternalCallNameLabelEditP... 0%   (0/1)0%   (0/6)0%   (0/2)
isValid (Object): String 0%   (0/1)0%   (0/37)0%   (0/10)
     
class ComponentExternalCallNameLabelEditPart$2$10%   (0/1)0%   (0/2)0%   (0/29)0%   (0/6)
ComponentExternalCallNameLabelEditPart$2$1 (ComponentExternalCallNameLabelEdi... 0%   (0/1)0%   (0/15)0%   (0/2)
run (): void 0%   (0/1)0%   (0/14)0%   (0/4)
     
class ComponentExternalCallNameLabelEditPart$30%   (0/1)0%   (0/2)0%   (0/63)0%   (0/18)
ComponentExternalCallNameLabelEditPart$3 (ComponentExternalCallNameLabelEditP... 0%   (0/1)0%   (0/9)0%   (0/2)
run (): void 0%   (0/1)0%   (0/54)0%   (0/16)
     
class ComponentExternalCallNameLabelEditPart$40%   (0/1)0%   (0/2)0%   (0/16)0%   (0/4)
ComponentExternalCallNameLabelEditPart$4 (ComponentExternalCallNameLabelEditP... 0%   (0/1)0%   (0/7)0%   (0/2)
getName (AccessibleEvent): void 0%   (0/1)0%   (0/9)0%   (0/2)

1/*
2 * Copyright 2007, SDQ, IPD, University of Karlsruhe
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.edit.parts;
5 
6import java.util.ArrayList;
7import java.util.Collections;
8import java.util.List;
9 
10import org.eclipse.draw2d.IFigure;
11import org.eclipse.draw2d.Label;
12import org.eclipse.draw2d.geometry.Point;
13import org.eclipse.emf.common.notify.Notification;
14import org.eclipse.emf.ecore.EObject;
15import org.eclipse.emf.transaction.RunnableWithResult;
16import org.eclipse.gef.AccessibleEditPart;
17import org.eclipse.gef.EditPolicy;
18import org.eclipse.gef.GraphicalEditPart;
19import org.eclipse.gef.Request;
20import org.eclipse.gef.commands.Command;
21import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
22import org.eclipse.gef.handles.MoveHandle;
23import org.eclipse.gef.handles.NonResizableHandleKit;
24import org.eclipse.gef.requests.DirectEditRequest;
25import org.eclipse.gef.tools.DirectEditManager;
26import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
27import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
28import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
29import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
30import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
31import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
32import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
33import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
34import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
35import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
36import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
37import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
38import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
39import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
40import org.eclipse.gmf.runtime.notation.FontStyle;
41import org.eclipse.gmf.runtime.notation.NotationPackage;
42import org.eclipse.gmf.runtime.notation.View;
43import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
44import org.eclipse.jface.viewers.ICellEditorValidator;
45import org.eclipse.swt.SWT;
46import org.eclipse.swt.accessibility.AccessibleEvent;
47import org.eclipse.swt.graphics.Color;
48import org.eclipse.swt.graphics.FontData;
49import org.eclipse.swt.graphics.Image;
50 
51import de.uka.ipd.sdq.pcm.gmf.usage.edit.policies.PalladioComponentModelTextSelectionEditPolicy;
52import de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry;
53import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelElementTypes;
54import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelParserProvider;
55import de.uka.ipd.sdq.pcm.usagemodel.EntryLevelSystemCall;
56 
57/**
58 * @generated
59 */
60public class ComponentExternalCallNameLabelEditPart extends CompartmentEditPart
61                implements ITextAwareEditPart {
62 
63        /**
64         * @generated
65         */
66        public static final int VISUAL_ID = 5004;
67 
68        /**
69         * @generated
70         */
71        private DirectEditManager manager;
72 
73        /**
74         * @generated
75         */
76        private IParser parser;
77 
78        /**
79         * @generated
80         */
81        private List parserElements;
82 
83        /**
84         * @generated
85         */
86        private String defaultText;
87 
88        /**
89         * @generated
90         */
91        public ComponentExternalCallNameLabelEditPart(View view) {
92                super(view);
93        }
94 
95        /**
96         * @generated
97         */
98        protected void createDefaultEditPolicies() {
99                super.createDefaultEditPolicies();
100                installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
101                                new PalladioComponentModelTextSelectionEditPolicy());
102                installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
103                                new LabelDirectEditPolicy());
104                installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
105                                new NonResizableEditPolicy() {
106 
107                                        protected List createSelectionHandles() {
108                                                List handles = new ArrayList();
109                                                NonResizableHandleKit.addMoveHandle(
110                                                                (GraphicalEditPart) getHost(), handles);
111                                                ((MoveHandle) handles.get(0)).setBorder(null);
112                                                return handles;
113                                        }
114 
115                                        public Command getCommand(Request request) {
116                                                return null;
117                                        }
118 
119                                        public boolean understandsRequest(Request request) {
120                                                return false;
121                                        }
122                                });
123        }
124 
125        /**
126         * @generated
127         */
128        protected String getLabelTextHelper(IFigure figure) {
129                if (figure instanceof WrappingLabel) {
130                        return ((WrappingLabel) figure).getText();
131                } else {
132                        return ((Label) figure).getText();
133                }
134        }
135 
136        /**
137         * @generated
138         */
139        protected void setLabelTextHelper(IFigure figure, String text) {
140                if (figure instanceof WrappingLabel) {
141                        ((WrappingLabel) figure).setText(text);
142                } else {
143                        ((Label) figure).setText(text);
144                }
145        }
146 
147        /**
148         * @generated
149         */
150        protected Image getLabelIconHelper(IFigure figure) {
151                if (figure instanceof WrappingLabel) {
152                        return ((WrappingLabel) figure).getIcon();
153                } else {
154                        return ((Label) figure).getIcon();
155                }
156        }
157 
158        /**
159         * @generated
160         */
161        protected void setLabelIconHelper(IFigure figure, Image icon) {
162                if (figure instanceof WrappingLabel) {
163                        ((WrappingLabel) figure).setIcon(icon);
164                } else {
165                        ((Label) figure).setIcon(icon);
166                }
167        }
168 
169        /**
170         * @generated
171         */
172        public void setLabel(WrappingLabel figure) {
173                unregisterVisuals();
174                setFigure(figure);
175                defaultText = getLabelTextHelper(figure);
176                registerVisuals();
177                refreshVisuals();
178        }
179 
180        /**
181         * @generated
182         */
183        protected List getModelChildren() {
184                return Collections.EMPTY_LIST;
185        }
186 
187        /**
188         * @generated
189         */
190        public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
191                return null;
192        }
193 
194        /**
195         * @generated
196         */
197        protected EObject getParserElement() {
198                return resolveSemanticElement();
199        }
200 
201        /**
202         * @generated
203         */
204        protected Image getLabelIcon() {
205                EObject parserElement = getParserElement();
206                if (parserElement == null) {
207                        return null;
208                }
209                return PalladioComponentModelElementTypes.getImage(parserElement
210                                .eClass());
211        }
212 
213        /**
214         * @generated not
215         */
216        protected String getLabelText() {
217                String text = null;
218                EntryLevelSystemCall call = (EntryLevelSystemCall) resolveSemanticElement();
219                if (call != null && call.getProvidedRole_EntryLevelSystemCall() != null
220                                && call.getOperationSignature__EntryLevelSystemCall() != null) {
221                        text = call.getProvidedRole_EntryLevelSystemCall()
222                                        .getProvidedInterface__OperationProvidedRole()
223                                        .getEntityName()
224                                        + "."
225                                        + call.getOperationSignature__EntryLevelSystemCall()
226                                                        .getEntityName();
227                }
228                if (text == null || text.length() == 0) {
229                        text = defaultText;
230                }
231                return text;
232        }
233 
234        /**
235         * @generated
236         */
237        public void setLabelText(String text) {
238                setLabelTextHelper(getFigure(), text);
239                Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
240                if (pdEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
241                        ((PalladioComponentModelTextSelectionEditPolicy) pdEditPolicy)
242                                        .refreshFeedback();
243                }
244                Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
245                if (sfEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
246                        ((PalladioComponentModelTextSelectionEditPolicy) sfEditPolicy)
247                                        .refreshFeedback();
248                }
249        }
250 
251        /**
252         * @generated
253         */
254        public String getEditText() {
255                if (getParserElement() == null || getParser() == null) {
256                        return ""; //$NON-NLS-1$
257                }
258                return getParser().getEditString(
259                                new EObjectAdapter(getParserElement()),
260                                getParserOptions().intValue());
261        }
262 
263        /**
264         * @generated
265         */
266        protected boolean isEditable() {
267                return false;
268        }
269 
270        /**
271         * @generated
272         */
273        public ICellEditorValidator getEditTextValidator() {
274                return new ICellEditorValidator() {
275 
276                        public String isValid(final Object value) {
277                                if (value instanceof String) {
278                                        final EObject element = getParserElement();
279                                        final IParser parser = getParser();
280                                        try {
281                                                IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
282                                                                .runExclusive(new RunnableWithResult.Impl() {
283 
284                                                                        public void run() {
285                                                                                setResult(parser.isValidEditString(
286                                                                                                new EObjectAdapter(element),
287                                                                                                (String) value));
288                                                                        }
289                                                                });
290                                                return valid.getCode() == ParserEditStatus.EDITABLE ? null
291                                                                : valid.getMessage();
292                                        } catch (InterruptedException ie) {
293                                                ie.printStackTrace();
294                                        }
295                                }
296 
297                                // shouldn't get here
298                                return null;
299                        }
300                };
301        }
302 
303        /**
304         * @generated
305         */
306        public IContentAssistProcessor getCompletionProcessor() {
307                if (getParserElement() == null || getParser() == null) {
308                        return null;
309                }
310                return getParser().getCompletionProcessor(
311                                new EObjectAdapter(getParserElement()));
312        }
313 
314        /**
315         * @generated
316         */
317        public ParserOptions getParserOptions() {
318                return ParserOptions.NONE;
319        }
320 
321        /**
322         * @generated
323         */
324        public IParser getParser() {
325                if (parser == null) {
326                        parser = PalladioComponentModelParserProvider
327                                        .getParser(
328                                                        PalladioComponentModelElementTypes.EntryLevelSystemCall_3003,
329                                                        getParserElement(),
330                                                        PalladioComponentModelVisualIDRegistry
331                                                                        .getType(de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ComponentExternalCallNameLabelEditPart.VISUAL_ID));
332                }
333                return parser;
334        }
335 
336        /**
337         * @generated
338         */
339        protected DirectEditManager getManager() {
340                if (manager == null) {
341                        setManager(new TextDirectEditManager(this, TextDirectEditManager
342                                        .getTextCellEditorClass(this),
343                                        PalladioComponentModelEditPartFactory
344                                                        .getTextCellEditorLocator(this)));
345                }
346                return manager;
347        }
348 
349        /**
350         * @generated
351         */
352        protected void setManager(DirectEditManager manager) {
353                this.manager = manager;
354        }
355 
356        /**
357         * @generated
358         */
359        protected void performDirectEdit() {
360                getManager().show();
361        }
362 
363        /**
364         * @generated
365         */
366        protected void performDirectEdit(Point eventLocation) {
367                if (getManager().getClass() == TextDirectEditManager.class) {
368                        ((TextDirectEditManager) getManager()).show(eventLocation
369                                        .getSWTPoint());
370                }
371        }
372 
373        /**
374         * @generated
375         */
376        private void performDirectEdit(char initialCharacter) {
377                if (getManager() instanceof TextDirectEditManager) {
378                        ((TextDirectEditManager) getManager()).show(initialCharacter);
379                } else {
380                        performDirectEdit();
381                }
382        }
383 
384        /**
385         * @generated
386         */
387        protected void performDirectEditRequest(Request request) {
388                final Request theRequest = request;
389                try {
390                        getEditingDomain().runExclusive(new Runnable() {
391 
392                                public void run() {
393                                        if (isActive() && isEditable()) {
394                                                if (theRequest
395                                                                .getExtendedData()
396                                                                .get(
397                                                                                RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
398                                                        Character initialChar = (Character) theRequest
399                                                                        .getExtendedData()
400                                                                        .get(
401                                                                                        RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
402                                                        performDirectEdit(initialChar.charValue());
403                                                } else if ((theRequest instanceof DirectEditRequest)
404                                                                && (getEditText().equals(getLabelText()))) {
405                                                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
406                                                        performDirectEdit(editRequest.getLocation());
407                                                } else {
408                                                        performDirectEdit();
409                                                }
410                                        }
411                                }
412                        });
413                } catch (InterruptedException e) {
414                        e.printStackTrace();
415                }
416        }
417 
418        /**
419         * @generated
420         */
421        protected void refreshVisuals() {
422                super.refreshVisuals();
423                refreshLabel();
424                refreshFont();
425                refreshFontColor();
426                refreshUnderline();
427                refreshStrikeThrough();
428        }
429 
430        /**
431         * @generated
432         */
433        protected void refreshLabel() {
434                setLabelTextHelper(getFigure(), getLabelText());
435                setLabelIconHelper(getFigure(), getLabelIcon());
436                Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
437                if (pdEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
438                        ((PalladioComponentModelTextSelectionEditPolicy) pdEditPolicy)
439                                        .refreshFeedback();
440                }
441                Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
442                if (sfEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
443                        ((PalladioComponentModelTextSelectionEditPolicy) sfEditPolicy)
444                                        .refreshFeedback();
445                }
446        }
447 
448        /**
449         * @generated
450         */
451        protected void refreshUnderline() {
452                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
453                                NotationPackage.eINSTANCE.getFontStyle());
454                if (style != null && getFigure() instanceof WrappingLabel) {
455                        ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
456                }
457        }
458 
459        /**
460         * @generated
461         */
462        protected void refreshStrikeThrough() {
463                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
464                                NotationPackage.eINSTANCE.getFontStyle());
465                if (style != null && getFigure() instanceof WrappingLabel) {
466                        ((WrappingLabel) getFigure()).setTextStrikeThrough(style
467                                        .isStrikeThrough());
468                }
469        }
470 
471        /**
472         * @generated
473         */
474        protected void refreshFont() {
475                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
476                                NotationPackage.eINSTANCE.getFontStyle());
477                if (style != null) {
478                        FontData fontData = new FontData(style.getFontName(), style
479                                        .getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL)
480                                        | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
481                        setFont(fontData);
482                }
483        }
484 
485        /**
486         * @generated
487         */
488        protected void setFontColor(Color color) {
489                getFigure().setForegroundColor(color);
490        }
491 
492        /**
493         * @generated
494         */
495        protected void addSemanticListeners() {
496                if (getParser() instanceof ISemanticParser) {
497                        EObject element = resolveSemanticElement();
498                        parserElements = ((ISemanticParser) getParser())
499                                        .getSemanticElementsBeingParsed(element);
500                        for (int i = 0; i < parserElements.size(); i++) {
501                                addListenerFilter(
502                                                "SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
503                        }
504                } else {
505                        super.addSemanticListeners();
506                }
507        }
508 
509        /**
510         * @generated
511         */
512        protected void removeSemanticListeners() {
513                if (parserElements != null) {
514                        for (int i = 0; i < parserElements.size(); i++) {
515                                removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
516                        }
517                } else {
518                        super.removeSemanticListeners();
519                }
520        }
521 
522        /**
523         * @generated
524         */
525        protected AccessibleEditPart getAccessibleEditPart() {
526                if (accessibleEP == null) {
527                        accessibleEP = new AccessibleGraphicalEditPart() {
528 
529                                public void getName(AccessibleEvent e) {
530                                        e.result = getLabelTextHelper(getFigure());
531                                }
532                        };
533                }
534                return accessibleEP;
535        }
536 
537        /**
538         * @generated
539         */
540        private View getFontStyleOwnerView() {
541                return getPrimaryView();
542        }
543 
544        /**
545         * @generated
546         */
547        protected void addNotationalListeners() {
548                super.addNotationalListeners();
549                addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
550        }
551 
552        /**
553         * @generated
554         */
555        protected void removeNotationalListeners() {
556                super.removeNotationalListeners();
557                removeListenerFilter("PrimaryView"); //$NON-NLS-1$
558        }
559 
560        /**
561         * @generated not
562         */
563        protected void handleNotificationEvent(Notification event) {
564                Object feature = event.getFeature();
565                if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
566                        Integer c = (Integer) event.getNewValue();
567                        setFontColor(DiagramColorRegistry.getInstance().getColor(c));
568                } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(
569                                feature)) {
570                        refreshUnderline();
571                } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough()
572                                .equals(feature)) {
573                        refreshStrikeThrough();
574                } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(
575                                feature)
576                                || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(
577                                                feature)
578                                || NotationPackage.eINSTANCE.getFontStyle_Bold()
579                                                .equals(feature)
580                                || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(
581                                                feature)) {
582                        refreshFont();
583                } else {
584                        refreshLabel();
585                }
586                super.handleNotificationEvent(event);
587        }
588 
589        /**
590         * @generated
591         */
592        protected IFigure createFigure() {
593                // Parent should assign one using setLabel() method
594                return null;
595        }
596}

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