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

COVERAGE SUMMARY FOR SOURCE FILE [InfrastructureCallTargetLabelEditPart.java]

nameclass, %method, %block, %line, %
InfrastructureCallTargetLabelEditPart.java0%   (0/6)0%   (0/52)0%   (0/814)0%   (0/232)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InfrastructureCallTargetLabelEditPart0%   (0/1)0%   (0/40)0%   (0/636)0%   (0/192)
InfrastructureCallTargetLabelEditPart (View): void 0%   (0/1)0%   (0/4)0%   (0/2)
access$0 (InfrastructureCallTargetLabelEditPart, 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/81)0%   (0/16)
getLabelTextHelper (IFigure): String 0%   (0/1)0%   (0/11)0%   (0/3)
getManager (): DirectEditManager 0%   (0/1)0%   (0/16)0%   (0/5)
getModelChildren (): List 0%   (0/1)0%   (0/2)0%   (0/1)
getParser (): IParser 0%   (0/1)0%   (0/14)0%   (0/7)
getParserElement (): EObject 0%   (0/1)0%   (0/3)0%   (0/1)
getParserOptions (): ParserOptions 0%   (0/1)0%   (0/2)0%   (0/1)
handleNotificationEvent (Notification): void 0%   (0/1)0%   (0/63)0%   (0/22)
isEditable (): boolean 0%   (0/1)0%   (0/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 InfrastructureCallTargetLabelEditPart$10%   (0/1)0%   (0/4)0%   (0/27)0%   (0/9)
InfrastructureCallTargetLabelEditPart$1 (InfrastructureCallTargetLabelEditPar... 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 InfrastructureCallTargetLabelEditPart$20%   (0/1)0%   (0/2)0%   (0/43)0%   (0/12)
InfrastructureCallTargetLabelEditPart$2 (InfrastructureCallTargetLabelEditPar... 0%   (0/1)0%   (0/6)0%   (0/2)
isValid (Object): String 0%   (0/1)0%   (0/37)0%   (0/10)
     
class InfrastructureCallTargetLabelEditPart$2$10%   (0/1)0%   (0/2)0%   (0/29)0%   (0/6)
InfrastructureCallTargetLabelEditPart$2$1 (InfrastructureCallTargetLabelEditP... 0%   (0/1)0%   (0/15)0%   (0/2)
run (): void 0%   (0/1)0%   (0/14)0%   (0/4)
     
class InfrastructureCallTargetLabelEditPart$30%   (0/1)0%   (0/2)0%   (0/63)0%   (0/18)
InfrastructureCallTargetLabelEditPart$3 (InfrastructureCallTargetLabelEditPar... 0%   (0/1)0%   (0/9)0%   (0/2)
run (): void 0%   (0/1)0%   (0/54)0%   (0/16)
     
class InfrastructureCallTargetLabelEditPart$40%   (0/1)0%   (0/2)0%   (0/16)0%   (0/4)
InfrastructureCallTargetLabelEditPart$4 (InfrastructureCallTargetLabelEditPar... 0%   (0/1)0%   (0/7)0%   (0/2)
getName (AccessibleEvent): void 0%   (0/1)0%   (0/9)0%   (0/2)

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