Example usage for org.eclipse.jdt.core.dom Javadoc subtreeMatch

List of usage examples for org.eclipse.jdt.core.dom Javadoc subtreeMatch

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom Javadoc subtreeMatch.

Prototype

public final boolean subtreeMatch(ASTMatcher matcher, Object other) 

Source Link

Document

Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher.

Usage

From source file:de.fkoeberle.autocommit.message.java.helper.delta.DeclarationDelta.java

License:Open Source License

/**
 * /*ww w .  ja  v  a  2s  .  c  om*/
 * @return true if the javadoc element of this declaration has been changed
 *         and false otherwise. Ignores javadoc on child elements.
 */
private final boolean containsJavaDocChanges() {
    Javadoc oldJavaDoc = oldDeclaration.getJavadoc();
    Javadoc newJavaDoc = newDeclaration.getJavadoc();
    if (oldJavaDoc == null || newJavaDoc == null) {
        return (oldJavaDoc != newJavaDoc);
    } else {
        return (!oldJavaDoc.subtreeMatch(new ASTMatcher(true), newJavaDoc));
    }
}