public class DotJavaValidator extends AbstractDotJavaValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccess
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INVALID_EDGE_OPERATOR
Issue Code to indicate the usage of an invalid edge operator:
Usage of the directed edge operator in undirected graphs
Usage of the undirected edge operator in directed graphs
|
static java.lang.String |
REDUNDANT_ATTRIBUTE
Issue Code to indicate a redundant attribute
|
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
Constructor and Description |
---|
DotJavaValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkEdgeOpCorrespondsToGraphType(org.eclipse.gef.dot.internal.language.dot.EdgeRhsNode edgeRhsNode)
Ensures that within
EdgeRhsNode , '->' is used in directed
graphs, while '--' is used in undirected graphs. |
void |
checkEdgeOpCorrespondsToGraphType(org.eclipse.gef.dot.internal.language.dot.EdgeRhsSubgraph edgeRhsSubgraph)
Ensures that within
EdgeRhsSubgraph '->' is used in directed
graphs, while '--' is used in undirected graphs. |
void |
checkRecordLabelValue(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
Ensures that the label attribute value conforms to the recordLabel
subgrammar on nodes where the shape attribute is set to a
RecordBasedNodeShape . |
void |
checkRedundantAttribute(org.eclipse.gef.dot.internal.language.dot.AttrList attrList)
Checks that attribute lists do not contain the same attribute multiple
times; issues a warning for redundant attribute values.
|
void |
checkValidAttributeValue(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
Checks that within an
Attribute only valid attribute values are
used (dependent on context, in which the attribute is specified). |
void |
checkValidCombinationOfNodeShapeAndStyle(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
Ensures that the 'striped' node style is used only for
rectangularly-shaped nodes ('box', 'rect', 'rectangle' and 'square').
|
getEPackages
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, error, error, error, error, error, error, error, error, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
public static final java.lang.String INVALID_EDGE_OPERATOR
public static final java.lang.String REDUNDANT_ATTRIBUTE
public void checkValidAttributeValue(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
Attribute
only valid attribute values are
used (dependent on context, in which the attribute is specified).attribute
- The Attribute
to validate.public void checkValidCombinationOfNodeShapeAndStyle(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
attribute
- The node style attribute to validate.public void checkEdgeOpCorrespondsToGraphType(org.eclipse.gef.dot.internal.language.dot.EdgeRhsNode edgeRhsNode)
EdgeRhsNode
, '->' is used in directed
graphs, while '--' is used in undirected graphs.edgeRhsNode
- The EdgeRhsNode to validate.public void checkEdgeOpCorrespondsToGraphType(org.eclipse.gef.dot.internal.language.dot.EdgeRhsSubgraph edgeRhsSubgraph)
EdgeRhsSubgraph
'->' is used in directed
graphs, while '--' is used in undirected graphs.edgeRhsSubgraph
- The EdgeRhsSubgraph to validate.public void checkRecordLabelValue(org.eclipse.gef.dot.internal.language.dot.Attribute attribute)
RecordBasedNodeShape
.attribute
- The attribute to validate.public void checkRedundantAttribute(org.eclipse.gef.dot.internal.language.dot.AttrList attrList)
attrList
- An attribute list being checked.Copyright (c) 2014 itemis AG and others. All rights reserved.