1 11 package org.eclipse.jdt.internal.core; 12 13 import java.util.HashMap ; 14 15 import org.eclipse.jdt.core.IJavaElement; 16 import org.eclipse.jdt.core.ISourceRange; 17 18 public class CompilationUnitElementInfo extends OpenableElementInfo { 19 20 23 protected int sourceLength; 24 25 29 protected long timestamp; 30 31 35 public HashMap annotationPositions; 36 37 public void addAnnotationPositions(IJavaElement handle, long[] positions) { 38 if (positions == null) return; 39 if (this.annotationPositions == null) 40 this.annotationPositions = new HashMap (); 41 this.annotationPositions.put(handle, positions); 42 } 43 46 public int getSourceLength() { 47 return this.sourceLength; 48 } 49 protected ISourceRange getSourceRange() { 50 return new SourceRange(0, this.sourceLength); 51 } 52 55 public void setSourceLength(int newSourceLength) { 56 this.sourceLength = newSourceLength; 57 } 58 } 59 | Popular Tags |