/** * @param scope * @return an error message if scope does not match a valid * scope enum. */ public static IMessage validateManagedBeanScope(ManagedBeanScopeType scope) { // scope must be one of a few enums if (!"request".equals(scope.getTextContent()) //$NON-NLS-1$ && !"session".equals(scope.getTextContent()) //$NON-NLS-1$ && !"application".equals(scope.getTextContent()) //$NON-NLS-1$ && !"none".equals(scope.getTextContent())) //$NON-NLS-1$ { return DiagnosticFactory.create_BEAN_SCOPE_NOT_VALID(); } return null; }
private boolean isBeanScopeInMask(final ManagedBeanScopeType scope, final int scopeMask) { final int testScope = ISymbolConstants.getMaskForString(scope.getTextContent()); if (testScope != -1) { return (scopeMask & testScope) != 0; } // no other cases supported return false; } }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getText(Object object) { String label = ((ManagedBeanScopeType)object).getTextContent(); return label == null || label.length() == 0 ? getString("_UI_ManagedBeanScopeType_type") : getString("_UI_ManagedBeanScopeType_type") + " " + label; }
private void validateScope(ManagedBeanScopeType scope, List messages, IFile file) { if (scope != null && scope.getTextContent() != null) { addMessageInfo(messages , AppConfigValidationUtil.validateManagedBeanScope(scope) , scope, file); } }
additionalInfo.append(Messages.getString("DefaultBeanSymbolSourceProvider.AdditionalInformation.Scope")); //$NON-NLS-1$ additionalInfo.append("</b>"); //$NON-NLS-1$ additionalInfo.append(beanType.getManagedBeanScope().getTextContent()); additionalInfo.append("</p>"); //$NON-NLS-1$
public String getColumnText(Object object, int columnIndex) { ManagedBeanType managedBean = (ManagedBeanType) object; switch (columnIndex) { case 0: return managedBean.getManagedBeanName() == null ? "" : managedBean .getManagedBeanName().getTextContent(); case 1: return managedBean.getManagedBeanScope() == null ? "" : managedBean .getManagedBeanScope().getTextContent(); case 2: return managedBean.getManagedBeanClass() == null ? "" : managedBean .getManagedBeanClass().getTextContent(); } return null; }