-
Notifications
You must be signed in to change notification settings - Fork 85
/
Editor.java
2958 lines (2930 loc) · 184 KB
/
Editor.java
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
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//Generated with EGF 1.6.4.202309111303
package org.polarsys.capella.core.editor;
import org.polarsys.kitalpha.emde.egf.utils.*;
import org.polarsys.kitalpha.emde.egf.helper.*;
import org.eclipse.egf.emf.pattern.base.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
import org.eclipse.emf.codegen.ecore.genmodel.impl.*;
import org.eclipse.emf.codegen.ecore.genmodel.generator.*;
import org.eclipse.emf.codegen.util.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.egf.common.helper.*;
import java.util.*;
import org.eclipse.emf.ecore.*;
import org.eclipse.egf.model.pattern.*;
import org.eclipse.egf.pattern.execution.*;
import org.eclipse.egf.pattern.query.*;
public class Editor extends org.polarsys.kitalpha.emde.egf.editor.Editor {
protected static String nl;
public static synchronized Editor create(String lineSeparator) {
nl = lineSeparator;
Editor result = new Editor();
nl = null;
return result;
}
public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + "package ";
protected final String TEXT_3 = ";" + NL + "" + NL + "" + NL + "import java.io.IOException;" + NL
+ "import java.io.InputStream;" + NL + "" + NL + "import java.util.ArrayList;" + NL
+ "import java.util.Collection;" + NL + "import java.util.Collections;" + NL + "import java.util.EventObject;"
+ NL + "import java.util.HashMap;" + NL + "import java.util.Iterator;" + NL + "import java.util.LinkedHashMap;"
+ NL + "import java.util.List;" + NL + "import java.util.Map;";
protected final String TEXT_4 = NL + NL + "import org.eclipse.core.resources.IFile;" + NL
+ "import org.eclipse.core.resources.IMarker;" + NL + "import org.eclipse.core.resources.IResource;" + NL
+ "import org.eclipse.core.resources.IResourceChangeEvent;" + NL
+ "import org.eclipse.core.resources.IResourceChangeListener;" + NL
+ "import org.eclipse.core.resources.IResourceDelta;" + NL
+ "import org.eclipse.core.resources.IResourceDeltaVisitor;" + NL
+ "import org.eclipse.core.resources.ResourcesPlugin;";
protected final String TEXT_5 = NL;
protected final String TEXT_6 = NL + "import org.eclipse.core.runtime.CoreException;" + NL
+ "import org.eclipse.core.runtime.IPath;";
protected final String TEXT_7 = NL + "import org.eclipse.core.runtime.IProgressMonitor;" + NL
+ "import org.eclipse.core.runtime.NullProgressMonitor;" + NL + "" + NL
+ "import org.eclipse.jface.action.IMenuListener;" + NL + "import org.eclipse.jface.action.IMenuManager;" + NL
+ "import org.eclipse.jface.action.IStatusLineManager;" + NL + "import org.eclipse.jface.action.IToolBarManager;"
+ NL + "import org.eclipse.jface.action.MenuManager;" + NL + "import org.eclipse.jface.action.Separator;" + NL
+ "" + NL + "import org.eclipse.jface.dialogs.MessageDialog;" + NL
+ "import org.eclipse.jface.dialogs.ProgressMonitorDialog;" + NL;
protected final String TEXT_8 = NL + "import org.eclipse.jface.util.LocalSelectionTransfer;" + NL;
protected final String TEXT_9 = NL + "import org.eclipse.jface.viewers.ColumnWeightData;";
protected final String TEXT_10 = NL + "import org.eclipse.jface.viewers.ISelection;" + NL
+ "import org.eclipse.jface.viewers.ISelectionChangedListener;" + NL
+ "import org.eclipse.jface.viewers.ISelectionProvider;" + NL
+ "import org.eclipse.jface.viewers.IStructuredSelection;";
protected final String TEXT_11 = NL + "import org.eclipse.jface.viewers.ListViewer;";
protected final String TEXT_12 = NL + "import org.eclipse.jface.viewers.SelectionChangedEvent;" + NL
+ "import org.eclipse.jface.viewers.StructuredSelection;" + NL
+ "import org.eclipse.jface.viewers.StructuredViewer;";
protected final String TEXT_13 = NL + "import org.eclipse.jface.viewers.TableLayout;" + NL
+ "import org.eclipse.jface.viewers.TableViewer;";
protected final String TEXT_14 = NL + "import org.eclipse.jface.viewers.TreeViewer;" + NL
+ "import org.eclipse.jface.viewers.Viewer;" + NL + "" + NL + "import org.eclipse.swt.SWT;" + NL + "" + NL
+ "import org.eclipse.swt.custom.CTabFolder;" + NL + "" + NL + "import org.eclipse.swt.dnd.DND;";
protected final String TEXT_15 = NL + "import org.eclipse.swt.dnd.FileTransfer;";
protected final String TEXT_16 = NL + "import org.eclipse.swt.dnd.Transfer;" + NL + "" + NL
+ "import org.eclipse.swt.events.ControlAdapter;" + NL + "import org.eclipse.swt.events.ControlEvent;" + NL + ""
+ NL + "import org.eclipse.swt.graphics.Point;" + NL + "import org.eclipse.swt.graphics.Rectangle;";
protected final String TEXT_17 = NL + NL + "import org.eclipse.swt.layout.FillLayout;";
protected final String TEXT_18 = NL + NL + "import org.eclipse.swt.widgets.Composite;" + NL
+ "import org.eclipse.swt.widgets.Menu;";
protected final String TEXT_19 = NL + "import org.eclipse.swt.widgets.Table;" + NL
+ "import org.eclipse.swt.widgets.TableColumn;";
protected final String TEXT_20 = NL + "import org.eclipse.swt.widgets.Tree;";
protected final String TEXT_21 = NL + "import org.eclipse.swt.widgets.TreeColumn;";
protected final String TEXT_22 = NL + NL + "import org.eclipse.ui.IActionBars;" + NL
+ "import org.eclipse.ui.IEditorInput;" + NL + "import org.eclipse.ui.IEditorPart;" + NL
+ "import org.eclipse.ui.IEditorSite;";
protected final String TEXT_23 = NL + "import org.eclipse.ui.IFileEditorInput;";
protected final String TEXT_24 = NL + "import org.eclipse.ui.IPartListener;" + NL
+ "import org.eclipse.ui.IWorkbenchPart;" + NL + "import org.eclipse.ui.PartInitException;";
protected final String TEXT_25 = NL + NL + "import org.eclipse.ui.dialogs.SaveAsDialog;" + NL + "" + NL
+ "import org.eclipse.ui.ide.IGotoMarker;";
protected final String TEXT_26 = NL + "import org.eclipse.ui.part.FileEditorInput;";
protected final String TEXT_27 = NL + "import org.eclipse.ui.part.MultiPageEditorPart;" + NL + "" + NL
+ "import org.eclipse.ui.views.contentoutline.ContentOutline;" + NL
+ "import org.eclipse.ui.views.contentoutline.ContentOutlinePage;" + NL
+ "import org.eclipse.ui.views.contentoutline.IContentOutlinePage;" + NL + "" + NL
+ "import org.eclipse.ui.views.properties.IPropertySheetPage;" + NL
+ "import org.eclipse.ui.views.properties.PropertySheet;" + NL
+ "import org.eclipse.ui.views.properties.PropertySheetPage;" + NL + "// begin-capella-code" + NL
+ "import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;" + NL
+ "import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;" + NL + "// end-capella-code" + NL + ""
+ NL + "import org.eclipse.emf.common.command.BasicCommandStack;" + NL
+ "import org.eclipse.emf.common.command.Command;" + NL + "import org.eclipse.emf.common.command.CommandStack;"
+ NL + "import org.eclipse.emf.common.command.CommandStackListener;" + NL + "" + NL
+ "import org.eclipse.emf.common.notify.AdapterFactory;" + NL
+ "import org.eclipse.emf.common.notify.Notification;" + NL;
protected final String TEXT_28 = NL + "import org.eclipse.emf.common.ui.MarkerHelper;";
protected final String TEXT_29 = NL + "import org.eclipse.emf.common.ui.ViewerPane;";
protected final String TEXT_30 = NL + NL + "import org.eclipse.emf.common.ui.editor.ProblemEditorPart;" + NL + "" + NL
+ "import org.eclipse.emf.common.ui.viewer.IViewerProvider;" + NL + "" + NL
+ "import org.eclipse.emf.common.util.BasicDiagnostic;" + NL + "import org.eclipse.emf.common.util.Diagnostic;"
+ NL + "import org.eclipse.emf.common.util.URI;" + NL;
protected final String TEXT_31 = NL + "import org.eclipse.emf.ecore.EObject;" + NL
+ "import org.eclipse.emf.ecore.EValidator;";
protected final String TEXT_32 = NL + NL + "import org.eclipse.emf.ecore.resource.Resource;" + NL
+ "import org.eclipse.emf.ecore.resource.ResourceSet;" + NL + "" + NL
+ "import org.eclipse.emf.ecore.util.EContentAdapter;" + NL + "import org.eclipse.emf.ecore.util.EcoreUtil;" + NL
+ "" + NL + "import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;" + NL
+ "import org.eclipse.emf.edit.domain.EditingDomain;" + NL
+ "import org.eclipse.emf.edit.domain.IEditingDomainProvider;" + NL + "" + NL
+ "import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;" + NL
+ "import org.eclipse.emf.edit.provider.ComposedAdapterFactory;" + NL
+ "import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;" + NL + "" + NL
+ "import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;" + NL + "" + NL
+ "import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;" + NL + "" + NL
+ "import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;" + NL + "" + NL
+ "import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;" + NL
+ "import org.eclipse.emf.edit.ui.dnd.LocalTransfer;" + NL
+ "import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;" + NL + "" + NL
+ "import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;" + NL
+ "import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;";
protected final String TEXT_33 = NL + "import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;";
protected final String TEXT_34 = NL + NL + "import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;";
protected final String TEXT_35 = NL + "import org.eclipse.emf.edit.ui.util.EditUIUtil;";
protected final String TEXT_36 = NL + NL + "import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;" + NL + ""
+ NL + "import ";
protected final String TEXT_37 = ";" + NL;
protected final String TEXT_38 = NL + NL + NL + "/**" + NL + " * This is an example of a ";
protected final String TEXT_39 = " model editor." + NL + " * <!-- begin-user-doc -->";
protected final String TEXT_40 = NL + " * @implements ModelExtensionListener";
protected final String TEXT_41 = " " + NL + " * <!-- end-user-doc -->";
protected final String TEXT_42 = NL + " * ";
protected final String TEXT_43 = NL + " *" + NL + " * <!-- begin-capella-code -->" + NL
+ " * @implements ITabbedPropertySheetPageContributor" + NL + " * <!-- end-capella-code -->" + NL + " *" + NL
+ " * @generated" + NL + " */";
protected final String TEXT_44 = NL + "@Deprecated";
protected final String TEXT_45 = NL + "public class ";
protected final String TEXT_46 = NL + "\textends MultiPageEditorPart" + NL
+ "\timplements ITabbedPropertySheetPageContributor, IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider";
protected final String TEXT_47 = ", IGotoMarker";
protected final String TEXT_48 = ", ";
protected final String TEXT_49 = NL + "{";
protected final String TEXT_50 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final ";
protected final String TEXT_51 = " copyright = ";
protected final String TEXT_52 = ";";
protected final String TEXT_53 = NL + "\t/**" + NL + "\t * The filters for file extensions supported by the editor."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_54 = NL + "\tpublic static final ";
protected final String TEXT_55 = " FILE_EXTENSION_FILTERS = prefixExtensions(";
protected final String TEXT_56 = ".FILE_EXTENSIONS, \"*.\");";
protected final String TEXT_57 = NL + "\t";
protected final String TEXT_58 = ".asList(";
protected final String TEXT_59 = ".INSTANCE.getString(\"_UI_";
protected final String TEXT_60 = "FilenameExtensions\").split(\"\\\\s*,\\\\s*\")), \"*.\");";
protected final String TEXT_61 = NL + "\t/**" + NL
+ "\t * Returns a new unmodifiable list containing prefixed versions of the extensions in the given list." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprivate static ";
protected final String TEXT_62 = " prefixExtensions(";
protected final String TEXT_63 = " extensions, String prefix)" + NL + "\t{" + NL + "\t\t";
protected final String TEXT_64 = " result = new ";
protected final String TEXT_65 = "();";
protected final String TEXT_66 = NL + "\t\tfor (String extension : extensions)" + NL + "\t\t{" + NL
+ "\t\t\tresult.add(prefix + extension);";
protected final String TEXT_67 = NL + "\t\tfor (Iterator iterator = extensions.iterator() ; iterator.hasNext(); )"
+ NL + "\t\t{" + NL + "\t\t\tresult.add(prefix + (String)iterator.next());";
protected final String TEXT_68 = NL + "\t\t}" + NL + "\t\treturn Collections.unmodifiableList(result);" + NL + "\t}"
+ NL;
protected final String TEXT_69 = NL + "\t/**" + NL
+ "\t * This keeps track of the editing domain that is used to track all changes to the model." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected AdapterFactoryEditingDomain editingDomain;" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the one adapter factory used for providing views of the model." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ComposedAdapterFactory adapterFactory;" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the content outline page." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected IContentOutlinePage contentOutlinePage;" + NL + "" + NL + "\t/**" + NL + "\t * This is a kludge..."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tprotected IStatusLineManager contentOutlineStatusLineManager;" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the content outline page's viewer." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected TreeViewer contentOutlineViewer;" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the property sheet page." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
protected final String TEXT_70 = " propertySheetPages = new ";
protected final String TEXT_71 = "();" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the viewer that shadows the selection in the content outline." + NL
+ "\t * The parent relation must be correctly defined for this to work." + NL + "\t * <!-- begin-user-doc -->"
+ NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected TreeViewer selectionViewer;";
protected final String TEXT_72 = NL + NL + "\t/**" + NL
+ "\t * This inverts the roll of parent and child in the content provider and show parents as a tree." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected TreeViewer parentViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a tree view works."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tprotected TreeViewer treeViewer;" + NL + "" + NL + "\t/**" + NL
+ "\t * This shows how a list view works." + NL + "\t * A list viewer doesn't support icons." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ListViewer listViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a table view works."
+ NL + "\t * A table can be used as a list with icons." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected TableViewer tableViewer;" + NL + "" + NL + "\t/**" + NL
+ "\t * This shows how a tree view with columns works." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected TreeViewer treeViewerWithColumns;" + NL + "" + NL + "\t/**" + NL
+ "\t * This keeps track of the active viewer pane, in the book." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ViewerPane currentViewerPane;";
protected final String TEXT_73 = NL + NL + "\t/**" + NL
+ "\t * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tprotected Viewer currentViewer;" + NL + "\t" + NL + "\t/**" + NL
+ "\t * Viewers collection of this editor" + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected Collection<Viewer> viewers = new ArrayList<Viewer>();";
protected final String TEXT_74 = NL + NL + "\t/**" + NL
+ "\t * This Map contain {@link org.polarsys.kitalpha.emde.ui.actions.EmdeViewerFilterAction} all the applicable"
+ NL + "\t * {@link org.polarsys.kitalpha.emde.ui.actions.EmdeViewerFilterAction} per loaded Resource." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ";
protected final String TEXT_75 = "<";
protected final String TEXT_76 = ">> viewerFilterActions = new ";
protected final String TEXT_77 = "<Resource, Collection<EmdeViewerFilterAction>>();";
protected final String TEXT_78 = "\t" + NL + "" + NL + "\t/**" + NL
+ "\t * This listens to which ever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ISelectionChangedListener selectionChangedListener;" + NL + "" + NL + "\t/**" + NL
+ "\t * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tprotected ";
protected final String TEXT_79 = " selectionChangedListeners = new ";
protected final String TEXT_80 = "();" + NL + "" + NL + "\t/**" + NL
+ "\t * This keeps track of the selection of the editor as a whole." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ISelection editorSelection = StructuredSelection.EMPTY;" + NL;
protected final String TEXT_81 = NL + "\t/**" + NL
+ "\t * The MarkerHelper is responsible for creating workspace resource markers presented" + NL
+ "\t * in Eclipse's Problems View." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->"
+ NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MarkerHelper markerHelper = new EditUIMarkerHelper();"
+ NL;
protected final String TEXT_82 = NL + "\t/**" + NL + "\t * This listens for when the outline becomes active" + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected IPartListener partListener =" + NL + "\t\tnew IPartListener()" + NL + "\t\t{";
protected final String TEXT_83 = NL + "\t\t\t@Override";
protected final String TEXT_84 = NL + "\t\t\tpublic void partActivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tif (p instanceof ContentOutline)" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tif (((ContentOutline)p).getCurrentPage() == contentOutlinePage)" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
protected final String TEXT_85 = ".this);" + NL + "" + NL + "\t\t\t\t\t\tsetCurrentViewer(contentOutlineViewer);" + NL
+ "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse if (p instanceof PropertySheet)" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tif (propertySheetPages.contains(((PropertySheet)p).getCurrentPage()))" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
protected final String TEXT_86 = ".this);" + NL + "\t\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t\t}" + NL
+ "\t\t\t\t}" + NL + "\t\t\t\telse if (p == ";
protected final String TEXT_87 = ".this)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t}"
+ NL + "\t\t\t}";
protected final String TEXT_88 = NL + "\t\t\tpublic void partBroughtToTop(IWorkbenchPart p)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t// Ignore." + NL + "\t\t\t}";
protected final String TEXT_89 = NL + "\t\t\tpublic void partClosed(IWorkbenchPart p)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t// Ignore." + NL + "\t\t\t}";
protected final String TEXT_90 = NL + "\t\t\tpublic void partDeactivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t// Ignore." + NL + "\t\t\t}";
protected final String TEXT_91 = NL + "\t\t\tpublic void partOpened(IWorkbenchPart p)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t};" + NL + "" + NL + "\t/**" + NL
+ "\t * Resources that have been removed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
protected final String TEXT_92 = " removedResources = new ";
protected final String TEXT_93 = "();" + NL + "" + NL + "\t/**" + NL
+ "\t * Resources that have been changed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
protected final String TEXT_94 = " changedResources = new ";
protected final String TEXT_95 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been saved." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected ";
protected final String TEXT_96 = " savedResources = new ";
protected final String TEXT_97 = "();" + NL + "" + NL + "\t/**" + NL
+ "\t * Map to store the diagnostic associated with a resource." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
protected final String TEXT_98 = " resourceToDiagnosticMap = new ";
protected final String TEXT_99 = "();" + NL + "" + NL + "\t/**" + NL
+ "\t * Controls whether the problem indication should be updated." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected boolean updateProblemIndication = true;" + NL + "" + NL + "\t/**" + NL
+ "\t * Adapter used to update the problem indication when resources are demanded loaded." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected EContentAdapter problemIndicationAdapter =" + NL + "\t\tnew EContentAdapter()" + NL + "\t\t{" + NL
+ "\t\t\tprotected boolean dispatching;" + NL;
protected final String TEXT_100 = NL + "\t\t\tpublic void notifyChanged(final Notification notification)" + NL
+ "\t\t\t{" + NL + "\t\t\t\tif (notification.getNotifier() instanceof Resource)" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tswitch (notification.getFeatureID(Resource.class))" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tcase Resource.RESOURCE__IS_LOADED:";
protected final String TEXT_101 = "\t\t\t\t\t\t" + NL + "\t\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec"
+ NL + "\t\t\t\t\t\t\t\t(new Runnable() {" + NL + "\t\t\t\t\t\t\t\t\tpublic void run() {" + NL
+ "\t\t\t\t\t\t\t\t\t\tgetEmdeViewerFilterActions((Resource) notification.getNotifier());" + NL
+ "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t});";
protected final String TEXT_102 = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__ERRORS:"
+ NL + "\t\t\t\t\t\tcase Resource.RESOURCE__WARNINGS:" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tResource resource = (Resource)notification.getNotifier();" + NL
+ "\t\t\t\t\t\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, null);" + NL
+ "\t\t\t\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, diagnostic);" + NL + "\t\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.remove(resource);"
+ NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tdispatchUpdateProblemIndication();" + NL + "\t\t\t\t\t\t\tbreak;"
+ NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tsuper.notifyChanged(notification);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL
+ "\t\t\tprotected void dispatchUpdateProblemIndication()" + NL + "\t\t\t{" + NL
+ "\t\t\t\tif (updateProblemIndication && !dispatching)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tdispatching = true;"
+ NL + "\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t(new Runnable()" + NL
+ "\t\t\t\t\t\t {";
protected final String TEXT_103 = NL + "\t\t\t\t\t\t\t @Override";
protected final String TEXT_104 = NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t dispatching = false;" + NL + "\t\t\t\t\t\t\t\t updateProblemIndication();" + NL
+ "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
protected final String TEXT_105 = NL + "\t\t\tprotected void setTarget(Resource target)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tbasicSetTarget(target);" + NL + "\t\t\t}" + NL;
protected final String TEXT_106 = NL + "\t\t\tprotected void unsetTarget(Resource target)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tbasicUnsetTarget(target);" + NL + "\t\t\t\tresourceToDiagnosticMap.remove(target);" + NL
+ "\t\t\t\tdispatchUpdateProblemIndication();" + NL + "\t\t\t}" + NL + "\t\t};";
protected final String TEXT_107 = NL + NL + "\t/**" + NL + "\t * This listens for workspace changes." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected IResourceChangeListener resourceChangeListener =" + NL + "\t\tnew IResourceChangeListener()" + NL
+ "\t\t{";
protected final String TEXT_108 = NL + "\t\t\tpublic void resourceChanged(IResourceChangeEvent event)" + NL
+ "\t\t\t{" + NL + "\t\t\t\tIResourceDelta delta = event.getDelta();" + NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tclass ResourceDeltaVisitor implements IResourceDeltaVisitor" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tprotected ResourceSet resourceSet = editingDomain.getResourceSet();" + NL
+ "\t\t\t\t\t\tprotected ";
protected final String TEXT_109 = "();" + NL + "\t\t\t\t\t\tprotected ";
protected final String TEXT_110 = "();" + NL;
protected final String TEXT_111 = NL + "\t\t\t\t\t\t@Override";
protected final String TEXT_112 = NL + "\t\t\t\t\t\tpublic boolean visit(";
protected final String TEXT_113 = "final ";
protected final String TEXT_114 = "IResourceDelta delta)" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tif (delta.getResource().getType() == IResource.FILE)" + NL + "\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED ||" + NL
+ "\t\t\t\t\t\t\t\t delta.getKind() == IResourceDelta.CHANGED";
protected final String TEXT_115 = " && delta.getFlags() != IResourceDelta.MARKERS";
protected final String TEXT_116 = ")" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t";
protected final String TEXT_117 = "Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);"
+ NL + "\t\t\t\t\t\t\t\t\tif (resource != null)" + NL + "\t\t\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED)" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tremovedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t}";
protected final String TEXT_118 = NL + "\t\t\t\t\t\t\t\t\t\telse if (!savedResources.remove(resource))" + NL
+ "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL
+ "\t\t\t\t\t\t\t\t\t\t}";
protected final String TEXT_119 = NL + "\t\t\t\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.MARKERS) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{"
+ NL + "\t\t\t\t\t\t\t\t\t\t\t\t";
protected final String TEXT_120 = ".DiagnosticAdapter.update(resource, markerHelper.getMarkerDiagnostics(resource, (IFile)delta.getResource()";
protected final String TEXT_121 = ", false";
protected final String TEXT_122 = "));" + NL + "\t\t\t\t\t\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.CONTENT) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{"
+ NL + "\t\t\t\t\t\t\t\t\t\t\t\tif (!savedResources.remove(resource))" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t}";
protected final String TEXT_123 = NL + "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\t\treturn true;" + NL
+ "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
protected final String TEXT_124 = " getChangedResources()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\treturn changedResources;" + NL + "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
protected final String TEXT_125 = " getRemovedResources()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\treturn removedResources;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "" + NL
+ "\t\t\t\t\tfinal ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();" + NL
+ "\t\t\t\t\tdelta.accept(visitor);" + NL + "" + NL + "\t\t\t\t\tif (!visitor.getRemovedResources().isEmpty())"
+ NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL
+ "\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t {";
protected final String TEXT_126 = NL + "\t\t\t\t\t\t\t\t @Override";
protected final String TEXT_127 = NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t removedResources.addAll(visitor.getRemovedResources());" + NL
+ "\t\t\t\t\t\t\t\t\t if (!isDirty())" + NL + "\t\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t\t getSite().getPage().closeEditor(";
protected final String TEXT_128 = ".this, false);" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL
+ "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "" + NL
+ "\t\t\t\t\tif (!visitor.getChangedResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t(new Runnable()" + NL
+ "\t\t\t\t\t\t\t {";
protected final String TEXT_129 = NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t changedResources.addAll(visitor.getChangedResources());" + NL
+ "\t\t\t\t\t\t\t\t\t if (getSite().getPage().getActiveEditor() == ";
protected final String TEXT_130 = ".this)" + NL + "\t\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t\t handleActivate();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL
+ "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\tcatch (CoreException exception)"
+ NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
protected final String TEXT_131 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};";
protected final String TEXT_132 = NL + NL + "\t/**" + NL
+ "\t * Handles activation of the editor or it's associated views." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleActivate()"
+ NL + "\t{" + NL + "\t\t// Recompute the read only state." + NL + "\t\t//" + NL
+ "\t\tif (editingDomain.getResourceToReadOnlyMap() != null)" + NL + "\t\t{" + NL
+ "\t\t editingDomain.getResourceToReadOnlyMap().clear();" + NL + "" + NL
+ "\t\t // Refresh any actions that may become enabled or disabled." + NL + "\t\t //" + NL
+ "\t\t setSelection(getSelection());" + NL + "\t\t}" + NL + "" + NL + "\t\tif (!removedResources.isEmpty())"
+ NL + "\t\t{" + NL + "\t\t\tif (handleDirtyConflict())" + NL + "\t\t\t{" + NL
+ "\t\t\t\tgetSite().getPage().closeEditor(";
protected final String TEXT_133 = ".this, false);" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL
+ "\t\t\t\tremovedResources.clear();" + NL + "\t\t\t\tchangedResources.clear();" + NL
+ "\t\t\t\tsavedResources.clear();" + NL + "\t\t\t}" + NL + "\t\t}" + NL
+ "\t\telse if (!changedResources.isEmpty())" + NL + "\t\t{" + NL
+ "\t\t\tchangedResources.removeAll(savedResources);" + NL + "\t\t\thandleChangedResources();" + NL
+ "\t\t\tchangedResources.clear();" + NL + "\t\t\tsavedResources.clear();" + NL + "\t\t}" + NL + "\t}" + NL + ""
+ NL + "\t/**" + NL + "\t * Handles what to do with changed resources on activation." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected void handleChangedResources()" + NL + "\t{" + NL
+ "\t\tif (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict()))" + NL + "\t\t{" + NL
+ "\t\t\tResourceSet resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\tif (isDirty())" + NL + "\t\t\t{"
+ NL + "\t\t\t\tchangedResources.addAll(resourceSet.getResources());" + NL + "\t\t\t}" + NL
+ "\t\t\teditingDomain.getCommandStack().flush();" + NL + "" + NL + "\t\t\tupdateProblemIndication = false;";
protected final String TEXT_134 = NL + "\t\t\tfor (Resource resource : changedResources)";
protected final String TEXT_135 = NL + "\t\t\tfor (Iterator i = changedResources.iterator(); i.hasNext(); )";
protected final String TEXT_136 = NL + "\t\t\t{";
protected final String TEXT_137 = NL + "\t\t\t\tResource resource = (Resource)i.next();";
protected final String TEXT_138 = NL + "\t\t\t\tif (resource.isLoaded())" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tresource.unload();" + NL + "\t\t\t\t\ttry" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tresource.load(resourceSet.getLoadOptions());" + NL + "\t\t\t\t\t}" + NL
+ "\t\t\t\t\tcatch (IOException exception)" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\tif (!resourceToDiagnosticMap.containsKey(resource))" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
protected final String TEXT_139 = NL + "\t\t\tif (AdapterFactoryEditingDomain.isStale(editorSelection))" + NL
+ "\t\t\t{" + NL + "\t\t\t\tsetSelection(StructuredSelection.EMPTY);" + NL + "\t\t\t}";
protected final String TEXT_140 = NL + NL + "\t\t\tupdateProblemIndication = true;" + NL
+ "\t\t\tupdateProblemIndication();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * Updates the problems indication with the information described in the specified diagnostic." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected void updateProblemIndication()" + NL + "\t{" + NL + "\t\tif (updateProblemIndication)" + NL
+ "\t\t{" + NL + "\t\t\tBasicDiagnostic diagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL
+ "\t\t\t\t\t(Diagnostic.OK," + NL + "\t\t\t\t\t \"";
protected final String TEXT_141 = "\",";
protected final String TEXT_142 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t null," + NL
+ "\t\t\t\t\t new Object [] { editingDomain.getResourceSet() });";
protected final String TEXT_143 = NL + "\t\t\tfor (Diagnostic childDiagnostic : resourceToDiagnosticMap.values())";
protected final String TEXT_144 = NL
+ "\t\t\tfor (Iterator i = resourceToDiagnosticMap.values().iterator(); i.hasNext(); )";
protected final String TEXT_145 = NL + "\t\t\t\tDiagnostic childDiagnostic = (Diagnostic)i.next();";
protected final String TEXT_146 = NL + "\t\t\t\tif (childDiagnostic.getSeverity() != Diagnostic.OK)" + NL
+ "\t\t\t\t{" + NL + "\t\t\t\t\tdiagnostic.add(childDiagnostic);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + ""
+ NL + "\t\t\tint lastEditorPage = getPageCount() - 1;" + NL
+ "\t\t\tif (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);" + NL
+ "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL
+ "\t\t\telse if (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tProblemEditorPart problemEditorPart = new ProblemEditorPart();" + NL
+ "\t\t\t\tproblemEditorPart.setDiagnostic(diagnostic);";
protected final String TEXT_147 = NL + "\t\t\t\tproblemEditorPart.setMarkerHelper(markerHelper);";
protected final String TEXT_148 = NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\taddPage(++lastEditorPage, problemEditorPart, getEditorInput());" + NL
+ "\t\t\t\t\tsetPageText(lastEditorPage, problemEditorPart.getPartName());" + NL
+ "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t\tshowTabs();" + NL + "\t\t\t\t}" + NL
+ "\t\t\t\tcatch (PartInitException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
protected final String TEXT_149 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}";
protected final String TEXT_150 = NL + NL + "\t\t\tif (markerHelper.hasMarkers(editingDomain.getResourceSet()))" + NL
+ "\t\t\t{";
protected final String TEXT_151 = NL + "\t\t\t\tmarkerHelper.deleteMarkers(editingDomain.getResourceSet());" + NL
+ "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\ttry" + NL
+ "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tmarkerHelper.createMarkers(diagnostic);" + NL + "\t\t\t\t\t}" + NL
+ "\t\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t";
protected final String TEXT_152 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
protected final String TEXT_153 = NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\tmarkerHelper.updateMarkers(diagnostic);" + NL + "\t\t\t\t}" + NL
+ "\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
protected final String TEXT_154 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}";
protected final String TEXT_155 = NL + "\t\t\t}";
protected final String TEXT_156 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * Shows a dialog that asks if conflicting changes should be discarded." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected boolean handleDirtyConflict()" + NL + "\t{" + NL + "\t\treturn" + NL
+ "\t\t\tMessageDialog.openQuestion" + NL + "\t\t\t\t(getSite().getShell()," + NL
+ "\t\t\t\t getString(\"_UI_FileConflict_label\"),";
protected final String TEXT_157 = NL + "\t\t\t\t getString(\"_WARN_FileConflict\"));";
protected final String TEXT_158 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This creates a model editor." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic ";
protected final String TEXT_159 = "()" + NL + "\t{" + NL + "\t\tsuper();" + NL + "\t\tinitializeEditingDomain();" + NL
+ "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This sets up the editing domain for the model editor." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tprotected void initializeEditingDomain()" + NL + "\t{" + NL
+ "\t\t// Create an adapter factory that yields item providers." + NL + "\t\t//" + NL
+ "\t\tadapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);" + NL
+ "" + NL + "\t\tadapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());";
protected final String TEXT_160 = NL
+ "\t\tadapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());" + NL + "" + NL
+ "\t\t// Create the command stack that will notify this editor as commands are executed." + NL + "\t\t//";
protected final String TEXT_161 = NL + "\t\tBasicCommandStack commandStack = new BasicCommandStack();";
protected final String TEXT_162 = NL + "\t\tBasicCommandStack commandStack =" + NL + "\t\t\tnew BasicCommandStack()"
+ NL + "\t\t\t{";
protected final String TEXT_163 = NL + "\t\t\t\t@Override";
protected final String TEXT_164 = NL + "\t\t\t\tpublic void execute(Command command)" + NL + "\t\t\t\t{" + NL
+ "\t\t\t\t\t// Cancel live validation before executing a command that will trigger a new round of validation."
+ NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tif (!(command instanceof ";
protected final String TEXT_165 = ".NonDirtying))" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t";
protected final String TEXT_166 = ".cancel(editingDomain);" + NL + "\t\t\t\t\t}" + NL
+ "\t\t\t\t\tsuper.execute(command);" + NL + "\t\t\t\t}" + NL + "\t\t\t};";
protected final String TEXT_167 = NL + NL
+ "\t\t// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus."
+ NL + "\t\t//" + NL + "\t\tcommandStack.addCommandStackListener" + NL + "\t\t\t(new CommandStackListener()" + NL
+ "\t\t\t {";
protected final String TEXT_168 = NL + "\t\t\t\t @Override";
protected final String TEXT_169 = NL + "\t\t\t\t public void commandStackChanged(final EventObject event)" + NL
+ "\t\t\t\t {" + NL + "\t\t\t\t\t getContainer().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t (new Runnable()"
+ NL + "\t\t\t\t\t\t {";
protected final String TEXT_170 = NL + "\t\t\t\t\t\t\t @Override";
protected final String TEXT_171 = NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t firePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "" + NL
+ "\t\t\t\t\t\t\t\t // Try to select the affected objects." + NL + "\t\t\t\t\t\t\t\t //" + NL
+ "\t\t\t\t\t\t\t\t Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();" + NL
+ "\t\t\t\t\t\t\t\t if (mostRecentCommand != null)" + NL + "\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t setSelectionToViewer(mostRecentCommand.getAffectedObjects());" + NL + "\t\t\t\t\t\t\t\t }"
+ NL + "\t\t\t\t\t\t\t\t for (Iterator";
protected final String TEXT_172 = "<PropertySheetPage>";
protected final String TEXT_173 = " i = propertySheetPages.iterator(); i.hasNext(); )" + NL + "\t\t\t\t\t\t\t\t {"
+ NL + "\t\t\t\t\t\t\t\t\t PropertySheetPage propertySheetPage = ";
protected final String TEXT_174 = "(PropertySheetPage)";
protected final String TEXT_175 = "i.next();" + NL
+ "\t\t\t\t\t\t\t\t\t if (propertySheetPage.getControl() == null || propertySheetPage.getControl().isDisposed())"
+ NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t i.remove();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL
+ "\t\t\t\t\t\t\t\t\t else" + NL + "\t\t\t\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t\t\t\t propertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }"
+ NL + "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "" + NL
+ "\t\t// Create the editing domain with a special command stack." + NL + "\t\t//" + NL
+ "\t\teditingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new ";
protected final String TEXT_176 = "());" + NL + "\t\t// Register this editor for ExtendedModel state" + NL + "\t\t//"
+ NL + "\t\t";
protected final String TEXT_177 = ".getInstance(getEditingDomain().getResourceSet()).addListener(this);\t\t" + NL
+ "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is here for the listener to be able to call it." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_178 = NL + "\tprotected void firePropertyChange(int action)" + NL + "\t{" + NL
+ "\t\tsuper.firePropertyChange(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * This sets the selection into whichever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic void setSelectionToViewer(";
protected final String TEXT_179 = " collection)" + NL + "\t{" + NL + "\t\tfinal ";
protected final String TEXT_180 = " theSelection = collection;" + NL + "\t\t// Make sure it's okay." + NL + "\t\t//"
+ NL + "\t\tif (theSelection != null && !theSelection.isEmpty())" + NL + "\t\t{" + NL
+ "\t\t\tRunnable runnable =" + NL + "\t\t\t\tnew Runnable()" + NL + "\t\t\t\t{";
protected final String TEXT_181 = NL + "\t\t\t\t\t@Override";
protected final String TEXT_182 = NL + "\t\t\t\t\tpublic void run()" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t// Try to select the items in the current content viewer of the editor." + NL + "\t\t\t\t\t\t//"
+ NL + "\t\t\t\t\t\tif (currentViewer != null)" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL
+ "\t\t\tgetSite().getShell().getDisplay().asyncExec(runnable);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL
+ "\t/**" + NL
+ "\t * This returns the editing domain as required by the {@link IEditingDomainProvider} interface." + NL
+ "\t * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}" + NL
+ "\t * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_183 = NL + "\t@Override";
protected final String TEXT_184 = NL + "\tpublic EditingDomain getEditingDomain()" + NL + "\t{" + NL
+ "\t\treturn editingDomain;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider" + NL + "\t{" + NL
+ "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL
+ "\t\t * @generated" + NL + "\t\t */" + NL
+ "\t\tpublic ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory)" + NL + "\t\t{" + NL
+ "\t\t\tsuper(adapterFactory);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->"
+ NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
protected final String TEXT_185 = NL + "\t\t@Override";
protected final String TEXT_186 = NL + "\t\tpublic Object [] getElements(Object object)" + NL + "\t\t{" + NL
+ "\t\t\tObject parent = super.getParent(object);" + NL
+ "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL
+ "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->"
+ NL + "\t\t * @generated" + NL + "\t\t */";
protected final String TEXT_187 = NL + "\t\tpublic Object [] getChildren(Object object)" + NL + "\t\t{" + NL
+ "\t\t\tObject parent = super.getParent(object);" + NL
+ "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL
+ "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->"
+ NL + "\t\t * @generated" + NL + "\t\t */";
protected final String TEXT_188 = NL + "\t\tpublic boolean hasChildren(Object object)" + NL + "\t\t{" + NL
+ "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn parent != null;" + NL + "\t\t}" + NL + ""
+ NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL
+ "\t\t * @generated" + NL + "\t\t */";
protected final String TEXT_189 = NL + "\t\tpublic Object getParent(Object object)" + NL + "\t\t{" + NL
+ "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t}";
protected final String TEXT_190 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic void setCurrentViewerPane(ViewerPane viewerPane)" + NL + "\t{" + NL
+ "\t\tif (currentViewerPane != viewerPane)" + NL + "\t\t{" + NL + "\t\t\tif (currentViewerPane != null)" + NL
+ "\t\t\t{" + NL + "\t\t\t\tcurrentViewerPane.showFocus(false);" + NL + "\t\t\t}" + NL
+ "\t\t\tcurrentViewerPane = viewerPane;" + NL + "\t\t}" + NL
+ "\t\tsetCurrentViewer(currentViewerPane.getViewer());" + NL + "\t}";
protected final String TEXT_191 = NL + NL + "\t/**" + NL
+ "\t * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,"
+ NL + "\t * is the current one." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL
+ "\t * @generated" + NL + "\t */" + NL + "\tpublic void setCurrentViewer(Viewer viewer)" + NL + "\t{" + NL
+ "\t\t// If it is changing..." + NL + "\t\t//" + NL + "\t\tif (currentViewer != viewer)" + NL + "\t\t{" + NL
+ "\t\t\tif (selectionChangedListener == null)" + NL + "\t\t\t{" + NL
+ "\t\t\t\t// Create the listener on demand." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionChangedListener =" + NL
+ "\t\t\t\t\tnew ISelectionChangedListener()" + NL + "\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t// This just notifies those things that are affected by the section." + NL + "\t\t\t\t\t\t//";
protected final String TEXT_192 = NL
+ "\t\t\t\t\t\tpublic void selectionChanged(SelectionChangedEvent selectionChangedEvent)" + NL + "\t\t\t\t\t\t{"
+ NL + "\t\t\t\t\t\t\tsetSelection(selectionChangedEvent.getSelection());" + NL + "\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t};" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Stop listening to the old one." + NL + "\t\t\t//"
+ NL + "\t\t\tif (currentViewer != null)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tcurrentViewer.removeSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL + ""
+ NL + "\t\t\t// Start listening to the new one." + NL + "\t\t\t//" + NL + "\t\t\tif (viewer != null)" + NL
+ "\t\t\t{" + NL + "\t\t\t\tviewer.addSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL
+ "" + NL + "\t\t\t// Remember it." + NL + "\t\t\t//" + NL + "\t\t\tcurrentViewer = viewer;" + NL + "" + NL
+ "\t\t\t// Set the editors selection based on the current viewer's selection." + NL + "\t\t\t//" + NL
+ "\t\t\tsetSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());" + NL
+ "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * This returns the viewer as required by the {@link IViewerProvider} interface." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_193 = NL + "\tpublic Viewer getViewer()" + NL + "\t{" + NL + "\t\treturn currentViewer;"
+ NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * This returns viewers supported in this editor" + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic Collection<Viewer> getViewers()" + NL + "\t{" + NL + "\t\treturn viewers;" + NL + "\t}\t";
protected final String TEXT_194 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic void modelEnabled(String nsURI) {" + NL
+ "\t\tfor (Collection<EmdeViewerFilterAction> actionList : viewerFilterActions.values()) {" + NL
+ "\t\t\tfor (EmdeViewerFilterAction action : actionList) {" + NL
+ "\t\t\t\tif (action.getExtendedModel().getName().equals(nsURI))" + NL + "\t\t\t\t\taction.setChecked(true);"
+ NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL
+ "\t */" + NL + "\tpublic void modelDisabled(String nsURI) {" + NL
+ "\t\tfor (Collection<EmdeViewerFilterAction> actionList : viewerFilterActions.values()) {" + NL
+ "\t\t\tfor (EmdeViewerFilterAction action : actionList) {" + NL
+ "\t\t\t\tif (action.getExtendedModel().getName().equals(nsURI))" + NL + "\t\t\t\t\taction.setChecked(false);"
+ NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Collection<";
protected final String TEXT_195 = "> getEmdeViewerFilterActions(";
protected final String TEXT_196 = " resource_p) {" + NL
+ "\t\tif (resource_p == null || resource_p.getContents().isEmpty()) {" + NL + "\t\t\treturn null;" + NL + "\t\t}"
+ NL + "\t\t// Cached extension actions\t\t" + NL + "\t\tif (viewerFilterActions.get(resource_p) != null) {" + NL
+ "\t\t\treturn viewerFilterActions.get(resource_p);" + NL + "\t\t}\t" + NL
+ "\t\t// Create new extension actions" + NL + "\t\t";
protected final String TEXT_197 = "> extensionActions = new ";
protected final String TEXT_198 = "<EmdeViewerFilterAction>();\t\t" + NL
+ "\t\tString extensibleModelURI = resource_p.getContents().get(0).eClass().getEPackage().getNsURI();" + NL
+ "\t\t";
protected final String TEXT_199 = " helper = ";
protected final String TEXT_200 = ".getInstance(resource_p);" + NL + "\t\t";
protected final String TEXT_201 = " extensibleModel = ";
protected final String TEXT_202 = ".INSTANCE.getExtensibleModel(extensibleModelURI);" + NL
+ "\t\tif (extensibleModel != null) {\t\t" + NL + "\t\t\tfor (";
protected final String TEXT_203 = " extendedModel : extensibleModel.getAllExtendedModels()) {" + NL + "\t\t\t\t";
protected final String TEXT_204 = " filterAction = new EmdeViewerFilterAction(resource_p, extensibleModel, extendedModel) {"
+ NL + "\t\t\t\t\t@Override" + NL + "\t\t\t\t\tpublic void run() {" + NL
+ "\t\t\t\t\t\tISelection selection = getSelection();" + NL + "\t\t\t\t\t\tif (selection instanceof ";
protected final String TEXT_205 = ") {" + NL + "\t\t\t\t\t\t\tif (selection.isEmpty() == false) {" + NL
+ "\t\t\t\t\t\t\t\tsetSelectionToViewer(((";
protected final String TEXT_206 = ") getSelection()).toList());" + NL + "\t\t\t\t\t\t\t} else { " + NL
+ "\t\t\t\t\t\t\t\tif (getResource() != null) {" + NL
+ "\t\t\t\t\t\t\t\t\tif (getResource().getContents().isEmpty()) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tsetSelectionToViewer((new ";
protected final String TEXT_207 = "(getResource())).toList());" + NL + "\t\t\t\t\t\t\t\t\t} else {" + NL
+ "\t\t\t\t\t\t\t\t\t\tsetSelectionToViewer((new ";
protected final String TEXT_208 = "(getResource().getContents().get(0))).toList());" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ "\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL
+ "\t\t\t\t};\t\t\t" + NL
+ "\t\t\t\tfilterAction.setChecked(!helper.isExtensionModelDisabled(extendedModel));\t\t" + NL
+ "\t\t\t\tfilterAction.setViewers(getViewers());\t" + NL
+ "\t\t\t\tfilterAction.setEnabled(helper.canDisableExtensionModel(extendedModel));\t\t" + NL
+ "\t\t\t\tfilterAction.addPropertyChangeListener((";
protected final String TEXT_209 = ") getActionBarContributor());\t\t\t\t" + NL
+ "\t\t\t\textensionActions.add(filterAction);" + NL + "\t\t\t}" + NL + "\t\t}" + NL
+ "\t\tviewerFilterActions.put(resource_p, extensionActions);\t\t" + NL + "\t\treturn extensionActions;" + NL
+ "\t}\t ";
protected final String TEXT_210 = "\t" + NL + "" + NL + "\t/**" + NL
+ "\t * This creates a context menu for the viewer and adds a listener as well registering the menu for extension."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tprotected void createContextMenuFor(StructuredViewer viewer)" + NL + "\t{" + NL
+ "\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\");";
protected final String TEXT_211 = NL + "\t\tcontextMenu.add(new Separator(\"additions\"));";
protected final String TEXT_212 = NL + "\t\tcontextMenu.setRemoveAllWhenShown(true);" + NL
+ "\t\tcontextMenu.addMenuListener(this);" + NL
+ "\t\tMenu menu= contextMenu.createContextMenu(viewer.getControl());" + NL
+ "\t\tviewer.getControl().setMenu(menu);";
protected final String TEXT_213 = NL
+ "\t\tgetSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));";
protected final String TEXT_214 = NL + "\t\tgetSite().registerContextMenu(contextMenu, viewer);";
protected final String TEXT_215 = NL + NL + "\t\tint dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;"
+ NL + "\t\tTransfer[] transfers = new Transfer[] { LocalTransfer.getInstance()";
protected final String TEXT_216 = ", LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance()";
protected final String TEXT_217 = " };" + NL
+ "\t\tviewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));" + NL
+ "\t\tviewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));"
+ NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the method called to load a resource into the editing domain's resource set based on the editor's input."
+ NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */"
+ NL + "\tpublic void createModel()" + NL + "\t{";
protected final String TEXT_218 = NL
+ "\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());";
protected final String TEXT_219 = NL + "\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());";
protected final String TEXT_220 = NL + "\t\tURI resourceURI = URI.createURI(getEditorInput().getName());";
protected final String TEXT_221 = NL + "\t\t// Assumes that the input is a file object." + NL + "\t\t//" + NL
+ "\t\tIFileEditorInput modelFile = (IFileEditorInput)getEditorInput();" + NL
+ "\t\tURI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString(), true);";
protected final String TEXT_222 = NL + "\t\tException exception = null;" + NL + "\t\tResource resource = null;" + NL
+ "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// Load the resource through the editing domain." + NL + "\t\t\t//" + NL
+ "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, true);" + NL + "\t\t}" + NL
+ "\t\tcatch (Exception e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL
+ "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, false);" + NL + "\t\t}" + NL + "" + NL
+ "\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, exception);" + NL
+ "\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t{" + NL
+ "\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t}"
+ NL + "\t\teditingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);" + NL + "\t\t";
protected final String TEXT_223 = ".getViewpointMetadata(editingDomain.getResourceSet()).initMetadataStorage();" + NL
+ "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * Returns a diagnostic describing the errors and warnings listed in the resource" + NL
+ "\t * and the specified exception (if any)." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL
+ "\tpublic Diagnostic analyzeResourceProblems(Resource resource, Exception exception)" + NL + "\t{" + NL
+ "\t\tboolean hasErrors = !resource.getErrors().isEmpty();" + NL
+ "\t\tif (hasErrors || !resource.getWarnings().isEmpty())" + NL + "\t\t{" + NL
+ "\t\t\tBasicDiagnostic basicDiagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL
+ "\t\t\t\t\t(hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING," + NL + "\t\t\t\t\t \"";
protected final String TEXT_224 = NL + "\t\t\t\t\t 0," + NL
+ "\t\t\t\t\t getString(\"_UI_CreateModelError_message\", resource.getURI()),";
protected final String TEXT_225 = NL
+ "\t\t\t\t\t new Object [] { exception == null ? (Object)resource : exception });" + NL
+ "\t\t\tbasicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));" + NL
+ "\t\t\treturn basicDiagnostic;" + NL + "\t\t}" + NL + "\t\telse if (exception != null)" + NL + "\t\t{" + NL
+ "\t\t\treturn" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.ERROR," + NL
+ "\t\t\t\t\t \"";
protected final String TEXT_226 = NL + "\t\t\t\t\t new Object[] { exception });" + NL + "\t\t}" + NL + "\t\telse" + NL
+ "\t\t{" + NL + "\t\t\treturn Diagnostic.OK_INSTANCE;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * This is the method used by the framework to install your own controls." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_227 = NL + "\tpublic void createPages()" + NL + "\t{" + NL
+ "\t\t// Creates the model from the editor input" + NL + "\t\t//" + NL + "\t\tcreateModel();" + NL + "" + NL
+ "\t\t// Only creates the other pages if there is something that can be edited" + NL + "\t\t//" + NL
+ "\t\tif (!getEditingDomain().getResourceSet().getResources().isEmpty())" + NL + "\t\t{" + NL
+ "\t\t\t// Create a page for the selection tree view." + NL + "\t\t\t//";
protected final String TEXT_228 = NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL
+ "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_229 = ".this)" + NL + "\t\t\t\t\t{";
protected final String TEXT_230 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL
+ "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tTree tree = new Tree(composite, SWT.MULTI);";
protected final String TEXT_231 = NL + " // begin-extension-code" + NL
+ " TreeViewer newTreeViewer = new TreeViewer(tree) {" + NL
+ " @Override" + NL + " public void refresh() {"
+ NL + " super.refresh();" + NL
+ "\t\t\t\t\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ " }" + NL + " };" + NL
+ " return newTreeViewer;" + NL + " // end-extension-code";
protected final String TEXT_232 = NL + " return new TreeViewer(tree);";
protected final String TEXT_233 = NL + "\t\t\t\t\t\t}";
protected final String TEXT_234 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL
+ "\t\t\t\tselectionViewer = (TreeViewer)viewerPane.getViewer();";
protected final String TEXT_235 = NL + " // begin-extension-code" + NL
+ " viewers.add(selectionViewer);" + NL + " // end-extension-code";
protected final String TEXT_236 = NL
+ "\t\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\tselectionViewer.setUseHashlookup(true);" + NL + "" + NL + "\t\t\t\tselectionViewer.setLabelProvider(";
protected final String TEXT_237 = "new ";
protected final String TEXT_238 = "(";
protected final String TEXT_239 = "(adapterFactory";
protected final String TEXT_240 = ", selectionViewer";
protected final String TEXT_241 = ")";
protected final String TEXT_242 = ", new ";
protected final String TEXT_243 = "(editingDomain";
protected final String TEXT_244 = ".getResourceSet()";
protected final String TEXT_245 = ".getPlugin().getDialogSettings()";
protected final String TEXT_246 = "))";
protected final String TEXT_247 = ");" + NL + "\t\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL
+ "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);"
+ NL + "\t\t\t\tviewerPane.setTitle(editingDomain.getResourceSet());" + NL + "" + NL
+ "\t\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
protected final String TEXT_248 = NL + "\t\t\t\tnew ";
protected final String TEXT_249 = "(selectionViewer, new ";
protected final String TEXT_250 = ".EditingDomainLocationListener(editingDomain, selectionViewer));";
protected final String TEXT_251 = NL + NL + "\t\t\t\tcreateContextMenuFor(selectionViewer);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
protected final String TEXT_252 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Create a page for the parent tree view."
+ NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL
+ "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_253 = NL + " // begin-extension-code" + NL
+ " TreeViewer newTreeViewer = new TreeViewer(tree) {" + NL
+ " @Override" + NL + " public void refresh() {"
+ NL + " super.refresh();" + NL
+ "\t\t\t\t\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ " }" + NL + " };" + NL
+ " return newTreeViewer;" + NL + " // end-extension-code";
protected final String TEXT_254 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL
+ "\t\t\t\tparentViewer = (TreeViewer)viewerPane.getViewer();";
protected final String TEXT_255 = NL + " // begin-extension-code" + NL
+ " viewers.add(parentViewer);" + NL + " // end-extension-code";
protected final String TEXT_256 = NL + "\t\t\t\tparentViewer.setAutoExpandLevel(30);" + NL
+ "\t\t\t\tparentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\tparentViewer.setLabelProvider(";
protected final String TEXT_257 = ", parentViewer";
protected final String TEXT_258 = ");" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(parentViewer);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ParentPage_label\"));";
protected final String TEXT_259 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the list viewer" + NL
+ "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL
+ "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_260 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL
+ "\t\t\t\t\t\t{";
protected final String TEXT_261 = NL + " // begin-extension-code" + NL
+ " ListViewer newListViewer = new ListViewer(composite) {" + NL
+ " @Override" + NL + " public void refresh() {"
+ NL + " super.refresh();" + NL
+ "\t\t\t\t\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ " }" + NL + " };" + NL
+ " return newListViewer;" + NL + " // end-extension-code";
protected final String TEXT_262 = NL + " return new ListViewer(composite);";
protected final String TEXT_263 = "\t\t\t\t\t\t\t" + NL + "\t\t\t\t\t\t}";
protected final String TEXT_264 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL
+ "\t\t\t\tlistViewer = (ListViewer)viewerPane.getViewer();";
protected final String TEXT_265 = NL + " // begin-extension-code" + NL
+ " viewers.add(listViewer);" + NL + " // end-extension-code";
protected final String TEXT_266 = NL
+ "\t\t\t\tlistViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\tlistViewer.setLabelProvider(";
protected final String TEXT_267 = ", listViewer";
protected final String TEXT_268 = ");" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(listViewer);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ListPage_label\"));";
protected final String TEXT_269 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the tree viewer" + NL
+ "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL
+ "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_270 = NL + " // begin-extension-code" + NL
+ " TreeViewer newTreeViewer = new TreeViewer(composite) {" + NL
+ " @Override" + NL + " public void refresh() {"
+ NL + " super.refresh();" + NL
+ "\t\t\t\t\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ " }" + NL + " };" + NL
+ " return newTreeViewer;" + NL + " // end-extension-code";
protected final String TEXT_271 = NL + " return new TreeViewer(composite);";
protected final String TEXT_272 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL
+ "\t\t\t\ttreeViewer = (TreeViewer)viewerPane.getViewer();";
protected final String TEXT_273 = NL + " // begin-extension-code" + NL
+ " viewers.add(treeViewer);" + NL + " // end-extension-code";
protected final String TEXT_274 = NL
+ "\t\t\t\ttreeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\ttreeViewer.setLabelProvider(";
protected final String TEXT_275 = ", treeViewer";
protected final String TEXT_276 = ", treeViewer))";
protected final String TEXT_277 = ");" + NL + "" + NL
+ "\t\t\t\tnew AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);";
protected final String TEXT_278 = "(treeViewer, new ";
protected final String TEXT_279 = ".EditingDomainLocationListener(editingDomain, treeViewer));";
protected final String TEXT_280 = NL + NL + "\t\t\t\tcreateContextMenuFor(treeViewer);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreePage_label\"));";
protected final String TEXT_281 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the table viewer."
+ NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL
+ "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_282 = NL + " // begin-extension-code" + NL
+ " TableViewer newTableViewer = new TableViewer(composite) {" + NL
+ " @Override" + NL + " public void refresh() {"
+ NL + " super.refresh();" + NL
+ "\t\t\t\t\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t}" + NL
+ " }" + NL + " };" + NL
+ " return newTableViewer;" + NL + " // end-extension-code";
protected final String TEXT_283 = NL + " return new TableViewer(composite);";
protected final String TEXT_284 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL
+ "\t\t\t\ttableViewer = (TableViewer)viewerPane.getViewer();";
protected final String TEXT_285 = NL + " // begin-extension-code" + NL
+ " viewers.add(tableViewer);" + NL + " // end-extension-code";
protected final String TEXT_286 = NL + NL + "\t\t\t\tTable table = tableViewer.getTable();" + NL
+ "\t\t\t\tTableLayout layout = new TableLayout();" + NL + "\t\t\t\ttable.setLayout(layout);" + NL
+ "\t\t\t\ttable.setHeaderVisible(true);" + NL + "\t\t\t\ttable.setLinesVisible(true);" + NL + "" + NL
+ "\t\t\t\tTableColumn objectColumn = new TableColumn(table, SWT.NONE);" + NL
+ "\t\t\t\tlayout.addColumnData(new ColumnWeightData(3, 100, true));" + NL
+ "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
protected final String TEXT_287 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL + "" + NL
+ "\t\t\t\tTableColumn selfColumn = new TableColumn(table, SWT.NONE);" + NL
+ "\t\t\t\tlayout.addColumnData(new ColumnWeightData(2, 100, true));" + NL
+ "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
protected final String TEXT_288 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL + "" + NL
+ "\t\t\t\ttableViewer.setColumnProperties(new String [] {\"a\", \"b\"});";
protected final String TEXT_289 = NL
+ "\t\t\t\ttableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\ttableViewer.setLabelProvider(";
protected final String TEXT_290 = ", tableViewer";
protected final String TEXT_291 = ");" + NL;
protected final String TEXT_292 = "(tableViewer, new ";
protected final String TEXT_293 = ".EditingDomainLocationListener(editingDomain, tableViewer));" + NL;
protected final String TEXT_294 = NL + "\t\t\t\tcreateContextMenuFor(tableViewer);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TablePage_label\"));";
protected final String TEXT_295 = NL + "\t\t\t}" + NL + "" + NL
+ "\t\t\t// This is the page for the table tree viewer." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL
+ "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
protected final String TEXT_296 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL
+ "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL
+ "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL
+ "\t\t\t\ttreeViewerWithColumns = (TreeViewer)viewerPane.getViewer();";
protected final String TEXT_297 = NL + " // begin-extension-code" + NL
+ " viewers.add(treeViewerWithColumns);" + NL + " // end-extension-code";
protected final String TEXT_298 = NL + NL + "\t\t\t\tTree tree = treeViewerWithColumns.getTree();" + NL
+ "\t\t\t\ttree.setLayoutData(new FillLayout());" + NL + "\t\t\t\ttree.setHeaderVisible(true);" + NL
+ "\t\t\t\ttree.setLinesVisible(true);" + NL + "" + NL
+ "\t\t\t\tTreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);" + NL
+ "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
protected final String TEXT_299 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL
+ "\t\t\t\tobjectColumn.setWidth(250);" + NL + "" + NL
+ "\t\t\t\tTreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);" + NL
+ "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
protected final String TEXT_300 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL
+ "\t\t\t\tselfColumn.setWidth(200);" + NL + "" + NL
+ "\t\t\t\ttreeViewerWithColumns.setColumnProperties(new String [] {\"a\", \"b\"});";
protected final String TEXT_301 = NL
+ "\t\t\t\ttreeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\t\ttreeViewerWithColumns.setLabelProvider(";
protected final String TEXT_302 = ", treeViewerWithColumns";
protected final String TEXT_303 = "(treeViewerWithColumns, new ";
protected final String TEXT_304 = ".EditingDomainLocationListener(editingDomain, treeViewerWithColumns));" + NL;
protected final String TEXT_305 = NL + "\t\t\t\tcreateContextMenuFor(treeViewerWithColumns);" + NL
+ "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL
+ "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreeWithColumnsPage_label\"));";
protected final String TEXT_306 = NL + "\t\t\tTree tree = new Tree(getContainer(), SWT.MULTI);";
protected final String TEXT_307 = NL + " // begin-extension-code" + NL
+ " selectionViewer = new TreeViewer(tree) {" + NL + " @Override" + NL
+ " public void refresh() {" + NL + " super.refresh();" + NL
+ "\t\t\t\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages) {" + NL
+ "\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\tif (!propertySheetPage.getControl().isDisposed())" + NL
+ "\t\t\t\t\t\t\t\tpropertySheetPage.refresh();" + NL + "\t\t\t\t\t}" + NL + " }" + NL
+ " };" + NL + " viewers.add(selectionViewer);" + NL + " // end-extension-code";
protected final String TEXT_308 = NL + " selectionViewer = new TreeViewer(tree);";
protected final String TEXT_309 = "\t\t" + NL + "\t\t\tsetCurrentViewer(selectionViewer);" + NL + "" + NL
+ "\t\t\tselectionViewer.setUseHashlookup(true);" + NL
+ "\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL
+ "\t\t\tselectionViewer.setLabelProvider(";
protected final String TEXT_310 = ");" + NL + "\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL
+ "\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);"
+ NL + "" + NL + "\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
protected final String TEXT_311 = NL + "\t\t\tnew ";
protected final String TEXT_312 = NL + NL + "\t\t\tcreateContextMenuFor(selectionViewer);" + NL
+ "\t\t\tint pageIndex = addPage(tree);" + NL
+ "\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
protected final String TEXT_313 = NL + NL + "\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL
+ "\t\t\t\t(new Runnable()" + NL + "\t\t\t\t {";
protected final String TEXT_314 = NL + "\t\t\t\t\t @Override";
protected final String TEXT_315 = NL + "\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t if (!getContainer().isDisposed())" + NL + "\t\t\t\t\t\t {" + NL
+ "\t\t\t\t\t\t\t setActivePage(0);" + NL + "\t\t\t\t\t\t }" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL
+ "\t\t}" + NL + "" + NL + "\t\t// Ensures that this editor will only display the page's tab" + NL
+ "\t\t// area if there are more than one page" + NL + "\t\t//" + NL + "\t\tgetContainer().addControlListener"
+ NL + "\t\t\t(new ControlAdapter()" + NL + "\t\t\t {" + NL + "\t\t\t\tboolean guard = false;";
protected final String TEXT_316 = NL + "\t\t\t\tpublic void controlResized(ControlEvent event)" + NL + "\t\t\t\t{"
+ NL + "\t\t\t\t\tif (!guard)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tguard = true;" + NL
+ "\t\t\t\t\t\thideTabs();" + NL + "\t\t\t\t\t\tguard = false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL
+ "\t\t\t });" + NL + "" + NL + "\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t(new Runnable()"
+ NL + "\t\t\t {";
protected final String TEXT_317 = NL + "\t\t\t\t public void run()" + NL + "\t\t\t\t {" + NL
+ "\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "\t}" + NL + "" + NL
+ "\t/**" + NL + "\t * If there is just one page in the multi-page editor part," + NL
+ "\t * this hides the single tab at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void hideTabs()" + NL
+ "\t{" + NL + "\t\tif (getPageCount() <= 1)" + NL + "\t\t{" + NL + "\t\t\tsetPageText(0, \"\");";
protected final String TEXT_318 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tPoint point = getContainer().getSize();" + NL
+ "\t\t\t\tRectangle clientArea = getContainer().getClientArea();" + NL
+ "\t\t\t\tgetContainer().setSize(point.x, 2 * point.y - clientArea.height - clientArea.y);" + NL + "\t\t\t}"
+ NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL
+ "\t * If there is more than one page in the multi-page editor part," + NL
+ "\t * this shows the tabs at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL
+ "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void showTabs()" + NL
+ "\t{" + NL + "\t\tif (getPageCount() > 1)" + NL + "\t\t{" + NL
+ "\t\t\tsetPageText(0, getString(\"_UI_SelectionPage_label\"));";
protected final String TEXT_319 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL
+ "\t\t\t\tPoint point = getContainer().getSize();" + NL
+ "\t\t\t\tRectangle clientArea = getContainer().getClientArea();" + NL
+ "\t\t\t\tgetContainer().setSize(point.x, clientArea.height + clientArea.y);" + NL + "\t\t\t}" + NL + "\t\t}"
+ NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is used to track the active viewer." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_320 = NL + "\tprotected void pageChange(int pageIndex)" + NL + "\t{" + NL
+ "\t\tsuper.pageChange(pageIndex);" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL
+ "\t\t\thandleContentOutlineSelection(contentOutlinePage.getSelection());" + NL + "\t\t}" + NL + "\t}" + NL + ""
+ NL + "\t/**" + NL + "\t * This is how the framework determines which interfaces we implement." + NL
+ "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_321 = NL + "\t@SuppressWarnings(\"";
protected final String TEXT_322 = "rawtypes";
protected final String TEXT_323 = "unchecked";
protected final String TEXT_324 = "\")";
protected final String TEXT_325 = NL + "\tpublic <T> T getAdapter(Class<T> key)";