Example usage for org.eclipse.jdt.core.dom Comment setProperty

List of usage examples for org.eclipse.jdt.core.dom Comment setProperty

Introduction

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

Prototype

public final void setProperty(String propertyName, Object data) 

Source Link

Document

Sets the named property of this node to the given value, or to null to clear it.

Usage

From source file:org.eclipse.wb.internal.core.utils.ast.AstEditor.java

License:Open Source License

/**
 * When we replace region, we should remove {@link Comment} in it. We can not really remove them
 * (JDT returns unmodifiable list), so we mark them as removed.
 *//*from   ww w.  j a  v  a2  s  . c  o m*/
private void replaceSubstring_markRemovedComments(int begin, int length) {
    List<Comment> comments = DomGenerics.getCommentList(m_astUnit);
    for (Iterator<Comment> I = comments.iterator(); I.hasNext();) {
        Comment comment = I.next();
        if (AstNodeUtils.getSourceBegin(comment) >= begin
                && AstNodeUtils.getSourceEnd(comment) < begin + length) {
            comment.setProperty(REMOVED_COMMENT, Boolean.TRUE);
        }
    }
}