Java Code Examples for org.parboiled.common.StringUtils

The following examples show how to use org.parboiled.common.StringUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void visit(OrderedListNode oln) {

    ++listLevel;
    try {
        _buffer.append('\n');
        for (Node child : oln.getChildren()) {
            _buffer.append( StringUtils.repeat('#', listLevel) ).append(' ');
            child.accept(this);
            _buffer.append('\n');
        }
        _buffer.append('\n');
    }finally {
        --listLevel;
    }

}
 
Example 2
@Override
public void visit(BulletListNode bln) {

    ++listLevel;
    try {
        _buffer.append('\n');
        for (Node child : bln.getChildren()) {
            _buffer.append( StringUtils.repeat('*', listLevel) ).append(' ');
            child.accept(this);
            _buffer.append('\n');
        }
        _buffer.append('\n');
    }finally {
        --listLevel;
    }
}
 
Example 3
Source Project: blueocean-plugin   Source File: GithubEnterpriseScm.java    License: MIT License 5 votes vote down vote up
@Override
public @Nonnull String getUri() {
    String apiUri = getCustomApiUri();

    // NOTE: GithubEnterpriseScm requires that the apiUri be specified
    if (StringUtils.isEmpty(apiUri)) {
        throw new ServiceException.BadRequestException(new ErrorMessage(400, "apiUrl is required parameter"));
    }

    return apiUri;
}