1 11 package org.eclipse.jface.text.revisions; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.jface.text.source.ILineRange; 16 17 18 23 public final class RevisionRange implements ILineRange { 24 private final Revision fRevision; 25 private final int fStartLine; 26 private final int fNumberOfLines; 27 28 RevisionRange(Revision revision, ILineRange range) { 29 Assert.isLegal(revision != null); 30 fRevision= revision; 31 fStartLine= range.getStartLine(); 32 fNumberOfLines= range.getNumberOfLines(); 33 } 34 35 40 public Revision getRevision() { 41 return fRevision; 42 } 43 44 47 public int getStartLine() { 48 return fStartLine; 49 } 50 51 54 public int getNumberOfLines() { 55 return fNumberOfLines; 56 } 57 58 61 public String toString() { 62 return "RevisionRange [" + fRevision.toString() + ", [" + getStartLine() + "+" + getNumberOfLines() + ")]"; } 64 } 65 | Popular Tags |