Java 类org.eclipse.jdt.core.search.SearchDocument 实例源码

项目:che    文件:IndexManager.java   
/**
 * Trigger addition of a resource to an index Note: the actual operation is performed in
 * background
 */
public void addBinary(IFile resource, IPath containerPath) {
  //        if (JavaCore.getPlugin() == null) return;
  SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
  SearchDocument document = participant.getDocument(resource.getFullPath().toString());
  IndexLocation indexLocation = computeIndexLocation(containerPath);
  scheduleDocumentIndexing(document, containerPath, indexLocation, participant);
}
项目:che    文件:IndexManager.java   
/**
 * Trigger addition of a resource to an index Note: the actual operation is performed in
 * background
 */
public void addSource(IFile resource, IPath containerPath, SourceElementParser parser) {
  //        if (JavaCore.getPlugin() == null) return;
  SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
  SearchDocument document = participant.getDocument(resource.getFullPath().toString());
  document.setParser(parser);
  IndexLocation indexLocation = computeIndexLocation(containerPath);
  scheduleDocumentIndexing(document, containerPath, indexLocation, participant);
}
项目:che    文件:IndexManager.java   
public void indexDocument(
    SearchDocument searchDocument,
    SearchParticipant searchParticipant,
    Index index,
    IPath indexLocation) {
  try {
    searchDocument.setIndex(index);
    searchParticipant.indexDocument(searchDocument, indexLocation);
  } finally {
    searchDocument.setIndex(null);
  }
}
项目:che    文件:IndexManager.java   
public void scheduleDocumentIndexing(
    final SearchDocument searchDocument,
    IPath container,
    final IndexLocation indexLocation,
    final SearchParticipant searchParticipant) {
  request(
      new IndexRequest(container, this) {
        public boolean execute(IProgressMonitor progressMonitor) {
          if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled())
            return true;

          /* ensure no concurrent write access to index */
          Index index =
              getIndex(
                  this.containerPath,
                  indexLocation,
                  true, /*reuse index file*/
                  true /*create if none*/);
          if (index == null) return true;
          ReadWriteMonitor monitor = index.monitor;
          if (monitor == null) return true; // index got deleted since acquired

          try {
            monitor.enterWrite(); // ask permission to write
            indexDocument(
                searchDocument,
                searchParticipant,
                index,
                new Path(indexLocation.getCanonicalFilePath()));
          } finally {
            monitor.exitWrite(); // free write lock
          }
          return true;
        }

        public String toString() {
          return "indexing " + searchDocument.getPath(); // $NON-NLS-1$
        }
      });
}
项目:Eclipse-Postfix-Code-Completion    文件:PossibleMatch.java   
public PossibleMatch(MatchLocator locator, IResource resource, Openable openable, SearchDocument document, boolean mustResolve) {
    this.resource = resource;
    this.openable = openable;
    this.document = document;
    this.nodeSet = new MatchingNodeSet(mustResolve);
    char[] qualifiedName = getQualifiedName();
    if (qualifiedName != null)
        this.compoundName = CharOperation.splitOn('.', qualifiedName);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PossibleMatch.java   
public PossibleMatch(MatchLocator locator, IResource resource, Openable openable, SearchDocument document, boolean mustResolve) {
    this.resource = resource;
    this.openable = openable;
    this.document = document;
    this.nodeSet = new MatchingNodeSet(mustResolve);
    char[] qualifiedName = getQualifiedName();
    if (qualifiedName != null)
        this.compoundName = CharOperation.splitOn('.', qualifiedName);
}
项目:Eclipse-Postfix-Code-Completion    文件:AbstractIndexer.java   
public AbstractIndexer(SearchDocument document) {
    this.document = document;
}
项目:Eclipse-Postfix-Code-Completion    文件:SourceIndexer.java   
public SourceIndexer(SearchDocument document) {
    super(document);
    this.requestor = new SourceIndexerRequestor(this);
}
项目:Eclipse-Postfix-Code-Completion    文件:BinaryIndexer.java   
public BinaryIndexer(SearchDocument document) {
    super(document);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AbstractIndexer.java   
public AbstractIndexer(SearchDocument document) {
    this.document = document;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SourceIndexer.java   
public SourceIndexer(SearchDocument document) {
    super(document);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:BinaryIndexer.java   
public BinaryIndexer(SearchDocument document) {
    super(document);
}