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

COVERAGE SUMMARY FOR SOURCE FILE [CommunicationLinkResourceSpecificationFailureProbabilityEditPart.java]

nameclass, %method, %block, %line, %
CommunicationLinkResourceSpecificationFailureProbabilityEditPart.java0%   (0/6)0%   (0/52)0%   (0/788)0%   (0/231)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CommunicationLinkResourceSpecificationFailureProbabilityEditPart0%   (0/1)0%   (0/40)0%   (0/610)0%   (0/191)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart (View): void 0%   (0/1)0%   (0/4)0%   (0/2)
access$0 (CommunicationLinkResourceSpecificationFailureProbabilityEditPart, c... 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/2)0%   (0/1)
getLabelIconHelper (IFigure): Image 0%   (0/1)0%   (0/11)0%   (0/3)
getLabelText (): String 0%   (0/1)0%   (0/31)0%   (0/9)
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/96)0%   (0/32)
isEditable (): boolean 0%   (0/1)0%   (0/7)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 CommunicationLinkResourceSpecificationFailureProbabilityEditPart$10%   (0/1)0%   (0/4)0%   (0/27)0%   (0/9)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart$1 (Communica... 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 CommunicationLinkResourceSpecificationFailureProbabilityEditPart$20%   (0/1)0%   (0/2)0%   (0/43)0%   (0/12)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart$2 (Communica... 0%   (0/1)0%   (0/6)0%   (0/2)
isValid (Object): String 0%   (0/1)0%   (0/37)0%   (0/10)
     
class CommunicationLinkResourceSpecificationFailureProbabilityEditPart$2$10%   (0/1)0%   (0/2)0%   (0/29)0%   (0/6)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart$2$1 (Communi... 0%   (0/1)0%   (0/15)0%   (0/2)
run (): void 0%   (0/1)0%   (0/14)0%   (0/4)
     
class CommunicationLinkResourceSpecificationFailureProbabilityEditPart$30%   (0/1)0%   (0/2)0%   (0/63)0%   (0/18)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart$3 (Communica... 0%   (0/1)0%   (0/9)0%   (0/2)
run (): void 0%   (0/1)0%   (0/54)0%   (0/16)
     
class CommunicationLinkResourceSpecificationFailureProbabilityEditPart$40%   (0/1)0%   (0/2)0%   (0/16)0%   (0/4)
CommunicationLinkResourceSpecificationFailureProbabilityEditPart$4 (Communica... 0%   (0/1)0%   (0/7)0%   (0/2)
getName (AccessibleEvent): void 0%   (0/1)0%   (0/9)0%   (0/2)

1/*
2 * Copyright 2009, SDQ, IPD, Uni Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.resource.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.resource.edit.policies.PalladioComponentModelTextSelectionEditPolicy;
52import de.uka.ipd.sdq.pcm.gmf.resource.part.PalladioComponentModelVisualIDRegistry;
53import de.uka.ipd.sdq.pcm.gmf.resource.providers.PalladioComponentModelElementTypes;
54import de.uka.ipd.sdq.pcm.gmf.resource.providers.PalladioComponentModelParserProvider;
55 
56/**
57 * @generated
58 */
59public class CommunicationLinkResourceSpecificationFailureProbabilityEditPart
60                extends CompartmentEditPart implements ITextAwareEditPart {
61 
62        /**
63         * @generated
64         */
65        public static final int VISUAL_ID = 5005;
66 
67        /**
68         * @generated
69         */
70        private DirectEditManager manager;
71 
72        /**
73         * @generated
74         */
75        private IParser parser;
76 
77        /**
78         * @generated
79         */
80        private List parserElements;
81 
82        /**
83         * @generated
84         */
85        private String defaultText;
86 
87        /**
88         * @generated
89         */
90        public CommunicationLinkResourceSpecificationFailureProbabilityEditPart(
91                        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                return null;
206        }
207 
208        /**
209         * @generated
210         */
211        protected String getLabelText() {
212                String text = null;
213                EObject parserElement = getParserElement();
214                if (parserElement != null && getParser() != null) {
215                        text = getParser().getPrintString(
216                                        new EObjectAdapter(parserElement),
217                                        getParserOptions().intValue());
218                }
219                if (text == null || text.length() == 0) {
220                        text = defaultText;
221                }
222                return text;
223        }
224 
225        /**
226         * @generated
227         */
228        public void setLabelText(String text) {
229                setLabelTextHelper(getFigure(), text);
230                Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
231                if (pdEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
232                        ((PalladioComponentModelTextSelectionEditPolicy) pdEditPolicy)
233                                        .refreshFeedback();
234                }
235                Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
236                if (sfEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
237                        ((PalladioComponentModelTextSelectionEditPolicy) sfEditPolicy)
238                                        .refreshFeedback();
239                }
240        }
241 
242        /**
243         * @generated
244         */
245        public String getEditText() {
246                if (getParserElement() == null || getParser() == null) {
247                        return ""; //$NON-NLS-1$
248                }
249                return getParser().getEditString(
250                                new EObjectAdapter(getParserElement()),
251                                getParserOptions().intValue());
252        }
253 
254        /**
255         * @generated
256         */
257        protected boolean isEditable() {
258                return getParser() != null;
259        }
260 
261        /**
262         * @generated
263         */
264        public ICellEditorValidator getEditTextValidator() {
265                return new ICellEditorValidator() {
266 
267                        public String isValid(final Object value) {
268                                if (value instanceof String) {
269                                        final EObject element = getParserElement();
270                                        final IParser parser = getParser();
271                                        try {
272                                                IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
273                                                                .runExclusive(new RunnableWithResult.Impl() {
274 
275                                                                        public void run() {
276                                                                                setResult(parser.isValidEditString(
277                                                                                                new EObjectAdapter(element),
278                                                                                                (String) value));
279                                                                        }
280                                                                });
281                                                return valid.getCode() == ParserEditStatus.EDITABLE ? null
282                                                                : valid.getMessage();
283                                        } catch (InterruptedException ie) {
284                                                ie.printStackTrace();
285                                        }
286                                }
287 
288                                // shouldn't get here
289                                return null;
290                        }
291                };
292        }
293 
294        /**
295         * @generated
296         */
297        public IContentAssistProcessor getCompletionProcessor() {
298                if (getParserElement() == null || getParser() == null) {
299                        return null;
300                }
301                return getParser().getCompletionProcessor(
302                                new EObjectAdapter(getParserElement()));
303        }
304 
305        /**
306         * @generated
307         */
308        public ParserOptions getParserOptions() {
309                return ParserOptions.NONE;
310        }
311 
312        /**
313         * @generated
314         */
315        public IParser getParser() {
316                if (parser == null) {
317                        parser = PalladioComponentModelParserProvider
318                                        .getParser(
319                                                        PalladioComponentModelElementTypes.CommunicationLinkResourceSpecification_3002,
320                                                        getParserElement(),
321                                                        PalladioComponentModelVisualIDRegistry
322                                                                        .getType(de.uka.ipd.sdq.pcm.gmf.resource.edit.parts.CommunicationLinkResourceSpecificationFailureProbabilityEditPart.VISUAL_ID));
323                }
324                return parser;
325        }
326 
327        /**
328         * @generated
329         */
330        protected DirectEditManager getManager() {
331                if (manager == null) {
332                        setManager(new TextDirectEditManager(this, TextDirectEditManager
333                                        .getTextCellEditorClass(this),
334                                        PalladioComponentModelEditPartFactory
335                                                        .getTextCellEditorLocator(this)));
336                }
337                return manager;
338        }
339 
340        /**
341         * @generated
342         */
343        protected void setManager(DirectEditManager manager) {
344                this.manager = manager;
345        }
346 
347        /**
348         * @generated
349         */
350        protected void performDirectEdit() {
351                getManager().show();
352        }
353 
354        /**
355         * @generated
356         */
357        protected void performDirectEdit(Point eventLocation) {
358                if (getManager().getClass() == TextDirectEditManager.class) {
359                        ((TextDirectEditManager) getManager()).show(eventLocation
360                                        .getSWTPoint());
361                }
362        }
363 
364        /**
365         * @generated
366         */
367        private void performDirectEdit(char initialCharacter) {
368                if (getManager() instanceof TextDirectEditManager) {
369                        ((TextDirectEditManager) getManager()).show(initialCharacter);
370                } else {
371                        performDirectEdit();
372                }
373        }
374 
375        /**
376         * @generated
377         */
378        protected void performDirectEditRequest(Request request) {
379                final Request theRequest = request;
380                try {
381                        getEditingDomain().runExclusive(new Runnable() {
382 
383                                public void run() {
384                                        if (isActive() && isEditable()) {
385                                                if (theRequest
386                                                                .getExtendedData()
387                                                                .get(
388                                                                                RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
389                                                        Character initialChar = (Character) theRequest
390                                                                        .getExtendedData()
391                                                                        .get(
392                                                                                        RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
393                                                        performDirectEdit(initialChar.charValue());
394                                                } else if ((theRequest instanceof DirectEditRequest)
395                                                                && (getEditText().equals(getLabelText()))) {
396                                                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
397                                                        performDirectEdit(editRequest.getLocation());
398                                                } else {
399                                                        performDirectEdit();
400                                                }
401                                        }
402                                }
403                        });
404                } catch (InterruptedException e) {
405                        e.printStackTrace();
406                }
407        }
408 
409        /**
410         * @generated
411         */
412        protected void refreshVisuals() {
413                super.refreshVisuals();
414                refreshLabel();
415                refreshFont();
416                refreshFontColor();
417                refreshUnderline();
418                refreshStrikeThrough();
419        }
420 
421        /**
422         * @generated
423         */
424        protected void refreshLabel() {
425                setLabelTextHelper(getFigure(), getLabelText());
426                setLabelIconHelper(getFigure(), getLabelIcon());
427                Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
428                if (pdEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
429                        ((PalladioComponentModelTextSelectionEditPolicy) pdEditPolicy)
430                                        .refreshFeedback();
431                }
432                Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
433                if (sfEditPolicy instanceof PalladioComponentModelTextSelectionEditPolicy) {
434                        ((PalladioComponentModelTextSelectionEditPolicy) sfEditPolicy)
435                                        .refreshFeedback();
436                }
437        }
438 
439        /**
440         * @generated
441         */
442        protected void refreshUnderline() {
443                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
444                                NotationPackage.eINSTANCE.getFontStyle());
445                if (style != null && getFigure() instanceof WrappingLabel) {
446                        ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
447                }
448        }
449 
450        /**
451         * @generated
452         */
453        protected void refreshStrikeThrough() {
454                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
455                                NotationPackage.eINSTANCE.getFontStyle());
456                if (style != null && getFigure() instanceof WrappingLabel) {
457                        ((WrappingLabel) getFigure()).setTextStrikeThrough(style
458                                        .isStrikeThrough());
459                }
460        }
461 
462        /**
463         * @generated
464         */
465        protected void refreshFont() {
466                FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
467                                NotationPackage.eINSTANCE.getFontStyle());
468                if (style != null) {
469                        FontData fontData = new FontData(style.getFontName(), style
470                                        .getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL)
471                                        | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
472                        setFont(fontData);
473                }
474        }
475 
476        /**
477         * @generated
478         */
479        protected void setFontColor(Color color) {
480                getFigure().setForegroundColor(color);
481        }
482 
483        /**
484         * @generated
485         */
486        protected void addSemanticListeners() {
487                if (getParser() instanceof ISemanticParser) {
488                        EObject element = resolveSemanticElement();
489                        parserElements = ((ISemanticParser) getParser())
490                                        .getSemanticElementsBeingParsed(element);
491                        for (int i = 0; i < parserElements.size(); i++) {
492                                addListenerFilter(
493                                                "SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
494                        }
495                } else {
496                        super.addSemanticListeners();
497                }
498        }
499 
500        /**
501         * @generated
502         */
503        protected void removeSemanticListeners() {
504                if (parserElements != null) {
505                        for (int i = 0; i < parserElements.size(); i++) {
506                                removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
507                        }
508                } else {
509                        super.removeSemanticListeners();
510                }
511        }
512 
513        /**
514         * @generated
515         */
516        protected AccessibleEditPart getAccessibleEditPart() {
517                if (accessibleEP == null) {
518                        accessibleEP = new AccessibleGraphicalEditPart() {
519 
520                                public void getName(AccessibleEvent e) {
521                                        e.result = getLabelTextHelper(getFigure());
522                                }
523                        };
524                }
525                return accessibleEP;
526        }
527 
528        /**
529         * @generated
530         */
531        private View getFontStyleOwnerView() {
532                return getPrimaryView();
533        }
534 
535        /**
536         * @generated
537         */
538        protected void addNotationalListeners() {
539                super.addNotationalListeners();
540                addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
541        }
542 
543        /**
544         * @generated
545         */
546        protected void removeNotationalListeners() {
547                super.removeNotationalListeners();
548                removeListenerFilter("PrimaryView"); //$NON-NLS-1$
549        }
550 
551        /**
552         * @generated
553         */
554        protected void handleNotificationEvent(Notification event) {
555                Object feature = event.getFeature();
556                if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
557                        Integer c = (Integer) event.getNewValue();
558                        setFontColor(DiagramColorRegistry.getInstance().getColor(c));
559                } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(
560                                feature)) {
561                        refreshUnderline();
562                } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough()
563                                .equals(feature)) {
564                        refreshStrikeThrough();
565                } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(
566                                feature)
567                                || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(
568                                                feature)
569                                || NotationPackage.eINSTANCE.getFontStyle_Bold()
570                                                .equals(feature)
571                                || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(
572                                                feature)) {
573                        refreshFont();
574                } else {
575                        if (getParser() != null
576                                        && getParser().isAffectingEvent(event,
577                                                        getParserOptions().intValue())) {
578                                refreshLabel();
579                        }
580                        if (getParser() instanceof ISemanticParser) {
581                                ISemanticParser modelParser = (ISemanticParser) getParser();
582                                if (modelParser.areSemanticElementsAffected(null, event)) {
583                                        removeSemanticListeners();
584                                        if (resolveSemanticElement() != null) {
585                                                addSemanticListeners();
586                                        }
587                                        refreshLabel();
588                                }
589                        }
590                }
591                super.handleNotificationEvent(event);
592        }
593 
594        /**
595         * @generated
596         */
597        protected IFigure createFigure() {
598                // Parent should assign one using setLabel() method
599                return null;
600        }
601 
602}

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