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

java.lang.Object
  extended by org.eclipse.wst.jsdt.internal.core.search.indexing.InternalSearchDocument
      extended by org.eclipse.wst.jsdt.core.search.SearchDocument
          extended by org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument
              extended by org.eclipse.wst.jsdt.web.core.javascript.search.JSDTSearchDocumentDelegate

public class JSDTSearchDocumentDelegate
extends org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument

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) Wrapper method to set getPath() path to be the path of the compilation unit for the jsp file. (since it's a final method, it needs to be set via constructor)


Constructor Summary
JSDTSearchDocumentDelegate(JsSearchDocument jspSearchDoc)
           
 
Method Summary
 byte[] getByteContents()
          Returns the contents of this document.
 char[] getCharContents()
          Returns the contents of this document.
 java.lang.String getEncoding()
          Returns the encoding for this document.
 IFile getFile()
           
 IJavaScriptElement getJavaElement()
           
 java.lang.String getJavaText()
           
 IJsTranslation getJspTranslation()
           
 boolean isVirtual()
           
 void release()
           
 
Methods inherited from class org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument
getPackageName, toString
 
Methods inherited from class org.eclipse.wst.jsdt.core.search.SearchDocument
addIndexEntry, getParticipant, getPath, removeAllIndexEntries
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JSDTSearchDocumentDelegate

public JSDTSearchDocumentDelegate(JsSearchDocument jspSearchDoc)
Method Detail

getByteContents

public byte[] getByteContents()
Description copied from class: SearchDocument
Returns the contents of this document. Contents may be different from actual resource at corresponding document path, in case of preprocessing.

This method must be implemented in subclasses.

Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.

Overrides:
getByteContents in class org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument
Returns:
the contents of this document, or null if none

getCharContents

public char[] getCharContents()
Description copied from class: SearchDocument
Returns the contents of this document. Contents may be different from actual resource at corresponding document path due to preprocessing.

This method must be implemented in subclasses.

Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.

Overrides:
getCharContents in class org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument
Returns:
the contents of this document, or null if none

getJavaText

public java.lang.String getJavaText()

getEncoding

public java.lang.String getEncoding()
Description copied from class: SearchDocument
Returns the encoding for this document.

This method must be implemented in subclasses.

Overrides:
getEncoding in class org.eclipse.wst.jsdt.internal.core.search.JavaSearchDocument
Returns:
the encoding for this document, or null if none

getFile

public IFile getFile()

getJspTranslation

public IJsTranslation getJspTranslation()

release

public void release()

getJavaElement

public IJavaScriptElement getJavaElement()
Overrides:
getJavaElement in class SearchDocument

isVirtual

public boolean isVirtual()
Overrides:
isVirtual in class SearchDocument