return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameAND, scope); case OperatorIds.DIVIDE : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameDIVIDE, scope); case OperatorIds.GREATER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER, scope); case OperatorIds.GREATER_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER_EQUAL, scope); case OperatorIds.LEFT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLEFT_SHIFT, scope); case OperatorIds.LESS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS, scope); case OperatorIds.LESS_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS_EQUAL, scope); case OperatorIds.MINUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMINUS, scope); case OperatorIds.MULTIPLY : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMULTIPLY, scope); case OperatorIds.OR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameOR, scope); case OperatorIds.PLUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNamePLUS, scope); case OperatorIds.REMAINDER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameREMAINDER, scope); case OperatorIds.RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameRIGHT_SHIFT, scope); case OperatorIds.UNSIGNED_RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT, scope); case OperatorIds.XOR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameXOR, scope);
return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameAND, scope); case OperatorIds.DIVIDE : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameDIVIDE, scope); case OperatorIds.GREATER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER, scope); case OperatorIds.GREATER_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER_EQUAL, scope); case OperatorIds.LEFT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLEFT_SHIFT, scope); case OperatorIds.LESS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS, scope); case OperatorIds.LESS_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS_EQUAL, scope); case OperatorIds.MINUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMINUS, scope); case OperatorIds.MULTIPLY : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMULTIPLY, scope); case OperatorIds.OR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameOR, scope); case OperatorIds.PLUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNamePLUS, scope); case OperatorIds.REMAINDER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameREMAINDER, scope); case OperatorIds.RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameRIGHT_SHIFT, scope); case OperatorIds.UNSIGNED_RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT, scope); case OperatorIds.XOR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameXOR, scope);
return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameAND, scope); case OperatorIds.DIVIDE : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameDIVIDE, scope); case OperatorIds.GREATER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER, scope); case OperatorIds.GREATER_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameGREATER_EQUAL, scope); case OperatorIds.LEFT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLEFT_SHIFT, scope); case OperatorIds.LESS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS, scope); case OperatorIds.LESS_EQUAL : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameLESS_EQUAL, scope); case OperatorIds.MINUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMINUS, scope); case OperatorIds.MULTIPLY : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameMULTIPLY, scope); case OperatorIds.OR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameOR, scope); case OperatorIds.PLUS : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNamePLUS, scope); case OperatorIds.REMAINDER : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameREMAINDER, scope); case OperatorIds.RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameRIGHT_SHIFT, scope); case OperatorIds.UNSIGNED_RIGHT_SHIFT : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT, scope); case OperatorIds.XOR : return dumpBinaryExpression(binaryExpression, TerminalTokens.TokenNameXOR, scope);
public boolean visit( AnnotationMethodDeclaration annotationTypeMemberDeclaration, ClassScope scope) { /* * Print comments to get proper line number */ this.scribe.printComment(); this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); this.scribe.space(); /* * Print the method return type */ final TypeReference returnType = annotationTypeMemberDeclaration.returnType; final MethodScope annotationTypeMemberDeclarationScope = annotationTypeMemberDeclaration.scope; if (returnType != null) { returnType.traverse(this, annotationTypeMemberDeclarationScope); } /* * Print the method name */ this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true); this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_annotation_type_member_declaration); this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_annotation_type_member_declaration); /* * Check for extra dimensions */ int extraDimensions = annotationTypeMemberDeclaration.extendedDimensions; if (extraDimensions != 0) {
public boolean visit( ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) { final int numberOfParens = (parameterizedQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; if (numberOfParens > 0) { manageOpeningParenthesizedExpression(parameterizedQualifiedTypeReference, numberOfParens); } TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments; int length = typeArguments.length; for (int i = 0; i < length; i++) { if (parameterizedQualifiedTypeReference.annotations != null) { formatInlineAnnotations(parameterizedQualifiedTypeReference.annotations[i], false); } this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier); TypeReference[] typeArgument = typeArguments[i]; if (typeArgument != null) { int typeArgumentLength = typeArgument.length; if (typeArgumentLength > 0) { this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_parameterized_type_reference); if (this.preferences.insert_space_after_opening_angle_bracket_in_parameterized_type_reference) { this.scribe.space(); } for (int j = 0; j < typeArgumentLength - 1; j++) { typeArgument[j].traverse(this, scope); this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_parameterized_type_reference); if (this.preferences.insert_space_after_comma_in_parameterized_type_reference) { this.scribe.space(); } } typeArgument[typeArgumentLength - 1].traverse(this, scope);
public boolean visit( AnnotationMethodDeclaration annotationTypeMemberDeclaration, ClassScope scope) { /* * Print comments to get proper line number */ this.scribe.printComment(); this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); this.scribe.space(); /* * Print the method return type */ final TypeReference returnType = annotationTypeMemberDeclaration.returnType; final MethodScope annotationTypeMemberDeclarationScope = annotationTypeMemberDeclaration.scope; if (returnType != null) { returnType.traverse(this, annotationTypeMemberDeclarationScope); } /* * Print the method name */ this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true); this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_annotation_type_member_declaration); this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_annotation_type_member_declaration); /* * Check for extra dimensions */ int extraDimensions = annotationTypeMemberDeclaration.extendedDimensions; if (extraDimensions != 0) {
public boolean visit( ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) { final int numberOfParens = (parameterizedQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; if (numberOfParens > 0) { manageOpeningParenthesizedExpression(parameterizedQualifiedTypeReference, numberOfParens); } TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments; int length = typeArguments.length; for (int i = 0; i < length; i++) { if (parameterizedQualifiedTypeReference.annotations != null) { formatInlineAnnotations(parameterizedQualifiedTypeReference.annotations[i], false); } this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier); TypeReference[] typeArgument = typeArguments[i]; if (typeArgument != null) { int typeArgumentLength = typeArgument.length; if (typeArgumentLength > 0) { this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_parameterized_type_reference); if (this.preferences.insert_space_after_opening_angle_bracket_in_parameterized_type_reference) { this.scribe.space(); } for (int j = 0; j < typeArgumentLength - 1; j++) { typeArgument[j].traverse(this, scope); this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_parameterized_type_reference); if (this.preferences.insert_space_after_comma_in_parameterized_type_reference) { this.scribe.space(); } } typeArgument[typeArgumentLength - 1].traverse(this, scope);
public boolean visit( AnnotationMethodDeclaration annotationTypeMemberDeclaration, ClassScope scope) { /* * Print comments to get proper line number */ this.scribe.printComment(); this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD); this.scribe.space(); /* * Print the method return type */ final TypeReference returnType = annotationTypeMemberDeclaration.returnType; final MethodScope annotationTypeMemberDeclarationScope = annotationTypeMemberDeclaration.scope; if (returnType != null) { returnType.traverse(this, annotationTypeMemberDeclarationScope); } /* * Print the method name */ this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true); this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_annotation_type_member_declaration); this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_annotation_type_member_declaration); /* * Check for extra dimensions */ int extraDimensions = annotationTypeMemberDeclaration.extendedDimensions; if (extraDimensions != 0) {
public boolean visit( ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) { final int numberOfParens = (parameterizedQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; if (numberOfParens > 0) { manageOpeningParenthesizedExpression(parameterizedQualifiedTypeReference, numberOfParens); } TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments; int length = typeArguments.length; for (int i = 0; i < length; i++) { this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier); TypeReference[] typeArgument = typeArguments[i]; if (typeArgument != null) { this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_parameterized_type_reference); if (this.preferences.insert_space_after_opening_angle_bracket_in_parameterized_type_reference) { this.scribe.space(); } int typeArgumentLength = typeArgument.length; for (int j = 0; j < typeArgumentLength - 1; j++) { typeArgument[j].traverse(this, scope); this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_parameterized_type_reference); if (this.preferences.insert_space_after_comma_in_parameterized_type_reference) { this.scribe.space(); } } typeArgument[typeArgumentLength - 1].traverse(this, scope); if (isClosingGenericToken()) { this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS, this.preferences.insert_space_before_closing_angle_bracket_in_parameterized_type_reference); } }