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

java.lang.Object
  extended by org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchDocument

public class JsSearchDocument
extends java.lang.Object

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) Created with a .jsp file, but should appear to be a .java file for indexing and searching purposes. There are purposely few fields in this class, and those fields are lightweight since it's possible for many JSP search documents to exist in memory at one time (eg. after importing a project with a large number of JSP files)


Constructor Summary
JsSearchDocument(java.lang.String filePath, SearchParticipant participant)
           
 
Method Summary
 byte[] getByteContents()
           
 char[] getCharContents()
           
 java.lang.String getEncoding()
           
 IFile getFile()
           
 java.lang.String getJavaText()
           
 IJsTranslation getJSPTranslation()
          It's not recommended for clients to hold on to this JSPTranslation since it's kind of large.
 SearchParticipant getParticipant()
           
 java.lang.String getPath()
          the path to the Java compilation unit
 void release()
           
 java.lang.String toString()
          for debugging
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsSearchDocument

public JsSearchDocument(java.lang.String filePath,
                        SearchParticipant participant)
Parameters:
file -
participant -
Throws:
CoreException
Method Detail

getParticipant

public SearchParticipant getParticipant()

getCharContents

public char[] getCharContents()
See Also:
org.eclipse.jdt.core.search.SearchDocument#getCharContents()

getJavaText

public java.lang.String getJavaText()

getJSPTranslation

public final IJsTranslation getJSPTranslation()
It's not recommended for clients to hold on to this JSPTranslation since it's kind of large. If possible, hold on to the JSPSearchDocument, which is more of a lightweight proxy.

Returns:
the JSPTranslation for the jsp file, or null if it's an unsupported file.

getPath

public java.lang.String getPath()
the path to the Java compilation unit

See Also:
org.eclipse.jdt.core.search.SearchDocument#getPath()

getFile

public IFile getFile()

release

public void release()

toString

public java.lang.String toString()
for debugging

Overrides:
toString in class java.lang.Object

getEncoding

public java.lang.String getEncoding()

getByteContents

public byte[] getByteContents()