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

COVERAGE SUMMARY FOR SOURCE FILE [AllocationContextEntityNameEditPart.java]

nameclass, %method, %block, %line, %
AllocationContextEntityNameEditPart.java0%   (0/6)0%   (0/52)0%   (0/775)0%   (0/224)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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