metricsOverlay.handlers
Class DocumentTracker
java.lang.Object
metricsOverlay.handlers.DocumentTracker
public class DocumentTracker
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static DocumentTracker getInstance()
addMetricFile
public void addMetricFile(MetricFile mFile)
getAllMetricFiles
public java.util.Set<MetricFile> getAllMetricFiles()
getFile
public MetricFile getFile(org.eclipse.core.runtime.IPath path)
remove
public void remove(org.eclipse.core.runtime.IPath path)
numFiles
public int numFiles()
getWorkbenchPart
public static org.eclipse.ui.IWorkbenchPart getWorkbenchPart(org.eclipse.jface.text.IDocument doc,
boolean restore)
- A static method to get the workbench part from a document.
- Parameters:
doc
- the document
- Returns:
- the workbench part corresponding to the document
getActiveJavaEditor
public static org.eclipse.ui.IWorkbenchPart getActiveJavaEditor()
getDocumentFromPart
public static org.eclipse.jface.text.IDocument getDocumentFromPart(org.eclipse.ui.IWorkbenchPart part)
getPathFromDocument
public static org.eclipse.core.runtime.IPath getPathFromDocument(org.eclipse.jface.text.IDocument doc)
convertRelativePathToAbsolute
public static org.eclipse.core.runtime.IPath convertRelativePathToAbsolute(org.eclipse.core.runtime.IPath path)
contains
public boolean contains(MetricFile mf)