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 [ProcessingResourceSpecificationMTTREditPart.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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