コード例 #1
0
ファイル: IndexManager.java プロジェクト: aptana/rdt
 /**
  * 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 (RubyCore.getPlugin() == null) return;
   SearchParticipant participant = BasicSearchEngine.getDefaultSearchParticipant();
   SearchDocument document = participant.getDocument(resource.getFullPath().toString());
   ((InternalSearchDocument) document).parser = parser;
   IPath indexLocation = computeIndexLocation(containerPath);
   scheduleDocumentIndexing(document, containerPath, indexLocation, participant);
 }
コード例 #2
0
ファイル: IndexManager.java プロジェクト: aptana/rdt
 public void indexDocument(
     SearchDocument searchDocument,
     SearchParticipant searchParticipant,
     Index index,
     IPath indexLocation) {
   try {
     ((InternalSearchDocument) searchDocument).index = index;
     searchParticipant.indexDocument(searchDocument, indexLocation);
   } finally {
     ((InternalSearchDocument) searchDocument).index = null;
   }
 }