/** * */ public AdapterQNameElement(ArtifactEdit anArtifactEdit, EClass childEClass, EStructuralFeature childFeature, boolean childNillable, Text nsURIText, Text localPartText) { super(); artifactEdit = anArtifactEdit; parent_ = null; childEClass_ = childEClass; childFeature_ = childFeature; childNillable_ = childNillable; CommonPackage commonPKG = CommonPackage.eINSTANCE; // Set up QName features features_ = new EStructuralFeature[2]; features_[0] = commonPKG.getQName_NamespaceURI(); features_[1] = commonPKG.getQName_LocalPart(); featuresNillable_ = new boolean[2]; featuresNillable_[0] = false; featuresNillable_[1] = false; featuresTexts_ = new Text[2]; featuresTexts_[0] = nsURIText; featuresTexts_[1] = localPartText; addModifyListener(); featuresAdapters_ = new AdapterText[features_.length]; newAdapters(null); }
protected Translator[] create10Children() { return new Translator[] { IDTranslator.INSTANCE, new Translator(DESCRIPTION, COMMON_PKG.getCompatibilityDescriptionGroup_Description()), new Translator(DISPLAY_NAME, COMMON_PKG.getCompatibilityDescriptionGroup_DisplayName()), new Translator(SMALL_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_SmallIcon()), new Translator(LARGE_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_LargeIcon()), create10WebServiceDescTranslator() }; }
public void notifyChanged(Notification msg) { if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Icons() || msg.getFeature() == CommonPackage.eINSTANCE.getIconType_LargeIcon() || msg.getFeature() == CommonPackage.eINSTANCE.getIconType_SmallIcon()) { synchIcons(); return; } else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_Descriptions() || msg.getFeature() == CommonPackage.eINSTANCE.getDescription_Value()) { synchDescription(); return; } else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames() || msg.getFeature() == CommonPackage.eINSTANCE.getDisplayName_Value()) { synchDisplayName(); return; } }
/** * @return */ public static Translator createIconTranslator() { GenericTranslator result = new GenericTranslator(ICON, COMMON_PKG.getDescriptionGroup_Icons()); result.setChildren(new Translator[] { new Translator(LANG, COMMON_PKG.getIconType_Lang(), Translator.DOM_ATTRIBUTE), IDTranslator.INSTANCE, new Translator(SMALL_ICON, COMMON_PKG.getIconType_SmallIcon()), new Translator(LARGE_ICON, COMMON_PKG.getIconType_LargeIcon()) }); return result; }
/** * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s * describing all of the children that can be created under this object. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add(createChildParameter(CommonPackage.eINSTANCE.getDescriptionGroup_Icons(), CommonFactory.eINSTANCE.createIconType())); newChildDescriptors.add(createChildParameter(CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames(), CommonFactory.eINSTANCE.createDisplayName())); newChildDescriptors.add(createChildParameter(CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames(), WscommonFactory.eINSTANCE.createDisplayNameType())); newChildDescriptors.add(createChildParameter(CommonPackage.eINSTANCE.getDescriptionGroup_Descriptions(), CommonFactory.eINSTANCE.createDescription())); newChildDescriptors.add(createChildParameter(CommonPackage.eINSTANCE.getDescriptionGroup_Descriptions(), WscommonFactory.eINSTANCE.createDescriptionType())); }
public Translator create11DescriptionTranslator(EStructuralFeature afeature) { GenericTranslator result = new GenericTranslator(DESCRIPTION, afeature); result.setChildren(new Translator[] { IDTranslator.INSTANCE, new Translator(LANG, COMMON_PKG.getDescription_Lang(), Translator.DOM_ATTRIBUTE), new Translator(Translator.TEXT_ATTRIBUTE_VALUE, COMMON_PKG.getDescription_Value()) }); return result; } public Translator create11DisplayNameTranslator(EStructuralFeature afeature) {
public CommandModifyNSURI(String label, String description, QName eObject, String newValue, boolean nillable) { super(label, description); eObject_ = eObject; feature_ = CommonPackage.eINSTANCE.getQName_NamespaceURI(); if (nillable && (newValue == null || newValue.length() <= 0)) newValue_ = null; else if (!nillable && newValue == null) newValue_ = ""; //$NON-NLS-1$ else newValue_ = newValue; nillable_ = nillable; oldValue_ = null; oldIsSet_ = true; }
public void notifyChanged(Notification msg) { if (msg.getFeature() == WebapplicationPackage.eINSTANCE.getSecurityConstraint_DisplayNames()) { synchDisplayName(); return; } else if (msg.getFeature() == CommonPackage.eINSTANCE.getDescriptionGroup_DisplayNames() || msg.getFeature() == CommonPackage.eINSTANCE.getDisplayName_Value()) { synchDisplayName(); return; } }
/** * This adds a property descriptor for the Local Part feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addLocalPartPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_QName_localPart_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_QName_localPart_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getQName_LocalPart(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * This adds a property descriptor for the Small Icon feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addSmallIconPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_smallIcon_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_smallIcon_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup_SmallIcon(), false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_description_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_description_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * This adds a property descriptor for the Lang feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ protected void addLangPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Description_lang_feature"), //$NON-NLS-1$ getString("_UI_PropertyDescriptor_description", "_UI_Description_lang_feature", "_UI_Description_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ CommonPackage.eINSTANCE.getDescription_Lang(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * This adds a property descriptor for the Large Icon feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addLargeIconPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_largeIcon_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_largeIcon_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup_LargeIcon(), false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * This adds a property descriptor for the Display Name feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addDisplayNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_displayName_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_CompatibilityDescriptionGroup_displayName_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getCompatibilityDescriptionGroup_DisplayName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
/** * @return */ public static Translator createDescriptionTranslator(EStructuralFeature feature) { GenericTranslator result = new GenericTranslator(DESCRIPTION, feature); result.setChildren(new Translator[] { IDTranslator.INSTANCE, new Translator(LANG, COMMON_PKG.getDescription_Lang(), Translator.DOM_ATTRIBUTE), new Translator(Translator.TEXT_ATTRIBUTE_VALUE, COMMON_PKG.getDescription_Value()) }); return result; }
/** * This adds a property descriptor for the Namespace URI feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * */ protected void addNamespaceURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), CommonEditResourceHandler.getString("_UI_QName_namespaceURI_feature"), //$NON-NLS-1$ CommonEditResourceHandler.getString("_UI_QName_namespaceURI_feature_desc"), //$NON-NLS-1$ CommonPackage.eINSTANCE.getQName_NamespaceURI(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); }
protected Translator[] create13Children() { return new Translator[] { IDTranslator.INSTANCE, new Translator(ICON+"/"+SMALL_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_SmallIcon()), //$NON-NLS-1$ new Translator(ICON+"/"+LARGE_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_LargeIcon()), //$NON-NLS-1$ new Translator(DISPLAY_NAME, COMMON_PKG.getCompatibilityDescriptionGroup_DisplayName()), new Translator(DESCRIPTION, COMMON_PKG.getCompatibilityDescriptionGroup_Description()), new ModuleTranslator(), CommonTranslators.createSecurityRoleTranslator13(APPLICATION_PKG.getApplication_SecurityRoles()), }; }
public static Translator createQNameTranslator10(String domName, EStructuralFeature feature) { GenericTranslator result = new GenericTranslator(domName, feature); result.setChildren(new Translator[] { IDTranslator.INSTANCE, new Translator(NAMESPACEURI, COMMON_PKG.getQName_NamespaceURI()), new Translator(LOCALPART, COMMON_PKG.getQName_LocalPart()) }); return result; }
public void modifyText(ModifyEvent e) { if (syncTextAndModel()) { //Handle QName_NamespaceURI feature in a special way. String namespaceFeatureName = CommonPackage.eINSTANCE.getQName_NamespaceURI().getName(); if ((eObject_ instanceof QName) && (feature_.getName().equals(namespaceFeatureName))) { CommandModifyNSURI command = new CommandModifyNSURI(null, null, (QName) eObject_, text_.getText(), nillable_); if (artifactEdit != null) { artifactEdit.getContentModelRoot().eResource().setModified(true); artifactEdit.getCommandStack().execute(command); } } else { CommandModifyText command = new CommandModifyText(null, null, eObject_, feature_, text_.getText(), nillable_); if (artifactEdit != null) { artifactEdit.getContentModelRoot().eResource().setModified(true); artifactEdit.getCommandStack().execute(command); } } } } }
protected Translator[] create13Children() { return new Translator[] { IDTranslator.INSTANCE, new Translator(DESCRIPTION, COMMON_PKG.getCompatibilityDescriptionGroup_Description()), new Translator(DISPLAY_NAME, COMMON_PKG.getCompatibilityDescriptionGroup_DisplayName()), new Translator(SMALL_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_SmallIcon()), new Translator(LARGE_ICON, COMMON_PKG.getCompatibilityDescriptionGroup_LargeIcon()), new EnterpriseBeansTranslator(), createRelationshipsTranslator13(), createAssemblyDescriptorTranslator13(), new Translator(EJB_CLIENT_JAR, EJB_PKG.getEJBJar_EjbClientJar()), }; }