protected String getFullyQualifiedName(EObject eobj) { return ((ComponentClassType)eobj).getTextContent(); }
/** * Creates a {@link ComponentType} instance to represent a standard UI * component. * * @param name Base name of component from which component-type and * component-class are formed. * @return {@link ComponentType} instance. */ protected ComponentType createUIComponent(String name) { ComponentType componentType = FacesConfigFactory.eINSTANCE.createComponentType(); //set component-type ComponentTypeType componentTypeType = FacesConfigFactory.eINSTANCE.createComponentTypeType(); StringBuffer sb = new StringBuffer(); sb.append("javax.faces."); //$NON-NLS-1$ sb.append(name); componentTypeType.setTextContent(sb.toString()); componentType.setComponentType(componentTypeType); //set component-class ComponentClassType componentClassType = FacesConfigFactory.eINSTANCE.createComponentClassType(); sb = new StringBuffer(); sb.append("javax.faces.component.UI"); //$NON-NLS-1$ sb.append(name); componentClassType.setTextContent(sb.toString()); componentType.setComponentClass(componentClassType); return componentType; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getText(Object object) { String label = ((ComponentClassType)object).getId(); return label == null || label.length() == 0 ? getString("_UI_ComponentClassType_type") : getString("_UI_ComponentClassType_type") + " " + label; }
/** * Creates a {@link ComponentType} instance to represent a concrete HTML * component. * * @param name Base name of component from which component-type and * component-class are formed. * @return {@link ComponentType} instance. */ protected ComponentType createHTMLComponent(String name) { ComponentType componentType = FacesConfigFactory.eINSTANCE.createComponentType(); //set component-type ComponentTypeType componentTypeType = FacesConfigFactory.eINSTANCE.createComponentTypeType(); StringBuffer sb = new StringBuffer(); sb.append("javax.faces."); //$NON-NLS-1$ sb.append(name); componentTypeType.setTextContent(sb.toString()); componentType.setComponentType(componentTypeType); //set component-class ComponentClassType componentClassType = FacesConfigFactory.eINSTANCE.createComponentClassType(); sb = new StringBuffer(); sb.append("javax.faces.component.html."); //$NON-NLS-1$ sb.append(name); componentClassType.setTextContent(sb.toString()); componentType.setComponentClass(componentClassType); return componentType; }
public String getColumnText(Object object, int columnIndex) { ComponentType component = (ComponentType) object; switch (columnIndex) { case 0: return getText(object); case 1: return component.getComponentClass() == null ? "" : component .getComponentClass().getTextContent(); } return null; }
/** * This returns the label text for the adapted class. <!-- begin-user-doc * --> <!-- end-user-doc --> * * */ public String getText(Object object) { String label = null; // if (((ComponentType) object).getDisplayName() != null // && ((ComponentType) object).getDisplayName().size() > 0) { // label = ((DisplayNameType) ((ComponentType) object) // .getDisplayName().get(0)).getTextContent(); // } if (label == null || label.length() == 0) { if (((ComponentType) object).getComponentClass() != null) { label = ((ComponentType) object).getComponentClass() .getTextContent(); } } return label == null || label.length() == 0 ? getString("_UI_ComponentType_type") : getString("_UI_ComponentType_type") + " " + label; }