/** * @param project * @param attInfo * @param counter */ public static String createDefaultName(IProject project, ISchemaAttribute attInfo, int counter) { if (attInfo.getType().getName().equals("boolean")) // $NON-NLS-1$ return "true"; //$NON-NLS-1$ String tag = attInfo.getParent().getName(); return project.getName() + "." + tag + counter; // $NON-NLS-1$ }
private void validateExtensionAttribute(Element element, Attr attr, ISchemaAttribute attInfo) { ISchemaSimpleType type = attInfo.getType(); int kind = attInfo.getKind(); if (kind == IMetaAttribute.JAVA) { validateJavaAttribute(element, attr); } else if (kind == IMetaAttribute.RESOURCE) { validateResourceAttribute(element, attr); } else if (kind == IMetaAttribute.IDENTIFIER) { validateIdentifierAttribute(element, attr, attInfo); } else if (kind == IMetaAttribute.STRING) { ISchemaRestriction restriction = type.getRestriction(); if (restriction != null) { validateRestrictionAttribute(element, attr, restriction); } } else if (type.getName().equals("boolean")) { // $NON-NLS-1$ validateBoolean(element, attr); } validateTranslatableString(element, attr, attInfo.isTranslatable()); if (attInfo.isDeprecated()) { reportDeprecatedAttribute(element, attr); } }