public void checkEnum() { // Called when a | is found if (this.enumMode == 0) this.failed(Common.getMessage("UseCharORWithEnum_msg")); }
public void validate() { // Called at the end of the element parsing if (this.state != DONE) this.failed(Common.getMessage("BadAttributeDecl_msg")); }
public void setEnum(boolean enume) { enumMode += (enume?1:-1); if (enumMode == 1) { if (this.values == null) this.values = new ArrayList(); this.type = ENUM; this.state = NEED_ENUM; } else if (enumMode == 0) { this.state = NEED_OPTION; } else this.failed(Common.getMessage("WrongEnumDecl_msg")); }
if (value.charAt(0) == '"') { // NOI18N if (valueLen == 1) failed(Common.getMessage("TooLittleDeclaration_msg", value)); value = value.substring(1, value.length()-1); } else if (value.charAt(0) == '\'') { // NOI18N if (valueLen == 1) failed(Common.getMessage("TooLittleDeclaration_msg", value)); value = value.substring(1, value.length()-1); this.state = NEED_OPTION; if (this.type == -1) this.failed(Common.getMessage("UnknownType_msg", value)); break; case NEED_ENUM: break; case DONE: this.failed(Common.getMessage("TooMuchDeclaration_msg"));