@Test public void mustStartAtLineStart() { assertTrue(new CommentBlock().canStart("###. comment", 0)); assertFalse(new CommentBlock().canStart(" ###. comment", 0)); assertFalse(new CommentBlock().canStart(" ###. comment", 1)); }
@Override public boolean canStart(String line, int lineOffset) { blockLineCount = 0; if (lineOffset == 0) { matcher = startPattern.matcher(line); return matcher.matches(); } else { matcher = null; return false; } }
CommentBlock extends Block { @Override public boolean canStart(String line, int lineOffset) { blockLineCount = 0; if (lineOffset == 0) { matcher = startPattern.matcher(line); return matcher.matches(); } else { matcher = null; return false; } } }
CommentBlock extends Block { @Override public boolean canStart(String line, int lineOffset) { blockLineCount = 0; if (lineOffset == 0) { matcher = startPattern.matcher(line); return matcher.matches(); } else { matcher = null; return false; } } CommentBlock(); }
CommentBlock extends Block { @Override public boolean canStart(String line, int lineOffset) { blockLineCount = 0; if (lineOffset == 0) { matcher = startPattern.matcher(line); return matcher.matches(); } else { matcher = null; return false; } } CommentBlock(); @Override int processLineContent(String line, int offset); @Override boolean canStart(String line, int lineOffset); }
CommentBlock extends Block { @Override public boolean canStart(String line, int lineOffset) { blockLineCount = 0; if (lineOffset == 0) { matcher = startPattern.matcher(line); return matcher.matches(); } else { matcher = null; return false; } } CommentBlock(); @Override int processLineContent(String line, int offset); @Override boolean canStart(String line, int lineOffset);  }