1 17 package org.eclipse.emf.codegen.ecore.genmodel.provider; 18 19 20 import java.util.Collection ; 21 import java.util.List ; 22 23 import org.eclipse.emf.codegen.ecore.genmodel.GenModel; 24 import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; 25 import org.eclipse.emf.common.notify.AdapterFactory; 26 import org.eclipse.emf.common.notify.Notification; 27 import org.eclipse.emf.common.util.ResourceLocator; 28 import org.eclipse.emf.ecore.EStructuralFeature; 29 30 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; 31 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; 32 import org.eclipse.emf.edit.provider.IItemLabelProvider; 33 import org.eclipse.emf.edit.provider.IItemPropertySource; 34 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; 35 import org.eclipse.emf.edit.provider.ITreeItemContentProvider; 36 import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; 37 38 39 import org.eclipse.emf.edit.provider.ViewerNotification; 40 41 47 public class GenModelItemProvider 48 extends GenBaseItemProvider 49 implements 50 IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource 51 { 52 58 public GenModelItemProvider(AdapterFactory adapterFactory) 59 { 60 super(adapterFactory); 61 } 62 63 69 public List getPropertyDescriptors(Object object) 70 { 71 if (itemPropertyDescriptors == null) 72 { 73 super.getPropertyDescriptors(object); 74 75 addCopyrightTextPropertyDescriptor(object); 76 addModelDirectoryPropertyDescriptor(object); 77 addCreationCommandsPropertyDescriptor(object); 78 addCreationIconsPropertyDescriptor(object); 79 addEditDirectoryPropertyDescriptor(object); 80 addEditorDirectoryPropertyDescriptor(object); 81 addModelPluginIDPropertyDescriptor(object); 82 addTemplateDirectoryPropertyDescriptor(object); 83 addRuntimeJarPropertyDescriptor(object); 84 addDynamicTemplatesPropertyDescriptor(object); 85 addRedirectionPropertyDescriptor(object); 86 addForceOverwritePropertyDescriptor(object); 87 addModelNamePropertyDescriptor(object); 88 addModelPluginClassPropertyDescriptor(object); 89 addEditPluginClassPropertyDescriptor(object); 90 addEditorPluginClassPropertyDescriptor(object); 91 addUpdateClasspathPropertyDescriptor(object); 92 addGenerateSchemaPropertyDescriptor(object); 93 addNonNLSMarkersPropertyDescriptor(object); 94 addStaticPackagesPropertyDescriptor(object); 95 addModelPluginVariablesPropertyDescriptor(object); 96 addRootExtendsInterfacePropertyDescriptor(object); 97 addRootExtendsClassPropertyDescriptor(object); 98 addRootImplementsInterfacePropertyDescriptor(object); 99 addSuppressEMFTypesPropertyDescriptor(object); 100 addFeatureMapWrapperInterfacePropertyDescriptor(object); 101 addFeatureMapWrapperInternalInterfacePropertyDescriptor(object); 102 addFeatureMapWrapperClassPropertyDescriptor(object); 103 addRuntimeCompatibilityPropertyDescriptor(object); 104 addRichClientPlatformPropertyDescriptor(object); 105 addReflectiveDelegationPropertyDescriptor(object); 106 addCodeFormattingPropertyDescriptor(object); 107 addTestsDirectoryPropertyDescriptor(object); 108 addTestSuiteClassPropertyDescriptor(object); 109 addBooleanFlagsFieldPropertyDescriptor(object); 110 addBooleanFlagsReservedBitsPropertyDescriptor(object); 111 addBundleManifestPropertyDescriptor(object); 112 } 113 return itemPropertyDescriptors; 114 } 115 116 122 protected void addCopyrightTextPropertyDescriptor(Object object) 123 { 124 itemPropertyDescriptors.add 125 (createItemPropertyDescriptor 126 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 127 getResourceLocator(), 128 getString("_UI_GenModel_copyrightText_feature"), 129 getString("_UI_GenModel_copyrightText_description"), 130 GenModelPackage.eINSTANCE.getGenModel_CopyrightText(), 131 true, 132 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 133 getString("_UI_AllPropertyCategory"), 134 null)); 135 } 136 137 143 protected void addModelDirectoryPropertyDescriptor(Object object) 144 { 145 itemPropertyDescriptors.add 146 (createItemPropertyDescriptor 147 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 148 getResourceLocator(), 149 getString("_UI_GenModel_modelDirectory_feature"), 150 getString("_UI_GenModel_modelDirectory_description"), 151 GenModelPackage.eINSTANCE.getGenModel_ModelDirectory(), 152 true, 153 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 154 getString("_UI_ModelPropertyCategory"), 155 null)); 156 } 157 158 164 protected void addCreationCommandsPropertyDescriptor(Object object) 165 { 166 itemPropertyDescriptors.add 167 (createItemPropertyDescriptor 168 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 169 getResourceLocator(), 170 getString("_UI_GenModel_creationCommands_feature"), 171 getString("_UI_GenModel_creationCommands_description"), 172 GenModelPackage.eINSTANCE.getGenModel_CreationCommands(), 173 true, 174 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 175 getString("_UI_EditPropertyCategory"), 176 null)); 177 } 178 179 185 protected void addCreationIconsPropertyDescriptor(Object object) 186 { 187 itemPropertyDescriptors.add 188 (createItemPropertyDescriptor 189 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 190 getResourceLocator(), 191 getString("_UI_GenModel_creationIcons_feature"), 192 getString("_UI_GenModel_creationIcons_description"), 193 GenModelPackage.eINSTANCE.getGenModel_CreationIcons(), 194 true, 195 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 196 getString("_UI_EditPropertyCategory"), 197 null)); 198 } 199 200 206 protected void addEditDirectoryPropertyDescriptor(Object object) 207 { 208 itemPropertyDescriptors.add 209 (createItemPropertyDescriptor 210 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 211 getResourceLocator(), 212 getString("_UI_GenModel_editDirectory_feature"), 213 getString("_UI_GenModel_editDirectory_description"), 214 GenModelPackage.eINSTANCE.getGenModel_EditDirectory(), 215 true, 216 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 217 getString("_UI_EditPropertyCategory"), 218 null)); 219 } 220 221 227 protected void addEditorDirectoryPropertyDescriptor(Object object) 228 { 229 itemPropertyDescriptors.add 230 (createItemPropertyDescriptor 231 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 232 getResourceLocator(), 233 getString("_UI_GenModel_editorDirectory_feature"), 234 getString("_UI_GenModel_editorDirectory_description"), 235 GenModelPackage.eINSTANCE.getGenModel_EditorDirectory(), 236 true, 237 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 238 getString("_UI_EditorPropertyCategory"), 239 null)); 240 } 241 242 248 protected void addModelPluginIDPropertyDescriptor(Object object) 249 { 250 itemPropertyDescriptors.add 251 (createItemPropertyDescriptor 252 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 253 getResourceLocator(), 254 getString("_UI_GenModel_modelPluginID_feature"), 255 getString("_UI_GenModel_modelPluginID_description"), 256 GenModelPackage.eINSTANCE.getGenModel_ModelPluginID(), 257 true, 258 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 259 getString("_UI_AllPropertyCategory"), 260 null)); 261 } 262 263 269 protected void addTemplateDirectoryPropertyDescriptor(Object object) 270 { 271 itemPropertyDescriptors.add 272 (createItemPropertyDescriptor 273 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 274 getResourceLocator(), 275 getString("_UI_GenModel_templateDirectory_feature"), 276 getString("_UI_GenModel_templateDirectory_description"), 277 GenModelPackage.eINSTANCE.getGenModel_TemplateDirectory(), 278 true, 279 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 280 getString("_UI_JETPropertyCategory"), 281 null)); 282 } 283 284 290 protected void addRuntimeJarPropertyDescriptor(Object object) 291 { 292 itemPropertyDescriptors.add 293 (createItemPropertyDescriptor 294 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 295 getResourceLocator(), 296 getString("_UI_GenModel_runtimeJar_feature"), 297 getString("_UI_GenModel_runtimeJar_description"), 298 GenModelPackage.eINSTANCE.getGenModel_RuntimeJar(), 299 true, 300 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 301 getString("_UI_AllPropertyCategory"), 302 null)); 303 } 304 305 311 protected void addDynamicTemplatesPropertyDescriptor(Object object) 312 { 313 itemPropertyDescriptors.add 314 (createItemPropertyDescriptor 315 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 316 getResourceLocator(), 317 getString("_UI_GenModel_dynamicTemplates_feature"), 318 getString("_UI_GenModel_dynamicTemplates_description"), 319 GenModelPackage.eINSTANCE.getGenModel_DynamicTemplates(), 320 true, 321 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 322 getString("_UI_JETPropertyCategory"), 323 null)); 324 } 325 326 332 protected void addRedirectionPropertyDescriptor(Object object) 333 { 334 itemPropertyDescriptors.add 335 (createItemPropertyDescriptor 336 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 337 getResourceLocator(), 338 getString("_UI_GenModel_redirection_feature"), 339 getString("_UI_GenModel_redirection_description"), 340 GenModelPackage.eINSTANCE.getGenModel_Redirection(), 341 true, 342 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 343 getString("_UI_JETPropertyCategory"), 344 null)); 345 } 346 347 353 protected void addForceOverwritePropertyDescriptor(Object object) 354 { 355 itemPropertyDescriptors.add 356 (createItemPropertyDescriptor 357 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 358 getResourceLocator(), 359 getString("_UI_GenModel_forceOverwrite_feature"), 360 getString("_UI_GenModel_forceOverwrite_description"), 361 GenModelPackage.eINSTANCE.getGenModel_ForceOverwrite(), 362 true, 363 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 364 getString("_UI_JETPropertyCategory"), 365 null)); 366 } 367 368 374 protected void addModelNamePropertyDescriptor(Object object) 375 { 376 itemPropertyDescriptors.add 377 (createItemPropertyDescriptor 378 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 379 getResourceLocator(), 380 getString("_UI_GenModel_modelName_feature"), 381 getString("_UI_GenModel_modelName_description"), 382 GenModelPackage.eINSTANCE.getGenModel_ModelName(), 383 true, 384 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 385 getString("_UI_AllPropertyCategory"), 386 null)); 387 } 388 389 395 protected void addModelPluginClassPropertyDescriptor(Object object) 396 { 397 itemPropertyDescriptors.add 398 (createItemPropertyDescriptor 399 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 400 getResourceLocator(), 401 getString("_UI_GenModel_modelPluginClass_feature"), 402 getString("_UI_GenModel_modelPluginClass_description"), 403 GenModelPackage.eINSTANCE.getGenModel_ModelPluginClass(), 404 true, 405 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 406 getString("_UI_ModelPropertyCategory"), 407 null)); 408 } 409 410 416 protected void addEditPluginClassPropertyDescriptor(Object object) 417 { 418 itemPropertyDescriptors.add 419 (createItemPropertyDescriptor 420 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 421 getResourceLocator(), 422 getString("_UI_GenModel_editPluginClass_feature"), 423 getString("_UI_GenModel_editPluginClass_description"), 424 GenModelPackage.eINSTANCE.getGenModel_EditPluginClass(), 425 true, 426 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 427 getString("_UI_EditPropertyCategory"), 428 null)); 429 } 430 431 437 protected void addEditorPluginClassPropertyDescriptor(Object object) 438 { 439 itemPropertyDescriptors.add 440 (createItemPropertyDescriptor 441 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 442 getResourceLocator(), 443 getString("_UI_GenModel_editorPluginClass_feature"), 444 getString("_UI_GenModel_editorPluginClass_description"), 445 GenModelPackage.eINSTANCE.getGenModel_EditorPluginClass(), 446 true, 447 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 448 getString("_UI_EditorPropertyCategory"), 449 null)); 450 } 451 452 458 protected void addUpdateClasspathPropertyDescriptor(Object object) 459 { 460 itemPropertyDescriptors.add 461 (createItemPropertyDescriptor 462 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 463 getResourceLocator(), 464 getString("_UI_GenModel_updateClasspath_feature"), 465 getString("_UI_GenModel_updateClasspath_description"), 466 GenModelPackage.eINSTANCE.getGenModel_UpdateClasspath(), 467 true, 468 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 469 getString("_UI_JETPropertyCategory"), 470 null)); 471 } 472 473 479 protected void addGenerateSchemaPropertyDescriptor(Object object) 480 { 481 itemPropertyDescriptors.add 482 (createItemPropertyDescriptor 483 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 484 getResourceLocator(), 485 getString("_UI_GenModel_generateSchema_feature"), 486 getString("_UI_GenModel_generateSchema_description"), 487 GenModelPackage.eINSTANCE.getGenModel_GenerateSchema(), 488 true, 489 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 490 getString("_UI_ModelPropertyCategory"), 491 null)); 492 } 493 494 500 protected void addNonNLSMarkersPropertyDescriptor(Object object) 501 { 502 itemPropertyDescriptors.add 503 (createItemPropertyDescriptor 504 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 505 getResourceLocator(), 506 getString("_UI_GenModel_nonNLSMarkers_feature"), 507 getString("_UI_GenModel_nonNLSMarkers_description"), 508 GenModelPackage.eINSTANCE.getGenModel_NonNLSMarkers(), 509 true, 510 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 511 getString("_UI_AllPropertyCategory"), 512 null)); 513 } 514 515 521 protected void addStaticPackagesPropertyDescriptor(Object object) 522 { 523 itemPropertyDescriptors.add 524 (createItemPropertyDescriptor 525 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 526 getResourceLocator(), 527 getString("_UI_GenModel_staticPackages_feature"), 528 getString("_UI_GenModel_staticPackages_description"), 529 GenModelPackage.eINSTANCE.getGenModel_StaticPackages(), 530 true, 531 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 532 getString("_UI_ModelClassPropertyCategory"), 533 null)); 534 } 535 536 542 protected void addModelPluginVariablesPropertyDescriptor(Object object) 543 { 544 itemPropertyDescriptors.add 545 (createItemPropertyDescriptor 546 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 547 getResourceLocator(), 548 getString("_UI_GenModel_modelPluginVariables_feature"), 549 getString("_UI_GenModel_modelPluginVariables_description"), 550 GenModelPackage.eINSTANCE.getGenModel_ModelPluginVariables(), 551 true, 552 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 553 getString("_UI_ModelPropertyCategory"), 554 null)); 555 } 556 557 563 protected void addRootExtendsInterfacePropertyDescriptor(Object object) 564 { 565 itemPropertyDescriptors.add 566 (createItemPropertyDescriptor 567 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 568 getResourceLocator(), 569 getString("_UI_GenModel_rootExtendsInterface_feature"), 570 getString("_UI_GenModel_rootExtendsInterface_description"), 571 GenModelPackage.eINSTANCE.getGenModel_RootExtendsInterface(), 572 true, 573 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 574 getString("_UI_ModelClassPropertyCategory"), 575 null)); 576 } 577 578 584 protected void addRootExtendsClassPropertyDescriptor(Object object) 585 { 586 itemPropertyDescriptors.add 587 (createItemPropertyDescriptor 588 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 589 getResourceLocator(), 590 getString("_UI_GenModel_rootExtendsClass_feature"), 591 getString("_UI_GenModel_rootExtendsClass_description"), 592 GenModelPackage.eINSTANCE.getGenModel_RootExtendsClass(), 593 true, 594 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 595 getString("_UI_ModelClassPropertyCategory"), 596 null)); 597 } 598 599 605 protected void addRootImplementsInterfacePropertyDescriptor(Object object) 606 { 607 itemPropertyDescriptors.add 608 (createItemPropertyDescriptor 609 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 610 getResourceLocator(), 611 getString("_UI_GenModel_rootImplementsInterface_feature"), 612 getString("_UI_GenModel_rootImplementsInterface_description"), 613 GenModelPackage.eINSTANCE.getGenModel_RootImplementsInterface(), 614 true, 615 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 616 getString("_UI_ModelClassPropertyCategory"), 617 null)); 618 } 619 620 626 protected void addSuppressEMFTypesPropertyDescriptor(Object object) 627 { 628 itemPropertyDescriptors.add 629 (createItemPropertyDescriptor 630 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 631 getResourceLocator(), 632 getString("_UI_GenModel_suppressEMFTypes_feature"), 633 getString("_UI_GenModel_suppressEMFTypes_description"), 634 GenModelPackage.eINSTANCE.getGenModel_SuppressEMFTypes(), 635 true, 636 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 637 getString("_UI_ModelFeaturePropertyCategory"), 638 null)); 639 } 640 641 647 protected void addFeatureMapWrapperInterfacePropertyDescriptor(Object object) 648 { 649 itemPropertyDescriptors.add 650 (createItemPropertyDescriptor 651 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 652 getResourceLocator(), 653 getString("_UI_GenModel_featureMapWrapperInterface_feature"), 654 getString("_UI_GenModel_featureMapWrapperInterface_description"), 655 GenModelPackage.eINSTANCE.getGenModel_FeatureMapWrapperInterface(), 656 true, 657 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 658 getString("_UI_ModelFeaturePropertyCategory"), 659 null)); 660 } 661 662 668 protected void addFeatureMapWrapperInternalInterfacePropertyDescriptor(Object object) 669 { 670 itemPropertyDescriptors.add 671 (createItemPropertyDescriptor 672 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 673 getResourceLocator(), 674 getString("_UI_GenModel_featureMapWrapperInternalInterface_feature"), 675 getString("_UI_GenModel_featureMapWrapperInternalInterface_description"), 676 GenModelPackage.eINSTANCE.getGenModel_FeatureMapWrapperInternalInterface(), 677 true, 678 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 679 getString("_UI_ModelFeaturePropertyCategory"), 680 null)); 681 } 682 683 689 protected void addFeatureMapWrapperClassPropertyDescriptor(Object object) 690 { 691 itemPropertyDescriptors.add 692 (createItemPropertyDescriptor 693 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 694 getResourceLocator(), 695 getString("_UI_GenModel_featureMapWrapperClass_feature"), 696 getString("_UI_GenModel_featureMapWrapperClass_description"), 697 GenModelPackage.eINSTANCE.getGenModel_FeatureMapWrapperClass(), 698 true, 699 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 700 getString("_UI_ModelFeaturePropertyCategory"), 701 null)); 702 } 703 704 710 protected void addRuntimeCompatibilityPropertyDescriptor(Object object) 711 { 712 itemPropertyDescriptors.add 713 (createItemPropertyDescriptor 714 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 715 getResourceLocator(), 716 getString("_UI_GenModel_runtimeCompatibility_feature"), 717 getString("_UI_GenModel_runtimeCompatibility_description"), 718 GenModelPackage.eINSTANCE.getGenModel_RuntimeCompatibility(), 719 true, 720 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 721 getString("_UI_AllPropertyCategory"), 722 null)); 723 } 724 725 731 protected void addRichClientPlatformPropertyDescriptor(Object object) 732 { 733 itemPropertyDescriptors.add 734 (createItemPropertyDescriptor 735 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 736 getResourceLocator(), 737 getString("_UI_GenModel_richClientPlatform_feature"), 738 getString("_UI_GenModel_richClientPlatform_description"), 739 GenModelPackage.eINSTANCE.getGenModel_RichClientPlatform(), 740 true, 741 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 742 getString("_UI_EditorPropertyCategory"), 743 null)); 744 } 745 746 752 protected void addReflectiveDelegationPropertyDescriptor(Object object) 753 { 754 itemPropertyDescriptors.add 755 (createItemPropertyDescriptor 756 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 757 getResourceLocator(), 758 getString("_UI_GenModel_reflectiveDelegation_feature"), 759 getString("_UI_GenModel_reflectiveDelegation_description"), 760 GenModelPackage.eINSTANCE.getGenModel_ReflectiveDelegation(), 761 true, 762 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 763 getString("_UI_ModelPropertyCategory"), 764 null)); 765 } 766 767 773 protected void addCodeFormattingPropertyDescriptor(Object object) 774 { 775 itemPropertyDescriptors.add 776 (createItemPropertyDescriptor 777 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 778 getResourceLocator(), 779 getString("_UI_GenModel_codeFormatting_feature"), 780 getString("_UI_GenModel_codeFormatting_description"), 781 GenModelPackage.eINSTANCE.getGenModel_CodeFormatting(), 782 true, 783 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 784 getString("_UI_JETPropertyCategory"), 785 null)); 786 } 787 788 794 protected void addTestsDirectoryPropertyDescriptor(Object object) 795 { 796 itemPropertyDescriptors.add 797 (createItemPropertyDescriptor 798 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 799 getResourceLocator(), 800 getString("_UI_GenModel_testsDirectory_feature"), 801 getString("_UI_GenModel_testsDirectory_description"), 802 GenModelPackage.eINSTANCE.getGenModel_TestsDirectory(), 803 true, 804 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 805 getString("_UI_TestsPropertyCategory"), 806 null)); 807 } 808 809 815 protected void addTestSuiteClassPropertyDescriptor(Object object) 816 { 817 itemPropertyDescriptors.add 818 (createItemPropertyDescriptor 819 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 820 getResourceLocator(), 821 getString("_UI_GenModel_testSuiteClass_feature"), 822 getString("_UI_GenModel_testSuiteClass_description"), 823 GenModelPackage.eINSTANCE.getGenModel_TestSuiteClass(), 824 true, 825 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 826 getString("_UI_TestsPropertyCategory"), 827 null)); 828 } 829 830 836 protected void addBooleanFlagsFieldPropertyDescriptor(Object object) 837 { 838 itemPropertyDescriptors.add 839 (createItemPropertyDescriptor 840 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 841 getResourceLocator(), 842 getString("_UI_GenModel_booleanFlagsField_feature"), 843 getString("_UI_GenModel_booleanFlagsField_description"), 844 GenModelPackage.eINSTANCE.getGenModel_BooleanFlagsField(), 845 true, 846 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 847 getString("_UI_ModelFeaturePropertyCategory"), 848 null)); 849 } 850 851 857 protected void addBooleanFlagsReservedBitsPropertyDescriptor(Object object) 858 { 859 itemPropertyDescriptors.add 860 (createItemPropertyDescriptor 861 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 862 getResourceLocator(), 863 getString("_UI_GenModel_booleanFlagsReservedBits_feature"), 864 getString("_UI_GenModel_booleanFlagsReservedBits_description"), 865 GenModelPackage.eINSTANCE.getGenModel_BooleanFlagsReservedBits(), 866 true, 867 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, 868 getString("_UI_ModelFeaturePropertyCategory"), 869 null)); 870 } 871 872 878 protected void addBundleManifestPropertyDescriptor(Object object) 879 { 880 itemPropertyDescriptors.add 881 (createItemPropertyDescriptor 882 (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 883 getResourceLocator(), 884 getString("_UI_GenModel_bundleManifest_feature"), 885 getString("_UI_GenModel_bundleManifest_description"), 886 GenModelPackage.eINSTANCE.getGenModel_BundleManifest(), 887 true, 888 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 889 getString("_UI_AllPropertyCategory"), 890 null)); 891 } 892 893 901 public Collection getChildrenFeatures(Object object) 902 { 903 if (childrenFeatures == null) 904 { 905 super.getChildrenFeatures(object); 906 childrenFeatures.add(GenModelPackage.eINSTANCE.getGenModel_GenPackages()); 907 childrenFeatures.add(GenModelPackage.eINSTANCE.getGenModel_UsedGenPackages()); 908 } 909 return childrenFeatures; 910 } 911 912 917 protected EStructuralFeature getChildFeature(Object object, Object child) 918 { 919 922 return super.getChildFeature(object, child); 923 } 924 925 927 public Object getImage(Object object) 928 { 929 return new UnderlayedImage(getResourceLocator().getImage("full/obj16/GenModel")); 930 } 931 932 935 public String getText(Object object) 936 { 937 GenModel genModel = (GenModel)object; 938 return genModel.getModelName(); 939 } 940 941 948 public void notifyChanged(Notification notification) 949 { 950 updateChildren(notification); 951 952 switch (notification.getFeatureID(GenModel.class)) 953 { 954 case GenModelPackage.GEN_MODEL__COPYRIGHT_TEXT: 955 case GenModelPackage.GEN_MODEL__MODEL_DIRECTORY: 956 case GenModelPackage.GEN_MODEL__CREATION_COMMANDS: 957 case GenModelPackage.GEN_MODEL__CREATION_ICONS: 958 case GenModelPackage.GEN_MODEL__EDIT_DIRECTORY: 959 case GenModelPackage.GEN_MODEL__EDITOR_DIRECTORY: 960 case GenModelPackage.GEN_MODEL__MODEL_PLUGIN_ID: 961 case GenModelPackage.GEN_MODEL__TEMPLATE_DIRECTORY: 962 case GenModelPackage.GEN_MODEL__RUNTIME_JAR: 963 case GenModelPackage.GEN_MODEL__FOREIGN_MODEL: 964 case GenModelPackage.GEN_MODEL__DYNAMIC_TEMPLATES: 965 case GenModelPackage.GEN_MODEL__REDIRECTION: 966 case GenModelPackage.GEN_MODEL__FORCE_OVERWRITE: 967 case GenModelPackage.GEN_MODEL__NON_EXTERNALIZED_STRING_TAG: 968 case GenModelPackage.GEN_MODEL__MODEL_NAME: 969 case GenModelPackage.GEN_MODEL__MODEL_PLUGIN_CLASS: 970 case GenModelPackage.GEN_MODEL__EDIT_PLUGIN_CLASS: 971 case GenModelPackage.GEN_MODEL__EDITOR_PLUGIN_CLASS: 972 case GenModelPackage.GEN_MODEL__UPDATE_CLASSPATH: 973 case GenModelPackage.GEN_MODEL__GENERATE_SCHEMA: 974 case GenModelPackage.GEN_MODEL__NON_NLS_MARKERS: 975 case GenModelPackage.GEN_MODEL__STATIC_PACKAGES: 976 case GenModelPackage.GEN_MODEL__MODEL_PLUGIN_VARIABLES: 977 case GenModelPackage.GEN_MODEL__ROOT_EXTENDS_INTERFACE: 978 case GenModelPackage.GEN_MODEL__ROOT_EXTENDS_CLASS: 979 case GenModelPackage.GEN_MODEL__ROOT_IMPLEMENTS_INTERFACE: 980 case GenModelPackage.GEN_MODEL__SUPPRESS_EMF_TYPES: 981 case GenModelPackage.GEN_MODEL__FEATURE_MAP_WRAPPER_INTERFACE: 982 case GenModelPackage.GEN_MODEL__FEATURE_MAP_WRAPPER_INTERNAL_INTERFACE: 983 case GenModelPackage.GEN_MODEL__FEATURE_MAP_WRAPPER_CLASS: 984 case GenModelPackage.GEN_MODEL__RUNTIME_COMPATIBILITY: 985 case GenModelPackage.GEN_MODEL__RICH_CLIENT_PLATFORM: 986 case GenModelPackage.GEN_MODEL__REFLECTIVE_DELEGATION: 987 case GenModelPackage.GEN_MODEL__CODE_FORMATTING: 988 case GenModelPackage.GEN_MODEL__TESTS_DIRECTORY: 989 case GenModelPackage.GEN_MODEL__TEST_SUITE_CLASS: 990 case GenModelPackage.GEN_MODEL__BOOLEAN_FLAGS_FIELD: 991 case GenModelPackage.GEN_MODEL__BOOLEAN_FLAGS_RESERVED_BITS: 992 case GenModelPackage.GEN_MODEL__IMPORTER_ID: 993 case GenModelPackage.GEN_MODEL__BUNDLE_MANIFEST: 994 fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); 995 return; 996 case GenModelPackage.GEN_MODEL__GEN_PACKAGES: 997 case GenModelPackage.GEN_MODEL__USED_GEN_PACKAGES: 998 fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); 999 return; 1000 } 1001 super.notifyChanged(notification); 1002 } 1003 1004 1010 public ResourceLocator getResourceLocator() 1011 { 1012 return GenModelEditPlugin.INSTANCE; 1013 } 1014 1015} 1016 1017 | Popular Tags |