public abstract class StacktraceFingerprintingCompletionRecoveryStrategy<E extends java.lang.Exception> extends java.lang.Object implements CompletionRecoveryStrategy<E>
stream = module (| module)*
,
the pseudo code for the parser may look like
stream() {
module(); (1)
while(moreInput()) {
swallowPipe();
module(); (2)
}
}
In that setup, whether we're dealing with the first module, or a subsequent module, stack frames would be different
(see (1) and (2)).Constructor and Description |
---|
StacktraceFingerprintingCompletionRecoveryStrategy(XDParser parser,
java.lang.Class<E> exceptionClass,
java.lang.String... samples)
Construct a new StacktraceFingerprintingCompletionRecoveryStrategy given the parser, and the expected exception
class to be thrown for sample fragments of a stream definition that is to be parsed.
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldTrigger(java.lang.String dslStart,
java.lang.Exception exception,
CompletionKind kind)
Whether this completion should be triggered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProposals
protected final XDParser parser
public StacktraceFingerprintingCompletionRecoveryStrategy(XDParser parser, java.lang.Class<E> exceptionClass, java.lang.String... samples)
parser
- the parser used to parse the sample fragment stream definitions.exceptionClass
- the expected exception that results from parsing the sample fragment stream definitions.
Stack frames from the thrown exception are used to store the fingerprint of this exception thrown by the
parser.samples
- the sample fragments of stream definitions.public boolean shouldTrigger(java.lang.String dslStart, java.lang.Exception exception, CompletionKind kind)
CompletionRecoveryStrategy
shouldTrigger
in interface CompletionRecoveryStrategy<E extends java.lang.Exception>