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

COVERAGE SUMMARY FOR SOURCE FILE [InfrastructureInterfaceEntityNameEditPart.java]

nameclass, %method, %block, %line, %
InfrastructureInterfaceEntityNameEditPart.java0%   (0/6)0%   (0/52)0%   (0/797)0%   (0/235)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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