001: package newprocess.diagram.navigator;
002:
003: import newprocess.ConditionProxy;
004: import newprocess.Element;
005: import newprocess.Expression;
006:
007: import newprocess.diagram.edit.parts.ActorEditPart;
008: import newprocess.diagram.edit.parts.ActorNameEditPart;
009: import newprocess.diagram.edit.parts.AndOperatorEditPart;
010: import newprocess.diagram.edit.parts.AsyncActivity2EditPart;
011: import newprocess.diagram.edit.parts.AsyncActivityActorEditPart;
012: import newprocess.diagram.edit.parts.AsyncActivityEditPart;
013: import newprocess.diagram.edit.parts.AsyncActivityName2EditPart;
014: import newprocess.diagram.edit.parts.AsyncActivityNameEditPart;
015: import newprocess.diagram.edit.parts.ConclusionConclusionProxyEditPart;
016: import newprocess.diagram.edit.parts.ConclusionEditPart;
017: import newprocess.diagram.edit.parts.ConclusionNameEditPart;
018: import newprocess.diagram.edit.parts.ConditionEditPart;
019: import newprocess.diagram.edit.parts.ConditionNameEditPart;
020: import newprocess.diagram.edit.parts.ConditionProxyEditPart;
021: import newprocess.diagram.edit.parts.ConditionProxyProxyNameEditPart;
022: import newprocess.diagram.edit.parts.ConditionTermConditionProxyEditPart;
023: import newprocess.diagram.edit.parts.ConditionTermEditPart;
024: import newprocess.diagram.edit.parts.EventEditPart;
025: import newprocess.diagram.edit.parts.EventNameEditPart;
026: import newprocess.diagram.edit.parts.ExpansionEditPart;
027: import newprocess.diagram.edit.parts.ExpansionExpansionProxyEditPart;
028: import newprocess.diagram.edit.parts.ExpansionNameEditPart;
029: import newprocess.diagram.edit.parts.Expression2EditPart;
030: import newprocess.diagram.edit.parts.Expression3EditPart;
031: import newprocess.diagram.edit.parts.Expression4EditPart;
032: import newprocess.diagram.edit.parts.Expression5EditPart;
033: import newprocess.diagram.edit.parts.Expression6EditPart;
034: import newprocess.diagram.edit.parts.Expression7EditPart;
035: import newprocess.diagram.edit.parts.Expression8EditPart;
036: import newprocess.diagram.edit.parts.ExpressionEditPart;
037: import newprocess.diagram.edit.parts.GlobalsEditPart;
038: import newprocess.diagram.edit.parts.ListenerEditPart;
039: import newprocess.diagram.edit.parts.ListenerNameEditPart;
040: import newprocess.diagram.edit.parts.LoaderEditPart;
041: import newprocess.diagram.edit.parts.LoaderNameEditPart;
042: import newprocess.diagram.edit.parts.MessageEditPart;
043: import newprocess.diagram.edit.parts.MessageNameEditPart;
044: import newprocess.diagram.edit.parts.OperatorTermSubTermEditPart;
045: import newprocess.diagram.edit.parts.OrOperatorEditPart;
046: import newprocess.diagram.edit.parts.ProcessEditPart;
047: import newprocess.diagram.edit.parts.RootEditPart;
048: import newprocess.diagram.edit.parts.RootTermEditPart;
049: import newprocess.diagram.edit.parts.SyncActivityEditPart;
050: import newprocess.diagram.edit.parts.SyncActivityNameEditPart;
051:
052: import newprocess.diagram.part.New_processDiagramEditorPlugin;
053: import newprocess.diagram.part.New_processVisualIDRegistry;
054:
055: import newprocess.diagram.providers.New_processElementTypes;
056:
057: import org.eclipse.core.runtime.IAdaptable;
058:
059: import org.eclipse.emf.ecore.EObject;
060:
061: import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
062: import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
063: import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
064:
065: import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
066:
067: import org.eclipse.gmf.runtime.emf.type.core.IElementType;
068:
069: import org.eclipse.gmf.runtime.notation.View;
070:
071: import org.eclipse.jface.resource.ImageDescriptor;
072: import org.eclipse.jface.resource.ImageRegistry;
073:
074: import org.eclipse.jface.viewers.ITreePathLabelProvider;
075: import org.eclipse.jface.viewers.LabelProvider;
076: import org.eclipse.jface.viewers.TreePath;
077: import org.eclipse.jface.viewers.ViewerLabel;
078:
079: import org.eclipse.swt.graphics.Image;
080:
081: import org.eclipse.ui.IMemento;
082:
083: import org.eclipse.ui.navigator.ICommonContentExtensionSite;
084: import org.eclipse.ui.navigator.ICommonLabelProvider;
085:
086: /**
087: * @generated
088: */
089: public class New_processNavigatorLabelProvider extends LabelProvider
090: implements ICommonLabelProvider, ITreePathLabelProvider {
091:
092: /**
093: * @generated
094: */
095: static {
096: New_processDiagramEditorPlugin.getInstance().getImageRegistry()
097: .put("Navigator?InvalidElement",
098: ImageDescriptor.getMissingImageDescriptor());
099: New_processDiagramEditorPlugin.getInstance().getImageRegistry()
100: .put("Navigator?UnknownElement",
101: ImageDescriptor.getMissingImageDescriptor());
102: New_processDiagramEditorPlugin.getInstance().getImageRegistry()
103: .put("Navigator?ImageNotFound",
104: ImageDescriptor.getMissingImageDescriptor());
105: }
106:
107: /**
108: * @generated
109: */
110: public void updateLabel(ViewerLabel label, TreePath elementPath) {
111: Object element = elementPath.getLastSegment();
112: if (element instanceof New_processNavigatorItem
113: && !isOwnView(((New_processNavigatorItem) element)
114: .getView())) {
115: return;
116: }
117: label.setText(getText(element));
118: label.setImage(getImage(element));
119: }
120:
121: /**
122: * @generated
123: */
124: public Image getImage(Object element) {
125: if (element instanceof New_processNavigatorGroup) {
126: New_processNavigatorGroup group = (New_processNavigatorGroup) element;
127: return New_processDiagramEditorPlugin.getInstance()
128: .getBundledImage(group.getIcon());
129: }
130:
131: if (element instanceof New_processNavigatorItem) {
132: New_processNavigatorItem navigatorItem = (New_processNavigatorItem) element;
133: if (!isOwnView(navigatorItem.getView())) {
134: return super .getImage(element);
135: }
136: return getImage(navigatorItem.getView());
137: }
138:
139: return super .getImage(element);
140: }
141:
142: /**
143: * @generated
144: */
145: public Image getImage(View view) {
146: switch (New_processVisualIDRegistry.getVisualID(view)) {
147: case SyncActivityEditPart.VISUAL_ID:
148: return getImage(
149: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?SyncActivity",
150: New_processElementTypes.SyncActivity_2001);
151: case ListenerEditPart.VISUAL_ID:
152: return getImage(
153: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Listener",
154: New_processElementTypes.Listener_2002);
155: case AsyncActivityEditPart.VISUAL_ID:
156: return getImage(
157: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?AsyncActivity",
158: New_processElementTypes.AsyncActivity_2003);
159: case EventEditPart.VISUAL_ID:
160: return getImage(
161: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Event",
162: New_processElementTypes.Event_2005);
163: case ConditionProxyEditPart.VISUAL_ID:
164: return getImage(
165: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?ConditionProxy",
166: New_processElementTypes.ConditionProxy_2006);
167: case ActorEditPart.VISUAL_ID:
168: return getImage(
169: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Actor",
170: New_processElementTypes.Actor_2007);
171: case MessageEditPart.VISUAL_ID:
172: return getImage(
173: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Message",
174: New_processElementTypes.Message_2008);
175: case ExpansionEditPart.VISUAL_ID:
176: return getImage(
177: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Expansion",
178: New_processElementTypes.Expansion_2009);
179: case ConclusionEditPart.VISUAL_ID:
180: return getImage(
181: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Conclusion",
182: New_processElementTypes.Conclusion_2010);
183: case GlobalsEditPart.VISUAL_ID:
184: return getImage(
185: "Navigator?TopLevelNode?http://www.wilken.de/mod/newprocess?Globals",
186: New_processElementTypes.Globals_2011);
187: case ExpressionEditPart.VISUAL_ID:
188: return getImage(
189: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
190: New_processElementTypes.Expression_3001);
191: case RootEditPart.VISUAL_ID:
192: return getImage(
193: "Navigator?Node?http://www.wilken.de/mod/newprocess?Root",
194: New_processElementTypes.Root_3002);
195: case OrOperatorEditPart.VISUAL_ID:
196: return getImage(
197: "Navigator?Node?http://www.wilken.de/mod/newprocess?OrOperator",
198: New_processElementTypes.OrOperator_3003);
199: case AndOperatorEditPart.VISUAL_ID:
200: return getImage(
201: "Navigator?Node?http://www.wilken.de/mod/newprocess?AndOperator",
202: New_processElementTypes.AndOperator_3004);
203: case ConditionTermEditPart.VISUAL_ID:
204: return getImage(
205: "Navigator?Node?http://www.wilken.de/mod/newprocess?ConditionTerm",
206: New_processElementTypes.ConditionTerm_3005);
207: case Expression2EditPart.VISUAL_ID:
208: return getImage(
209: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
210: New_processElementTypes.Expression_3006);
211: case Expression3EditPart.VISUAL_ID:
212: return getImage(
213: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
214: New_processElementTypes.Expression_3007);
215: case Expression4EditPart.VISUAL_ID:
216: return getImage(
217: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
218: New_processElementTypes.Expression_3008);
219: case Expression5EditPart.VISUAL_ID:
220: return getImage(
221: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
222: New_processElementTypes.Expression_3009);
223: case Expression6EditPart.VISUAL_ID:
224: return getImage(
225: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
226: New_processElementTypes.Expression_3010);
227: case Expression7EditPart.VISUAL_ID:
228: return getImage(
229: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
230: New_processElementTypes.Expression_3011);
231: case Expression8EditPart.VISUAL_ID:
232: return getImage(
233: "Navigator?Node?http://www.wilken.de/mod/newprocess?Expression",
234: New_processElementTypes.Expression_3012);
235: case LoaderEditPart.VISUAL_ID:
236: return getImage(
237: "Navigator?Node?http://www.wilken.de/mod/newprocess?Loader",
238: New_processElementTypes.Loader_3013);
239: case ConditionEditPart.VISUAL_ID:
240: return getImage(
241: "Navigator?Node?http://www.wilken.de/mod/newprocess?Condition",
242: New_processElementTypes.Condition_3014);
243: case ProcessEditPart.VISUAL_ID:
244: return getImage(
245: "Navigator?Diagram?http://www.wilken.de/mod/newprocess?Process",
246: New_processElementTypes.Process_1000);
247: case AsyncActivityActorEditPart.VISUAL_ID:
248: return getImage(
249: "Navigator?Link?http://www.wilken.de/mod/newprocess?AsyncActivity?actor",
250: New_processElementTypes.AsyncActivityActor_4001);
251: case RootTermEditPart.VISUAL_ID:
252: return getImage(
253: "Navigator?Link?http://www.wilken.de/mod/newprocess?Root?term",
254: New_processElementTypes.RootTerm_4002);
255: case OperatorTermSubTermEditPart.VISUAL_ID:
256: return getImage(
257: "Navigator?Link?http://www.wilken.de/mod/newprocess?OperatorTerm?subTerm",
258: New_processElementTypes.OperatorTermSubTerm_4003);
259: case ConditionTermConditionProxyEditPart.VISUAL_ID:
260: return getImage(
261: "Navigator?Link?http://www.wilken.de/mod/newprocess?ConditionTerm?conditionProxy",
262: New_processElementTypes.ConditionTermConditionProxy_4004);
263: case ConclusionConclusionProxyEditPart.VISUAL_ID:
264: return getImage(
265: "Navigator?Link?http://www.wilken.de/mod/newprocess?Conclusion?conclusionProxy",
266: New_processElementTypes.ConclusionConclusionProxy_4005);
267: case ExpansionExpansionProxyEditPart.VISUAL_ID:
268: return getImage(
269: "Navigator?Link?http://www.wilken.de/mod/newprocess?Expansion?expansionProxy",
270: New_processElementTypes.ExpansionExpansionProxy_4006);
271: default:
272: return getImage("Navigator?UnknownElement", null);
273: }
274: }
275:
276: /**
277: * @generated
278: */
279: private Image getImage(String key, IElementType elementType) {
280: ImageRegistry imageRegistry = New_processDiagramEditorPlugin
281: .getInstance().getImageRegistry();
282: Image image = imageRegistry.get(key);
283: if (image == null
284: && elementType != null
285: && New_processElementTypes
286: .isKnownElementType(elementType)) {
287: image = New_processElementTypes.getImage(elementType);
288: imageRegistry.put(key, image);
289: }
290:
291: if (image == null) {
292: image = imageRegistry.get("Navigator?ImageNotFound");
293: imageRegistry.put(key, image);
294: }
295: return image;
296: }
297:
298: /**
299: * @generated
300: */
301: public String getText(Object element) {
302: if (element instanceof New_processNavigatorGroup) {
303: New_processNavigatorGroup group = (New_processNavigatorGroup) element;
304: return group.getGroupName();
305: }
306:
307: if (element instanceof New_processNavigatorItem) {
308: New_processNavigatorItem navigatorItem = (New_processNavigatorItem) element;
309: if (!isOwnView(navigatorItem.getView())) {
310: return null;
311: }
312: return getText(navigatorItem.getView());
313: }
314:
315: return super .getText(element);
316: }
317:
318: /**
319: * @generated
320: */
321: public String getText(View view) {
322: switch (New_processVisualIDRegistry.getVisualID(view)) {
323: case SyncActivityEditPart.VISUAL_ID:
324: return getSyncActivity_2001Text(view);
325: case ListenerEditPart.VISUAL_ID:
326: return getListener_2002Text(view);
327: case AsyncActivityEditPart.VISUAL_ID:
328: return getAsyncActivity_2003Text(view);
329: case EventEditPart.VISUAL_ID:
330: return getEvent_2005Text(view);
331: case ConditionProxyEditPart.VISUAL_ID:
332: return getConditionProxy_2006Text(view);
333: case ActorEditPart.VISUAL_ID:
334: return getActor_2007Text(view);
335: case MessageEditPart.VISUAL_ID:
336: return getMessage_2008Text(view);
337: case ExpansionEditPart.VISUAL_ID:
338: return getExpansion_2009Text(view);
339: case ConclusionEditPart.VISUAL_ID:
340: return getConclusion_2010Text(view);
341: case GlobalsEditPart.VISUAL_ID:
342: return getGlobals_2011Text(view);
343: case ExpressionEditPart.VISUAL_ID:
344: return getExpression_3001Text(view);
345: case RootEditPart.VISUAL_ID:
346: return getRoot_3002Text(view);
347: case OrOperatorEditPart.VISUAL_ID:
348: return getOrOperator_3003Text(view);
349: case AndOperatorEditPart.VISUAL_ID:
350: return getAndOperator_3004Text(view);
351: case ConditionTermEditPart.VISUAL_ID:
352: return getConditionTerm_3005Text(view);
353: case Expression2EditPart.VISUAL_ID:
354: return getExpression_3006Text(view);
355: case Expression3EditPart.VISUAL_ID:
356: return getExpression_3007Text(view);
357: case Expression4EditPart.VISUAL_ID:
358: return getExpression_3008Text(view);
359: case Expression5EditPart.VISUAL_ID:
360: return getExpression_3009Text(view);
361: case Expression6EditPart.VISUAL_ID:
362: return getExpression_3010Text(view);
363: case Expression7EditPart.VISUAL_ID:
364: return getExpression_3011Text(view);
365: case Expression8EditPart.VISUAL_ID:
366: return getExpression_3012Text(view);
367: case LoaderEditPart.VISUAL_ID:
368: return getLoader_3013Text(view);
369: case ConditionEditPart.VISUAL_ID:
370: return getCondition_3014Text(view);
371: case ProcessEditPart.VISUAL_ID:
372: return getProcess_1000Text(view);
373: case AsyncActivityActorEditPart.VISUAL_ID:
374: return getAsyncActivityActor_4001Text(view);
375: case RootTermEditPart.VISUAL_ID:
376: return getRootTerm_4002Text(view);
377: case OperatorTermSubTermEditPart.VISUAL_ID:
378: return getOperatorTermSubTerm_4003Text(view);
379: case ConditionTermConditionProxyEditPart.VISUAL_ID:
380: return getConditionTermConditionProxy_4004Text(view);
381: case ConclusionConclusionProxyEditPart.VISUAL_ID:
382: return getConclusionConclusionProxy_4005Text(view);
383: case ExpansionExpansionProxyEditPart.VISUAL_ID:
384: return getExpansionExpansionProxy_4006Text(view);
385: default:
386: return getUnknownElementText(view);
387: }
388: }
389:
390: /**
391: * @generated
392: */
393: private String getSyncActivity_2001Text(View view) {
394: IParser parser = ParserService.getInstance().getParser(
395: new IAdaptable() {
396: public Object getAdapter(Class adapter) {
397: if (String.class.equals(adapter)) {
398: return New_processVisualIDRegistry
399: .getType(SyncActivityNameEditPart.VISUAL_ID);
400: }
401: if (IElementType.class.equals(adapter)) {
402: return New_processElementTypes.SyncActivity_2001;
403: }
404: return null;
405: }
406: });
407: if (parser != null) {
408: return parser.getPrintString(new EObjectAdapter(view
409: .getElement() != null ? view.getElement() : view),
410: ParserOptions.NONE.intValue());
411: } else {
412: New_processDiagramEditorPlugin.getInstance().logError(
413: "Parser was not found for label " + 5001);
414: return "";
415: }
416: }
417:
418: /**
419: * @generated
420: */
421: private String getListener_2002Text(View view) {
422: IParser parser = ParserService.getInstance().getParser(
423: new IAdaptable() {
424: public Object getAdapter(Class adapter) {
425: if (String.class.equals(adapter)) {
426: return New_processVisualIDRegistry
427: .getType(ListenerNameEditPart.VISUAL_ID);
428: }
429: if (IElementType.class.equals(adapter)) {
430: return New_processElementTypes.Listener_2002;
431: }
432: return null;
433: }
434: });
435: if (parser != null) {
436: return parser.getPrintString(new EObjectAdapter(view
437: .getElement() != null ? view.getElement() : view),
438: ParserOptions.NONE.intValue());
439: } else {
440: New_processDiagramEditorPlugin.getInstance().logError(
441: "Parser was not found for label " + 5002);
442: return "";
443: }
444: }
445:
446: /**
447: * @generated
448: */
449: private String getAsyncActivity_2003Text(View view) {
450: IParser parser = ParserService.getInstance().getParser(
451: new IAdaptable() {
452: public Object getAdapter(Class adapter) {
453: if (String.class.equals(adapter)) {
454: return New_processVisualIDRegistry
455: .getType(AsyncActivityNameEditPart.VISUAL_ID);
456: }
457: if (IElementType.class.equals(adapter)) {
458: return New_processElementTypes.AsyncActivity_2003;
459: }
460: return null;
461: }
462: });
463: if (parser != null) {
464: return parser.getPrintString(new EObjectAdapter(view
465: .getElement() != null ? view.getElement() : view),
466: ParserOptions.NONE.intValue());
467: } else {
468: New_processDiagramEditorPlugin.getInstance().logError(
469: "Parser was not found for label " + 5003);
470: return "";
471: }
472: }
473:
474: /**
475: * @generated
476: */
477: private String getEvent_2005Text(View view) {
478: IParser parser = ParserService.getInstance().getParser(
479: new IAdaptable() {
480: public Object getAdapter(Class adapter) {
481: if (String.class.equals(adapter)) {
482: return New_processVisualIDRegistry
483: .getType(EventNameEditPart.VISUAL_ID);
484: }
485: if (IElementType.class.equals(adapter)) {
486: return New_processElementTypes.Event_2005;
487: }
488: return null;
489: }
490: });
491: if (parser != null) {
492: return parser.getPrintString(new EObjectAdapter(view
493: .getElement() != null ? view.getElement() : view),
494: ParserOptions.NONE.intValue());
495: } else {
496: New_processDiagramEditorPlugin.getInstance().logError(
497: "Parser was not found for label " + 5005);
498: return "";
499: }
500: }
501:
502: /**
503: * @generated
504: */
505: private String getConditionProxy_2006Text(View view) {
506: IParser parser = ParserService.getInstance().getParser(
507: new IAdaptable() {
508: public Object getAdapter(Class adapter) {
509: if (String.class.equals(adapter)) {
510: return New_processVisualIDRegistry
511: .getType(ConditionProxyProxyNameEditPart.VISUAL_ID);
512: }
513: if (IElementType.class.equals(adapter)) {
514: return New_processElementTypes.ConditionProxy_2006;
515: }
516: return null;
517: }
518: });
519: if (parser != null) {
520: return parser.getPrintString(new EObjectAdapter(view
521: .getElement() != null ? view.getElement() : view),
522: ParserOptions.NONE.intValue());
523: } else {
524: New_processDiagramEditorPlugin.getInstance().logError(
525: "Parser was not found for label " + 5012);
526: return "";
527: }
528: }
529:
530: /**
531: * @generated
532: */
533: private String getActor_2007Text(View view) {
534: IParser parser = ParserService.getInstance().getParser(
535: new IAdaptable() {
536: public Object getAdapter(Class adapter) {
537: if (String.class.equals(adapter)) {
538: return New_processVisualIDRegistry
539: .getType(ActorNameEditPart.VISUAL_ID);
540: }
541: if (IElementType.class.equals(adapter)) {
542: return New_processElementTypes.Actor_2007;
543: }
544: return null;
545: }
546: });
547: if (parser != null) {
548: return parser.getPrintString(new EObjectAdapter(view
549: .getElement() != null ? view.getElement() : view),
550: ParserOptions.NONE.intValue());
551: } else {
552: New_processDiagramEditorPlugin.getInstance().logError(
553: "Parser was not found for label " + 5006);
554: return "";
555: }
556: }
557:
558: /**
559: * @generated
560: */
561: private String getMessage_2008Text(View view) {
562: IParser parser = ParserService.getInstance().getParser(
563: new IAdaptable() {
564: public Object getAdapter(Class adapter) {
565: if (String.class.equals(adapter)) {
566: return New_processVisualIDRegistry
567: .getType(MessageNameEditPart.VISUAL_ID);
568: }
569: if (IElementType.class.equals(adapter)) {
570: return New_processElementTypes.Message_2008;
571: }
572: return null;
573: }
574: });
575: if (parser != null) {
576: return parser.getPrintString(new EObjectAdapter(view
577: .getElement() != null ? view.getElement() : view),
578: ParserOptions.NONE.intValue());
579: } else {
580: New_processDiagramEditorPlugin.getInstance().logError(
581: "Parser was not found for label " + 5007);
582: return "";
583: }
584: }
585:
586: /**
587: * @generated
588: */
589: private String getExpansion_2009Text(View view) {
590: IParser parser = ParserService.getInstance().getParser(
591: new IAdaptable() {
592: public Object getAdapter(Class adapter) {
593: if (String.class.equals(adapter)) {
594: return New_processVisualIDRegistry
595: .getType(ExpansionNameEditPart.VISUAL_ID);
596: }
597: if (IElementType.class.equals(adapter)) {
598: return New_processElementTypes.Expansion_2009;
599: }
600: return null;
601: }
602: });
603: if (parser != null) {
604: return parser.getPrintString(new EObjectAdapter(view
605: .getElement() != null ? view.getElement() : view),
606: ParserOptions.NONE.intValue());
607: } else {
608: New_processDiagramEditorPlugin.getInstance().logError(
609: "Parser was not found for label " + 5008);
610: return "";
611: }
612: }
613:
614: /**
615: * @generated
616: */
617: private String getConclusion_2010Text(View view) {
618: IParser parser = ParserService.getInstance().getParser(
619: new IAdaptable() {
620: public Object getAdapter(Class adapter) {
621: if (String.class.equals(adapter)) {
622: return New_processVisualIDRegistry
623: .getType(ConclusionNameEditPart.VISUAL_ID);
624: }
625: if (IElementType.class.equals(adapter)) {
626: return New_processElementTypes.Conclusion_2010;
627: }
628: return null;
629: }
630: });
631: if (parser != null) {
632: return parser.getPrintString(new EObjectAdapter(view
633: .getElement() != null ? view.getElement() : view),
634: ParserOptions.NONE.intValue());
635: } else {
636: New_processDiagramEditorPlugin.getInstance().logError(
637: "Parser was not found for label " + 5009);
638: return "";
639: }
640: }
641:
642: /**
643: * @generated
644: */
645: private String getGlobals_2011Text(View view) {
646: return "";
647: }
648:
649: /**
650: * @generated
651: */
652: private String getExpression_3001Text(View view) {
653: EObject domainModelElement = view.getElement();
654: if (domainModelElement != null) {
655: return ((Expression) domainModelElement).getExpression();
656: } else {
657: New_processDiagramEditorPlugin
658: .getInstance()
659: .logError(
660: "No domain element for view with visualID = " + 3001);
661: return "";
662: }
663: }
664:
665: /**
666: * @generated
667: */
668: private String getRoot_3002Text(View view) {
669: return "";
670: }
671:
672: /**
673: * @generated
674: */
675: private String getOrOperator_3003Text(View view) {
676: return "";
677: }
678:
679: /**
680: * @generated
681: */
682: private String getAndOperator_3004Text(View view) {
683: return "";
684: }
685:
686: /**
687: * @generated
688: */
689: private String getConditionTerm_3005Text(View view) {
690: return "";
691: }
692:
693: /**
694: * @generated
695: */
696: private String getExpression_3006Text(View view) {
697: EObject domainModelElement = view.getElement();
698: if (domainModelElement != null) {
699: return ((Expression) domainModelElement).getExpression();
700: } else {
701: New_processDiagramEditorPlugin
702: .getInstance()
703: .logError(
704: "No domain element for view with visualID = " + 3006);
705: return "";
706: }
707: }
708:
709: /**
710: * @generated
711: */
712: private String getExpression_3007Text(View view) {
713: EObject domainModelElement = view.getElement();
714: if (domainModelElement != null) {
715: return ((Expression) domainModelElement).getExpression();
716: } else {
717: New_processDiagramEditorPlugin
718: .getInstance()
719: .logError(
720: "No domain element for view with visualID = " + 3007);
721: return "";
722: }
723: }
724:
725: /**
726: * @generated
727: */
728: private String getExpression_3008Text(View view) {
729: EObject domainModelElement = view.getElement();
730: if (domainModelElement != null) {
731: return ((Expression) domainModelElement).getExpression();
732: } else {
733: New_processDiagramEditorPlugin
734: .getInstance()
735: .logError(
736: "No domain element for view with visualID = " + 3008);
737: return "";
738: }
739: }
740:
741: /**
742: * @generated
743: */
744: private String getExpression_3009Text(View view) {
745: EObject domainModelElement = view.getElement();
746: if (domainModelElement != null) {
747: return ((Expression) domainModelElement).getExpression();
748: } else {
749: New_processDiagramEditorPlugin
750: .getInstance()
751: .logError(
752: "No domain element for view with visualID = " + 3009);
753: return "";
754: }
755: }
756:
757: /**
758: * @generated
759: */
760: private String getExpression_3010Text(View view) {
761: EObject domainModelElement = view.getElement();
762: if (domainModelElement != null) {
763: return ((Expression) domainModelElement).getExpression();
764: } else {
765: New_processDiagramEditorPlugin
766: .getInstance()
767: .logError(
768: "No domain element for view with visualID = " + 3010);
769: return "";
770: }
771: }
772:
773: /**
774: * @generated
775: */
776: private String getExpression_3011Text(View view) {
777: EObject domainModelElement = view.getElement();
778: if (domainModelElement != null) {
779: return ((Expression) domainModelElement).getExpression();
780: } else {
781: New_processDiagramEditorPlugin
782: .getInstance()
783: .logError(
784: "No domain element for view with visualID = " + 3011);
785: return "";
786: }
787: }
788:
789: /**
790: * @generated
791: */
792: private String getExpression_3012Text(View view) {
793: EObject domainModelElement = view.getElement();
794: if (domainModelElement != null) {
795: return ((Expression) domainModelElement).getExpression();
796: } else {
797: New_processDiagramEditorPlugin
798: .getInstance()
799: .logError(
800: "No domain element for view with visualID = " + 3012);
801: return "";
802: }
803: }
804:
805: /**
806: * @generated
807: */
808: private String getLoader_3013Text(View view) {
809: IParser parser = ParserService.getInstance().getParser(
810: new IAdaptable() {
811: public Object getAdapter(Class adapter) {
812: if (String.class.equals(adapter)) {
813: return New_processVisualIDRegistry
814: .getType(LoaderNameEditPart.VISUAL_ID);
815: }
816: if (IElementType.class.equals(adapter)) {
817: return New_processElementTypes.Loader_3013;
818: }
819: return null;
820: }
821: });
822: if (parser != null) {
823: return parser.getPrintString(new EObjectAdapter(view
824: .getElement() != null ? view.getElement() : view),
825: ParserOptions.NONE.intValue());
826: } else {
827: New_processDiagramEditorPlugin.getInstance().logError(
828: "Parser was not found for label " + 5010);
829: return "";
830: }
831: }
832:
833: /**
834: * @generated
835: */
836: private String getCondition_3014Text(View view) {
837: IParser parser = ParserService.getInstance().getParser(
838: new IAdaptable() {
839: public Object getAdapter(Class adapter) {
840: if (String.class.equals(adapter)) {
841: return New_processVisualIDRegistry
842: .getType(ConditionNameEditPart.VISUAL_ID);
843: }
844: if (IElementType.class.equals(adapter)) {
845: return New_processElementTypes.Condition_3014;
846: }
847: return null;
848: }
849: });
850: if (parser != null) {
851: return parser.getPrintString(new EObjectAdapter(view
852: .getElement() != null ? view.getElement() : view),
853: ParserOptions.NONE.intValue());
854: } else {
855: New_processDiagramEditorPlugin.getInstance().logError(
856: "Parser was not found for label " + 5011);
857: return "";
858: }
859: }
860:
861: /**
862: * @generated
863: */
864: private String getProcess_1000Text(View view) {
865: EObject domainModelElement = view.getElement();
866: if (domainModelElement != null) {
867: return ((Element) domainModelElement).getName();
868: } else {
869: New_processDiagramEditorPlugin
870: .getInstance()
871: .logError(
872: "No domain element for view with visualID = " + 1000);
873: return "";
874: }
875: }
876:
877: /**
878: * @generated
879: */
880: private String getAsyncActivityActor_4001Text(View view) {
881: return "";
882: }
883:
884: /**
885: * @generated
886: */
887: private String getRootTerm_4002Text(View view) {
888: return "";
889: }
890:
891: /**
892: * @generated
893: */
894: private String getOperatorTermSubTerm_4003Text(View view) {
895: return "";
896: }
897:
898: /**
899: * @generated
900: */
901: private String getConditionTermConditionProxy_4004Text(View view) {
902: return "";
903: }
904:
905: /**
906: * @generated
907: */
908: private String getConclusionConclusionProxy_4005Text(View view) {
909: return "";
910: }
911:
912: /**
913: * @generated
914: */
915: private String getExpansionExpansionProxy_4006Text(View view) {
916: return "";
917: }
918:
919: /**
920: * @generated
921: */
922: private String getUnknownElementText(View view) {
923: return "<UnknownElement Visual_ID = " + view.getType() + ">";
924: }
925:
926: /**
927: * @generated
928: */
929: public void init(ICommonContentExtensionSite aConfig) {
930: }
931:
932: /**
933: * @generated
934: */
935: public void restoreState(IMemento aMemento) {
936: }
937:
938: /**
939: * @generated
940: */
941: public void saveState(IMemento aMemento) {
942: }
943:
944: /**
945: * @generated
946: */
947: public String getDescription(Object anElement) {
948: return null;
949: }
950:
951: /**
952: * @generated
953: */
954: private boolean isOwnView(View view) {
955: return ProcessEditPart.MODEL_ID
956: .equals(New_processVisualIDRegistry.getModelID(view));
957: }
958:
959: }
|