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

COVERAGE SUMMARY FOR SOURCE FILE [UsageLoopIterationsLabelEditPart.java]

nameclass, %method, %block, %line, %
UsageLoopIterationsLabelEditPart.java0%   (0/7)0%   (0/54)0%   (0/756)0%   (0/229)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UsageLoopIterationsLabelEditPart0%   (0/1)0%   (0/40)0%   (0/564)0%   (0/185)
UsageLoopIterationsLabelEditPart (View): void 0%   (0/1)0%   (0/10)0%   (0/4)
access$0 (UsageLoopIterationsLabelEditPart, 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/24)0%   (0/6)
createDefaultEditPolicies (): void 0%   (0/1)0%   (0/28)0%   (0/10)
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/34)0%   (0/10)
getLabelTextHelper (IFigure): String 0%   (0/1)0%   (0/11)0%   (0/3)
getManager (): DirectEditManager 0%   (0/1)0%   (0/16)0%   (0/5)
getModelChildren (): List 0%   (0/1)0%   (0/2)0%   (0/1)
getParser (): IParser 0%   (0/1)0%   (0/14)0%   (0/7)
getParserElement (): EObject 0%   (0/1)0%   (0/3)0%   (0/1)
getParserOptions (): ParserOptions 0%   (0/1)0%   (0/2)0%   (0/1)
handleNotificationEvent (Notification): void 0%   (0/1)0%   (0/63)0%   (0/22)
isEditable (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
performDirectEdit (): void 0%   (0/1)0%   (0/4)0%   (0/2)
performDirectEdit (Point): void 0%   (0/1)0%   (0/12)0%   (0/4)
performDirectEdit (char): void 0%   (0/1)0%   (0/13)0%   (0/4)
performDirectEditRequest (Request): void 0%   (0/1)0%   (0/16)0%   (0/5)
refreshFont (): void 0%   (0/1)0%   (0/34)0%   (0/8)
refreshLabel (): void 0%   (0/1)0%   (0/33)0%   (0/11)
refreshStrikeThrough (): void 0%   (0/1)0%   (0/20)0%   (0/6)
refreshUnderline (): void 0%   (0/1)0%   (0/20)0%   (0/5)
refreshVisuals (): void 0%   (0/1)0%   (0/13)0%   (0/7)
removeNotationalListeners (): void 0%   (0/1)0%   (0/6)0%   (0/3)
removeSemanticListeners (): void 0%   (0/1)0%   (0/11)0%   (0/3)
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 UsageLoopIterationsLabelEditPart$10%   (0/1)0%   (0/4)0%   (0/27)0%   (0/9)
UsageLoopIterationsLabelEditPart$1 (UsageLoopIterationsLabelEditPart): void 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 UsageLoopIterationsLabelEditPart$20%   (0/1)0%   (0/2)0%   (0/43)0%   (0/12)
UsageLoopIterationsLabelEditPart$2 (UsageLoopIterationsLabelEditPart): void 0%   (0/1)0%   (0/6)0%   (0/2)
isValid (Object): String 0%   (0/1)0%   (0/37)0%   (0/10)
     
class UsageLoopIterationsLabelEditPart$2$10%   (0/1)0%   (0/2)0%   (0/29)0%   (0/6)
UsageLoopIterationsLabelEditPart$2$1 (UsageLoopIterationsLabelEditPart$2, IPa... 0%   (0/1)0%   (0/15)0%   (0/2)
run (): void 0%   (0/1)0%   (0/14)0%   (0/4)
     
class UsageLoopIterationsLabelEditPart$30%   (0/1)0%   (0/2)0%   (0/63)0%   (0/18)
UsageLoopIterationsLabelEditPart$3 (UsageLoopIterationsLabelEditPart, Request... 0%   (0/1)0%   (0/9)0%   (0/2)
run (): void 0%   (0/1)0%   (0/54)0%   (0/16)
     
class UsageLoopIterationsLabelEditPart$40%   (0/1)0%   (0/2)0%   (0/14)0%   (0/6)
UsageLoopIterationsLabelEditPart$4 (UsageLoopIterationsLabelEditPart): void 0%   (0/1)0%   (0/6)0%   (0/2)
notifyChanged (Notification): void 0%   (0/1)0%   (0/8)0%   (0/4)
     
class UsageLoopIterationsLabelEditPart$50%   (0/1)0%   (0/2)0%   (0/16)0%   (0/4)
UsageLoopIterationsLabelEditPart$5 (UsageLoopIterationsLabelEditPart, Abstrac... 0%   (0/1)0%   (0/7)0%   (0/2)
getName (AccessibleEvent): void 0%   (0/1)0%   (0/9)0%   (0/2)

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

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