org.eclipse.wst.jsdt.web.core.javascript.search
Class JsSearchScope

java.lang.Object
  extended by org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchScope
All Implemented Interfaces:
IJavaScriptSearchScope

public class JsSearchScope
extends java.lang.Object
implements IJavaScriptSearchScope

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. (copied from JSP) Used to constrain JSP/java search to certain paths and elements.


Field Summary
 
Fields inherited from interface org.eclipse.wst.jsdt.core.search.IJavaScriptSearchScope
APPLICATION_LIBRARIES, JAR_FILE_ENTRY_SEPARATOR, REFERENCED_PROJECTS, SOURCES, SYSTEM_LIBRARIES
 
Constructor Summary
JsSearchScope()
           
JsSearchScope(IJavaScriptElement[] javaElement)
           
JsSearchScope(java.lang.String[] resourceStringPath)
           
 
Method Summary
 void addElement(IJavaScriptElement element)
           
 void addPath(java.lang.String path)
           
 boolean encloses(IJavaScriptElement element)
          Checks whether this scope encloses the given element.
 boolean encloses(java.lang.String resourcePathString)
          Checks whether the resource at the given path is enclosed by this scope.
 IPath[] enclosingProjectsAndJars()
          Returns the paths to the enclosing projects and JARs for this search scope.
 java.lang.String getDescription()
           
 boolean shouldExclude(java.lang.String container, java.lang.String resourceName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsSearchScope

public JsSearchScope()

JsSearchScope

public JsSearchScope(java.lang.String[] resourceStringPath)

JsSearchScope

public JsSearchScope(IJavaScriptElement[] javaElement)
Method Detail

encloses

public boolean encloses(java.lang.String resourcePathString)
Description copied from interface: IJavaScriptSearchScope
Checks whether the resource at the given path is enclosed by this scope.

Specified by:
encloses in interface IJavaScriptSearchScope
Parameters:
resourcePathString - if the resource is contained in a JAR file, the path is composed of 2 paths separated by JAR_FILE_ENTRY_SEPARATOR: the first path is the full OS path to the JAR (if it is an external JAR), or the workspace relative IPath to the JAR (if it is an internal JAR), the second path is the path to the resource inside the JAR.
Returns:
whether the resource is enclosed by this scope

encloses

public boolean encloses(IJavaScriptElement element)
Description copied from interface: IJavaScriptSearchScope
Checks whether this scope encloses the given element.

Specified by:
encloses in interface IJavaScriptSearchScope
Parameters:
element - the given element
Returns:
true if the element is in this scope

addPath

public void addPath(java.lang.String path)

addElement

public void addElement(IJavaScriptElement element)

getDescription

public java.lang.String getDescription()

enclosingProjectsAndJars

public IPath[] enclosingProjectsAndJars()
Description copied from interface: IJavaScriptSearchScope
Returns the paths to the enclosing projects and JARs for this search scope.

Specified by:
enclosingProjectsAndJars in interface IJavaScriptSearchScope
Returns:
an array of paths to the enclosing projects and JARS.

shouldExclude

public boolean shouldExclude(java.lang.String container,
                             java.lang.String resourceName)
Specified by:
shouldExclude in interface IJavaScriptSearchScope