public abstract class ExpressionTranslator extends MessageReceiver
| Modifier and Type | Field and Description |
|---|---|
private int |
errorCount
Stores the number of errors.
|
private java.util.Map<Message,Message> |
map |
private java.util.List<Message> |
messages
Stores the messages.
|
| Constructor and Description |
|---|
ExpressionTranslator()
Creates an expression translator (to be used within this package only).
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearMessages(ModelInfo<?> info)
Clears all messages registered for
info. |
void |
clearMessages(java.net.URI uri)
Clears all messages registered for the resource
uri. |
void |
collect(IMessage message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives an EASy message.
|
void |
error(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic)
Adds a diagnostic error, typically from a standalone parser
configuration.
|
void |
error(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives an error message.
|
private Message |
errorImpl(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives an error message.
|
int |
getErrorCount()
Returns the number of errors.
|
Message |
getMessage(int index)
Returns the specified message.
|
int |
getMessageCount()
Returns the number of messages.
|
private static org.eclipse.emf.common.util.URI |
getURI(org.eclipse.emf.ecore.EObject object)
Returns the resource URI of
object. |
private static boolean |
sameURIs(java.net.URI uri,
org.eclipse.emf.ecore.EObject cause)
Checks whether
uri and the URI of cause are the same. |
void |
warning(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives a warning message.
|
private Message |
warningImpl(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
Receives a warning message.
|
errorprivate java.util.List<Message> messages
private int errorCount
public ExpressionTranslator()
public int getMessageCount()
MessageReceivergetMessageCount in class MessageReceiverpublic int getErrorCount()
MessageReceivergetErrorCount in class MessageReceiverpublic Message getMessage(int index)
MessageReceivergetMessage in class MessageReceiverindex - the position of the message to be returnedprivate static org.eclipse.emf.common.util.URI getURI(org.eclipse.emf.ecore.EObject object)
object.object - the objectprivate Message errorImpl(java.lang.String message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature, int code)
message - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the errorprivate Message warningImpl(java.lang.String message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature, int code)
message - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the warningpublic void error(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the errorpublic void warning(java.lang.String message,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature,
int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the warningpublic void collect(IMessage message, org.eclipse.emf.ecore.EObject cause, org.eclipse.emf.ecore.EStructuralFeature causeFeature, int code)
IMessageReceivermessage - the messagecause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
IvmlPackage.Literalscode - a numerical identification of the errorpublic void error(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic)
error in class MessageReceiverdiagnostic - the diagnostic to be addedpublic void clearMessages(ModelInfo<?> info)
info.info - the information object to clear the messages forpublic void clearMessages(java.net.URI uri)
uri.uri - the URI to clear the messages forprivate static boolean sameURIs(java.net.URI uri,
org.eclipse.emf.ecore.EObject cause)
uri and the URI of cause are the same.uri - the URI to checkcause - the cause object to checktrue if both are the same, false else also if nullCopyright © 2009 - 2018 SSE. All Rights Reserved.