![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Interface for reporting messages like errors or info. More...
Inherited by org.lflang.DefaultMessageReporter, org.lflang.MessageReporterBase, and org.lflang.federated.generator.LineAdjustingMessageReporter.
Classes | |
| interface | Stage2 |
| Interface to report a message with a specific severity. More... | |
Public Member Functions | |
| Stage2 | at (EObject node) |
| Position the message on the given node (must be non-null). | |
| Stage2 | at (EObject node, EStructuralFeature feature) |
| Position the message on the given node and structural feature (both must be non-null). | |
| default Stage2 | at (Path file) |
| Position the message in the file (non-null), at an unknown line. | |
| default Stage2 | at (Path file, int line) |
| Position the message in the file (non-null), on the given line. | |
| default Stage2 | at (Path file, Position pos) |
| Position the message in the file, using a position object. | |
| Stage2 | at (Path file, Range range) |
| Position the message on the given range in a given file (both must be non-null). | |
| default Stage2 | atNullableLine (Path file, Integer line) |
| Position the message in the given file. | |
| default void | clearHistory () |
| Clear error history, if exists. | |
| boolean | getErrorsOccurred () |
| Check if errors where reported. | |
| Stage2 | nowhere () |
| Specify that the message has no relevant position, ie it does not belong to a particular file. | |
Interface for reporting messages like errors or info.
This interface is a staged builder: first call one of the at methods to specify the position of the message, then use one of the report methods on the returned Stage2 instance.
Examples:
| Stage2 org.lflang.MessageReporter.at | ( | EObject | node | ) |
Position the message on the given node (must be non-null).
Implemented in org.lflang.federated.generator.LineAdjustingMessageReporter, and org.lflang.MessageReporterBase.
| Stage2 org.lflang.MessageReporter.at | ( | EObject | node, |
| EStructuralFeature | feature ) |
Position the message on the given node and structural feature (both must be non-null).
Implemented in org.lflang.federated.generator.LineAdjustingMessageReporter, and org.lflang.MessageReporterBase.
| default Stage2 org.lflang.MessageReporter.at | ( | Path | file | ) |
Position the message in the file (non-null), at an unknown line.
Implementations usually will report on the first line of the file.
| default Stage2 org.lflang.MessageReporter.at | ( | Path | file, |
| int | line ) |
Position the message in the file (non-null), on the given line.
Implemented in org.lflang.federated.generator.LineAdjustingMessageReporter, and org.lflang.generator.LanguageServerMessageReporter.
Position the message in the file, using a position object.
Position the message on the given range in a given file (both must be non-null).
Implemented in org.lflang.federated.generator.LineAdjustingMessageReporter, and org.lflang.MessageReporterBase.
| default Stage2 org.lflang.MessageReporter.atNullableLine | ( | Path | file, |
| Integer | line ) |
Position the message in the given file.
The line may be null. This is a convenience wrapper that calls either at(Path, int) or at(Path).
| default void org.lflang.MessageReporter.clearHistory | ( | ) |
Clear error history, if exists.
This is usually only the case for error markers in Epoch (Eclipse).
Implemented in org.lflang.MessageReporterBase.
| boolean org.lflang.MessageReporter.getErrorsOccurred | ( | ) |
Check if errors where reported.
Implemented in org.lflang.cli.StandaloneMessageReporter, org.lflang.federated.generator.LineAdjustingMessageReporter, org.lflang.federated.generator.SynchronizedMessageReporter, org.lflang.generator.LanguageServerMessageReporter, and org.lflang.MessageReporterBase.
| Stage2 org.lflang.MessageReporter.nowhere | ( | ) |
Specify that the message has no relevant position, ie it does not belong to a particular file.
Implemented in org.lflang.federated.generator.LineAdjustingMessageReporter, and org.lflang.MessageReporterBase.