org.eclipse.xtext.ui.editor.findrefs
Class OpenDocumentTracker

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.findrefs.OpenDocumentTracker

public class OpenDocumentTracker
extends java.lang.Object

Tracks open document to allow easy read access to their already loaded resources. As the tracking is separated from the access, this avoids deadlocks resulting from the lock order inversion of the UI lock and the document lock.

Author:
Jan Koehnlein - Initial contribution and API

Nested Class Summary
protected  class OpenDocumentTracker.PageListener
           
protected  class OpenDocumentTracker.PartListener
           
 
Constructor Summary
OpenDocumentTracker()
           
 
Method Summary
protected  Pair<org.eclipse.emf.common.util.URI,IXtextDocument> getEntry(org.eclipse.ui.IWorkbenchPartReference partRef)
           
 IXtextDocument getOpenDocument(org.eclipse.emf.common.util.URI resourceURI)
           
protected  org.eclipse.emf.common.util.URI getResourceURI(XtextEditor editor)
           
protected  void initialize(org.eclipse.ui.IWorkbench workbench)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenDocumentTracker

public OpenDocumentTracker()
Method Detail

initialize

@Inject
protected void initialize(org.eclipse.ui.IWorkbench workbench)

getEntry

protected Pair<org.eclipse.emf.common.util.URI,IXtextDocument> getEntry(org.eclipse.ui.IWorkbenchPartReference partRef)

getResourceURI

protected org.eclipse.emf.common.util.URI getResourceURI(XtextEditor editor)

getOpenDocument

public IXtextDocument getOpenDocument(org.eclipse.emf.common.util.URI resourceURI)