public interface ICodeParser
| Modifier and Type | Method and Description |
|---|---|
ICompletionContext |
getContext(IScriptEngine scriptEngine,
java.lang.Object resource,
java.lang.String contents,
int position,
int selectionRange)
Parse the given piece of code into a language specific
ICompletionContext. |
java.lang.String |
getHeaderComment(java.io.InputStream stream)
Parses the file for a comment section at the beginning.
|
SignatureInfo |
getSignatureInfo(java.io.InputStream stream)
Gets signature, certificates, provider and message-digest algorithm of signature, and content excluding signature block.
|
boolean |
isAcceptedBeforeHeader(java.lang.String line)
Verify if a line of code is accepted before the header comment section.
|
java.lang.String getHeaderComment(java.io.InputStream stream)
stream - code content streamboolean isAcceptedBeforeHeader(java.lang.String line)
line - line of codetrue when line is accepted before the comment headerICompletionContext getContext(IScriptEngine scriptEngine, java.lang.Object resource, java.lang.String contents, int position, int selectionRange)
ICompletionContext.scriptEngine - running script engineresource - resource instance to be parsedcontents - code to be parsed (only up to cursor position)position - cursor position within contentsselectionRange - amount of selected characters from cursor positionICompletionContext with parsed information if successful, null in case invalid syntax given.SignatureInfo getSignatureInfo(java.io.InputStream stream) throws ScriptSignatureException
stream - provide InputStream to get signature fromSignatureInfo instance containing signature, certificates, provider and message-digest algorithm, and content excluding signature block
or null if signature is not found or is not in proper formatScriptSignatureException - when there is text after signature block or error occurs while reading from provided input stream