Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.ide.dependency
Interface ReferenceProvider

All Known Implementing Classes:
IndexReferenceProvider

public interface ReferenceProvider

Provides Reference instances. A ReferenceProvider can be registered through the extension manifest, or using DependencyManager.addReferenceProvider(oracle.ide.dependency.ReferenceProvider).


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.
 Reference getReference(Context context)
          Get the reference for the given context, or null if there is no reference in this context.
 java.util.Collection<? extends Reference> getReferences(Context context, Node node)
          Get all references for a Node.
 

Method Detail

canGetReference

boolean canGetReference(Context context)
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.

Parameters:
context - the context
Returns:
true if this provider may have a reference in the context, false otherwise

getReference

Reference getReference(Context context)
Get the reference for the given context, or null if there is no reference in this context. This will only be called if canGetReference(oracle.ide.Context) returned true for this context.

Parameters:
context - the context
Returns:
the reference

canGetReferences

boolean canGetReferences(Context context,
                         Node node)
Determine whether this provider can get references for a Node.

Parameters:
context - the context
node - the Node
Returns:
true if the provider can get references for this Node, false otherwise

getReferences

java.util.Collection<? extends Reference> getReferences(Context context,
                                                        Node node)
                                                        throws java.lang.InterruptedException
Get all references for a Node.

Parameters:
context - the context
node - the Node
Returns:
the references
Throws:
java.lang.InterruptedException - if the operation is interrupted

canFindReferences

boolean canFindReferences(Context context,
                          Scope scope,
                          Declaration declaration)
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.

Parameters:
context - the context
declaration - the declaration
Returns:
true if this provider can find references to the declaration, false otherwise

findReferences

java.util.Collection<? extends Reference> findReferences(Context context,
                                                         Scope scope,
                                                         Declaration declaration,
                                                         ProgressIndicator progress)
                                                         throws java.lang.InterruptedException
Find all references to the given declaration that this provider knows about. This will only be called if canFindReferences(Context, Scope, Declaration) returns true for this context and declaration.

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

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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