|
org.netbeans.modules.parsing.api/1 1.55.0 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.parsing.api.ParserManager
public final class ParserManager
ParserManager allows to start priority parsing request for one or more sources.
| Method Summary | |
|---|---|
static void |
parse(Collection<Source> sources,
UserTask userTask)
Priority request for parsing of list of Sources. |
static void |
parse(String mimeType,
UserTask userTask)
Runs given task in parser thread. |
static Future<Void> |
parseWhenScanFinished(Collection<Source> sources,
UserTask userTask)
Performs the given task when the scan finished. |
static Future<Void> |
parseWhenScanFinished(String mimeType,
UserTask userTask)
Performs the given task when the scan finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void parse(@NonNull
Collection<Source> sources,
@NonNull
UserTask userTask)
throws ParseException
Sources. Implementator
of this task have full control over the process of parsing of embedded
languages. You can scan tree of embedded sources and start parsing for
all of them, or for some of them only.
This method is blocking. It means that only one parsing request per time
is allowed. But you can call another parsing request
from your Task. This secondary parsing request is called
immediately in the same thread (current thread).
This method is typically called as a response on some user request - during code completion for example.
sources - A list of sources that should be parsed.userTask - A task that will be started when parsing is done.
ParseException - encapsulating the user exception
@NonNull
public static Future<Void> parseWhenScanFinished(@NonNull
Collection<Source> sources,
@NonNull
UserTask userTask)
throws ParseException
UserTask
running this method waits until it's completed.
sources - A list of sources that should be parsed.userTask - A task started when parsing is done.
Future which can be used to find out the state of the task Future.isDone() or Future.isCancelled().
The caller may cancel the task using Future.cancel(boolean) or wait until the task is performed Future.get().
ParseException - encapsulating the user exception.
public static void parse(@NonNull
String mimeType,
@NonNull
UserTask userTask)
throws ParseException
mimetype - specifying the parseruserTask - a user task
ParseException - encapsulating the user exception
@NonNull
public static Future<Void> parseWhenScanFinished(@NonNull
String mimeType,
@NonNull
UserTask userTask)
throws ParseException
UserTask
running this method waits until it's completed.
mimetype - A mimetype specifying the parser.userTask - A task started when parsing is done.
Future which can be used to find out the state of the task Future.isDone() or Future.isCancelled().
The caller may cancel the task using Future.cancel(boolean) or wait until the task is performed Future.get().
ParseException - encapsulating the user exception.
|
org.netbeans.modules.parsing.api/1 1.55.0 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||