Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.ide.dependency.index
Class IndexReferenceProvider

java.lang.Object
  extended by oracle.ide.dependency.index.IndexReferenceProvider

All Implemented Interfaces:
ReferenceProvider

public abstract class IndexReferenceProvider
extends java.lang.Object
implements ReferenceProvider

Provides references stored in the index.


Constructor Summary
IndexReferenceProvider()
           

 

Method Summary
 boolean canFindReferences(Context context, Scope scope, Declaration declaration)
          Determine whether this provider can find references to a declaration.
 boolean canGetReference(Context context)
          Determine whether there could be a reference in the context.
 boolean canGetReferences(Context context, Node node)
          Determine whether this provider can get references for a Node.
 java.util.Collection<? extends Reference> findReferences(Context context, Scope scope, Declaration declaration, ProgressIndicator progress)
          Find all references to the given declaration that this provider knows about.
protected  ContentSet getContentSet(Context context, Project project, Declaration declaration)
          Get the content set that should be searched for references to a declaration.
 Reference getReference(Context context)
          Get the reference for the given context, or null if there is no reference in this context.
protected abstract  java.util.Collection<QueryCriteria> getReferenceCriteria(Context context, Declaration declaration)
          Get the index query criteria to use to search for references to a declaration.
 java.util.Collection<? extends Reference> getReferences(Context context, Node node)
          Get all references for a Node.
protected  boolean verify(Context context, IndexReference reference, Declaration declaration)
          Verify that a reference points to a declaration.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

IndexReferenceProvider

public IndexReferenceProvider()

Method Detail

getReferenceCriteria

protected abstract java.util.Collection<QueryCriteria> getReferenceCriteria(Context context,
                                                                            Declaration declaration)
Get the index query criteria to use to search for references to a declaration.
Parameters:
context - the context
declaration - the declaration
Returns:
the query critiera

getContentSet

protected ContentSet getContentSet(Context context,
                                   Project project,
                                   Declaration declaration)
Get the content set that should be searched for references to a declaration.
Parameters:
context - the context
project - the project being searched
declaration - the declaration
Returns:
the content set to search, or null to search the entire project

canGetReference

public boolean canGetReference(Context context)
Description copied from interface: ReferenceProvider
Determine whether there could be a reference in the context. The implementation of this method should be very fast, as it is called from the event thread to enable or disable dependency-related actions.
Specified by:
canGetReference in interface ReferenceProvider
Parameters:
context - the context
Returns:
true if this provider may have a reference in the context, false otherwise

getReference

public Reference getReference(Context context)
Description copied from interface: ReferenceProvider
Get the reference for the given context, or null if there is no reference in this context. This will only be called if ReferenceProvider.canGetReference(oracle.ide.Context) returned true for this context.
Specified by:
getReference in interface ReferenceProvider
Parameters:
context - the context
Returns:
the reference

canGetReferences

public boolean canGetReferences(Context context,
                                Node node)
Description copied from interface: ReferenceProvider
Determine whether this provider can get references for a Node.
Specified by:
canGetReferences in interface ReferenceProvider
Parameters:
context - the context
node - the Node
Returns:
true if the provider can get references for this Node, false otherwise

getReferences

public java.util.Collection<? extends Reference> getReferences(Context context,
                                                               Node node)
                                                        throws java.lang.InterruptedException
Description copied from interface: ReferenceProvider
Get all references for a Node.
Specified by:
getReferences in interface ReferenceProvider
Parameters:
context - the context
node - the Node
Returns:
the references
Throws:
java.lang.InterruptedException - if the operation is interrupted

canFindReferences

public boolean canFindReferences(Context context,
                                 Scope scope,
                                 Declaration declaration)
Description copied from interface: ReferenceProvider
Determine whether this provider can find references to a declaration. The implementation of this method should be very fast, as it is called from the event thread to enable or disable dependency-related actions.
Specified by:
canFindReferences in interface ReferenceProvider
Parameters:
context - the context
declaration - the declaration
Returns:
true if this provider can find references to the declaration, false otherwise

findReferences

public java.util.Collection<? extends Reference> findReferences(Context context,
                                                                Scope scope,
                                                                Declaration declaration,
                                                                ProgressIndicator progress)
                                                         throws java.lang.InterruptedException
Description copied from interface: ReferenceProvider
Find all references to the given declaration that this provider knows about. This will only be called if ReferenceProvider.canFindReferences(Context, Scope, Declaration) returns true for this context and declaration.
Specified by:
findReferences in interface ReferenceProvider
Parameters:
context - the context
declaration - the declaration to search for
progress - the progress indicator
Returns:
the references to the declaration
Throws:
java.lang.InterruptedException - if the operation is interrupted

verify

protected boolean verify(Context context,
                         IndexReference reference,
                         Declaration declaration)
                  throws java.lang.InterruptedException
Verify that a reference points to a declaration.
Parameters:
context - the context
reference - the reference
declaration - the declaration
Returns:
true if the reference matches the declaration, false otherwise
Throws:
java.lang.InterruptedException - if the operation is interrupted

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.