Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 51849fc45d8456c605f5abe1c6a7e8283295d9e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
/*****************************************************************************
 * Copyright (c) 2009 Atos Origin.
 *
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   Atos Origin - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.providers;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
import org.eclipse.papyrus.uml.diagram.common.parser.ObservationParser;
import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseName2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.InteractionUseCustomParsers;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.LifelineCustomParsers;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.MessageCustomParser;
import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.uml2.uml.UMLPackage;

/**
 * @generated
 */
public class UMLParserProvider extends AbstractProvider implements IParserProvider {
	/**
	 * @generated
	 *
	 */
	private IParser interaction_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getInteraction_NameLabel_Parser() {
		if (interaction_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			parser.setViewPattern("sd: {0}"); //$NON-NLS-1$
			parser.setEditorPattern("{0}"); //$NON-NLS-1$
			parser.setEditPattern("{0}"); //$NON-NLS-1$
			interaction_NameLabel_Parser = parser;
		}
		return interaction_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private IParser interactionUse_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getInteractionUse_NameLabel_Parser() {
		if (interactionUse_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			parser.setViewPattern("Ref"); //$NON-NLS-1$
			parser.setEditorPattern("Ref"); //$NON-NLS-1$
			parser.setEditPattern("Ref"); //$NON-NLS-1$
			interactionUse_NameLabel_Parser = parser;
		}
		return interactionUse_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private InteractionUseCustomParsers interactionUse_TypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getInteractionUse_TypeLabel_Parser() {
		if (interactionUse_TypeLabel_Parser == null) {
			interactionUse_TypeLabel_Parser = new InteractionUseCustomParsers();
		}
		return interactionUse_TypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private IParser continuation_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getContinuation_NameLabel_Parser() {
		if (continuation_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			continuation_NameLabel_Parser = parser;
		}
		return continuation_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private LifelineCustomParsers lifeline_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getLifeline_NameLabel_Parser() {
		if (lifeline_NameLabel_Parser == null) {
			lifeline_NameLabel_Parser = new LifelineCustomParsers();
		}
		return lifeline_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private IParser stateInvariant_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getStateInvariant_NameLabel_Parser() {
		if (stateInvariant_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			stateInvariant_NameLabel_Parser = parser;
		}
		return stateInvariant_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private ConstraintParser stateInvariant_ConstraintLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getStateInvariant_ConstraintLabel_Parser() {
		if (stateInvariant_ConstraintLabel_Parser == null) {
			stateInvariant_ConstraintLabel_Parser = new ConstraintParser();
		}
		return stateInvariant_ConstraintLabel_Parser;
	}

	/**
	 * @generated
	 */
	private IParser constraint_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getConstraint_NameLabel_Parser() {
		if (constraint_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			constraint_NameLabel_Parser = parser;
		}
		return constraint_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private ConstraintParser constraint_BodyLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getConstraint_BodyLabel_Parser() {
		if (constraint_BodyLabel_Parser == null) {
			constraint_BodyLabel_Parser = new ConstraintParser();
		}
		return constraint_BodyLabel_Parser;
	}

	/**
	 * @generated
	 */
	private CommentParser comment_BodyLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getComment_BodyLabel_Parser() {
		if (comment_BodyLabel_Parser == null) {
			comment_BodyLabel_Parser = new CommentParser();
		}
		return comment_BodyLabel_Parser;
	}

	/**
	 * @generated
	 */
	private IParser gate_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getGate_NameLabel_Parser() {
		if (gate_NameLabel_Parser == null) {
			EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
			MessageFormatParser parser = new MessageFormatParser(features);
			gate_NameLabel_Parser = parser;
		}
		return gate_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private ConstraintParser timeConstraint_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getTimeConstraint_NameLabel_Parser() {
		if (timeConstraint_NameLabel_Parser == null) {
			timeConstraint_NameLabel_Parser = new ConstraintParser();
		}
		return timeConstraint_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser timeConstraint_StereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getTimeConstraint_StereotypeLabel_Parser() {
		if (timeConstraint_StereotypeLabel_Parser == null) {
			timeConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return timeConstraint_StereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_SynchNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_SynchNameLabel_Parser() {
		if (message_SynchNameLabel_Parser == null) {
			message_SynchNameLabel_Parser = new MessageCustomParser();
		}
		return message_SynchNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_SynchStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_SynchStereotypeLabel_Parser() {
		if (message_SynchStereotypeLabel_Parser == null) {
			message_SynchStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_SynchStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_AsynchNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_AsynchNameLabel_Parser() {
		if (message_AsynchNameLabel_Parser == null) {
			message_AsynchNameLabel_Parser = new MessageCustomParser();
		}
		return message_AsynchNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_AsynchStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_AsynchStereotypeLabel_Parser() {
		if (message_AsynchStereotypeLabel_Parser == null) {
			message_AsynchStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_AsynchStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_ReplyNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_ReplyNameLabel_Parser() {
		if (message_ReplyNameLabel_Parser == null) {
			message_ReplyNameLabel_Parser = new MessageCustomParser();
		}
		return message_ReplyNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_ReplyStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_ReplyStereotypeLabel_Parser() {
		if (message_ReplyStereotypeLabel_Parser == null) {
			message_ReplyStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_ReplyStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_CreateNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_CreateNameLabel_Parser() {
		if (message_CreateNameLabel_Parser == null) {
			message_CreateNameLabel_Parser = new MessageCustomParser();
		}
		return message_CreateNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_CreateStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_CreateStereotypeLabel_Parser() {
		if (message_CreateStereotypeLabel_Parser == null) {
			message_CreateStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_CreateStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_DeleteNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_DeleteNameLabel_Parser() {
		if (message_DeleteNameLabel_Parser == null) {
			message_DeleteNameLabel_Parser = new MessageCustomParser();
		}
		return message_DeleteNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_DeleteStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_DeleteStereotypeLabel_Parser() {
		if (message_DeleteStereotypeLabel_Parser == null) {
			message_DeleteStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_DeleteStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_LostNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_LostNameLabel_Parser() {
		if (message_LostNameLabel_Parser == null) {
			message_LostNameLabel_Parser = new MessageCustomParser();
		}
		return message_LostNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_LostStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_LostStereotypeLabel_Parser() {
		if (message_LostStereotypeLabel_Parser == null) {
			message_LostStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_LostStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private MessageCustomParser message_FoundNameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_FoundNameLabel_Parser() {
		if (message_FoundNameLabel_Parser == null) {
			message_FoundNameLabel_Parser = new MessageCustomParser();
		}
		return message_FoundNameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser message_FoundStereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getMessage_FoundStereotypeLabel_Parser() {
		if (message_FoundStereotypeLabel_Parser == null) {
			message_FoundStereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return message_FoundStereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser generalOrdering_StereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getGeneralOrdering_StereotypeLabel_Parser() {
		if (generalOrdering_StereotypeLabel_Parser == null) {
			generalOrdering_StereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return generalOrdering_StereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private ConstraintParser durationConstraint_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getDurationConstraint_NameLabel_Parser() {
		if (durationConstraint_NameLabel_Parser == null) {
			durationConstraint_NameLabel_Parser = new ConstraintParser();
		}
		return durationConstraint_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser durationConstraint_StereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getDurationConstraint_StereotypeLabel_Parser() {
		if (durationConstraint_StereotypeLabel_Parser == null) {
			durationConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return durationConstraint_StereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	private ObservationParser durationObservation_NameLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getDurationObservation_NameLabel_Parser() {
		if (durationObservation_NameLabel_Parser == null) {
			durationObservation_NameLabel_Parser = new ObservationParser();
		}
		return durationObservation_NameLabel_Parser;
	}

	/**
	 * @generated
	 */
	private AppliedStereotypeParser durationObservation_StereotypeLabel_Parser;

	/**
	 * @generated
	 */
	private IParser getDurationObservation_StereotypeLabel_Parser() {
		if (durationObservation_StereotypeLabel_Parser == null) {
			durationObservation_StereotypeLabel_Parser = new AppliedStereotypeParser();
		}
		return durationObservation_StereotypeLabel_Parser;
	}

	/**
	 * @generated
	 */
	protected IParser getParser(String visualID) {
		if (visualID != null) {
			switch (visualID) {
			case InteractionNameEditPart.VISUAL_ID:
				return getInteraction_NameLabel_Parser();

			case InteractionUseNameEditPart.VISUAL_ID:
				return getInteractionUse_NameLabel_Parser();
			case InteractionUseName2EditPart.VISUAL_ID:
				return getInteractionUse_TypeLabel_Parser();

			case ContinuationNameEditPart.VISUAL_ID:
				return getContinuation_NameLabel_Parser();

			case LifelineNameEditPart.VISUAL_ID:
				return getLifeline_NameLabel_Parser();

			case StateInvariantNameEditPart.VISUAL_ID:
				return getStateInvariant_NameLabel_Parser();
			case StateInvariantLabelEditPart.VISUAL_ID:
				return getStateInvariant_ConstraintLabel_Parser();

			case ConstraintNameEditPart.VISUAL_ID:
				return getConstraint_NameLabel_Parser();
			case Constraint2EditPart.VISUAL_ID:
				return getConstraint_BodyLabel_Parser();

			case CommentBodyEditPart.VISUAL_ID:
				return getComment_BodyLabel_Parser();

			case GateNameEditPart.VISUAL_ID:
				return getGate_NameLabel_Parser();

			case TimeConstraintNameEditPart.VISUAL_ID:
				return getTimeConstraint_NameLabel_Parser();
			case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
				return getTimeConstraint_StereotypeLabel_Parser();

			case MessageSyncNameEditPart.VISUAL_ID:
				return getMessage_SynchNameLabel_Parser();
			case MessageSyncAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_SynchStereotypeLabel_Parser();

			case MessageAsyncNameEditPart.VISUAL_ID:
				return getMessage_AsynchNameLabel_Parser();
			case MessageAsyncAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_AsynchStereotypeLabel_Parser();

			case MessageReplyNameEditPart.VISUAL_ID:
				return getMessage_ReplyNameLabel_Parser();
			case MessageReplyAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_ReplyStereotypeLabel_Parser();

			case MessageCreateNameEditPart.VISUAL_ID:
				return getMessage_CreateNameLabel_Parser();
			case MessageCreateAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_CreateStereotypeLabel_Parser();

			case MessageDeleteNameEditPart.VISUAL_ID:
				return getMessage_DeleteNameLabel_Parser();
			case MessageDeleteAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_DeleteStereotypeLabel_Parser();

			case MessageLostNameEditPart.VISUAL_ID:
				return getMessage_LostNameLabel_Parser();
			case MessageLostAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_LostStereotypeLabel_Parser();

			case MessageFoundNameEditPart.VISUAL_ID:
				return getMessage_FoundNameLabel_Parser();
			case MessageFoundAppliedStereotypeEditPart.VISUAL_ID:
				return getMessage_FoundStereotypeLabel_Parser();

			case GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID:
				return getGeneralOrdering_StereotypeLabel_Parser();

			case DurationConstraintLinkNameEditPart.VISUAL_ID:
				return getDurationConstraint_NameLabel_Parser();
			case DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID:
				return getDurationConstraint_StereotypeLabel_Parser();

			case DurationObservationLinkNameEditPart.VISUAL_ID:
				return getDurationObservation_NameLabel_Parser();
			case DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID:
				return getDurationObservation_StereotypeLabel_Parser();

			}
		}
		return null;
	}

	/**
	 * Utility method that consults ParserService
	 *
	 * @generated
	 */
	public static IParser getParser(IElementType type, EObject object, String parserHint) {
		return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
	}

	/**
	 * @generated
	 */
	@Override
	public IParser getParser(IAdaptable hint) {
		String vid = hint.getAdapter(String.class);
		if (vid != null) {
			return getParser(UMLVisualIDRegistry.getVisualID(vid));
		}
		View view = hint.getAdapter(View.class);
		if (view != null) {
			return getParser(UMLVisualIDRegistry.getVisualID(view));
		}
		return null;
	}

	/**
	 * @generated
	 */
	@Override
	public boolean provides(IOperation operation) {
		if (operation instanceof GetParserOperation) {
			IAdaptable hint = ((GetParserOperation) operation).getHint();
			if (UMLElementTypes.getElement(hint) == null) {
				return false;
			}
			return getParser(hint) != null;
		}
		return false;
	}

	/**
	 * @generated
	 */
	private static class HintAdapter extends ParserHintAdapter {

		/**
		 * @generated
		 */
		private final IElementType elementType;

		/**
		 * @generated
		 */
		public HintAdapter(IElementType type, EObject object, String parserHint) {
			super(object, parserHint);
			assert type != null;
			elementType = type;
		}

		/**
		 * @generated
		 */
		@Override
		public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
			if (IElementType.class.equals(adapter)) {
				return elementType;
			}
			return super.getAdapter(adapter);
		}
	}
}

Back to the top