Class GraphicalSchemeValidator
- java.lang.Object
-
- org.eclipse.xtext.validation.AbstractInjectableValidator
-
- org.eclipse.xtext.validation.AbstractDeclarativeValidator
-
- com._1c.g5.modeling.xtext.validation.AbstractModelDeclarativeValidator
-
- com._1c.g5.v8.dt.bp.scheme.validation.GraphicalSchemeValidator
-
- All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator
,org.eclipse.xtext.validation.ValidationMessageAcceptor
public class GraphicalSchemeValidator extends AbstractModelDeclarativeValidator
Validator for graphical scheme (bp scheme).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccess
-
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
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
-
-
Constructor Summary
Constructors Constructor Description GraphicalSchemeValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkConditionOutgoingLines(GraphicalScheme scheme)
Checks condition points outgoing lines.void
checkForAddressingAttributesValuesExistance(GraphicalScheme scheme)
Checks if "Action" elements addressing attributes values exist.void
checkForConditionEventHandler(EventHandler eventHandler)
Checks if condition point have event handler.void
checkForCycles(GraphicalScheme scheme)
Checks if scheme contains cycles which does not contain one of "Activity", "Sub Bp" or "Processing".void
checkForJoinIncomingConnectionsCount(GraphicalScheme scheme)
Checks for join point incoming connections count.void
checkForLineTargetExistence(GraphicalSchemeItem item)
Checks if line connected to target.void
checkForPathToCompletion(GraphicalScheme scheme)
Checks if there is path to completion point on scheme.void
checkForPointConnectionToCompletion(GraphicalScheme scheme)
Checks if scheme point connected to completion.void
checkForPointIncomingLineExistence(GraphicalScheme scheme)
Checks if scheme points has incoming line (except start point and decoration point).void
checkForSeveralSplitOutgoingToOnePoint(GraphicalScheme scheme)
Check for split point outgoing connections targets.void
checkForSplitOutgoingConnectionsCount(GraphicalScheme scheme)
Checks for split points ougoing connections count.void
checkForStartPointExistence(GraphicalScheme scheme)
Checks if there is start point on scheme.void
checkForSwitchEventHandler(EventHandler eventHandler)
Checks if switch point have event handler.void
checkHandlerForExistance(EventHandler eventHandler)
Checks if event handler exists in business process object module.void
checkIncomingToJoinConnections(GraphicalScheme scheme)
Checks for incoming to join point connections.void
checkSplitToJoinConnections(GraphicalScheme scheme)
Checks split points outgoing connections.void
checkSubBpPoints(GraphicalSchemeItem item)
Checks if sub busines process point have sub process or needed event handlers.void
checkSwitchItem(GraphicalSchemeItem item)
Checks switch points for case count.void
checkSwitchOutgoingLines(GraphicalScheme scheme)
Checks switch point outgoing lines.protected String
getCurrentLanguage(Map<Object,Object> context, org.eclipse.emf.ecore.EObject eObject)
protected List<org.eclipse.emf.ecore.EPackage>
getEPackages()
Returns list ofEPackage
s for wich this validotor will be registered.-
Methods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
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, getCancelIndicator, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, handleExceptionDuringValidation, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
-
-
-
-
Method Detail
-
checkForStartPointExistence
public void checkForStartPointExistence(GraphicalScheme scheme)
Checks if there is start point on scheme. If not fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForPathToCompletion
public void checkForPathToCompletion(GraphicalScheme scheme)
Checks if there is path to completion point on scheme. If not fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForPointIncomingLineExistence
public void checkForPointIncomingLineExistence(GraphicalScheme scheme)
Checks if scheme points has incoming line (except start point and decoration point). If point does not have incoming line fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForLineTargetExistence
public void checkForLineTargetExistence(GraphicalSchemeItem item)
Checks if line connected to target. If line has no target fires error.- Parameters:
item
- - graphical scheme item to check
-
checkForPointConnectionToCompletion
public void checkForPointConnectionToCompletion(GraphicalScheme scheme)
Checks if scheme point connected to completion. In original "Configurator" if point connected to other point it also connected to completion.
If point does not connected to completion fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForConditionEventHandler
public void checkForConditionEventHandler(EventHandler eventHandler)
Checks if condition point have event handler. If condition point does not have event handler fires error.- Parameters:
eventHandler
- - event handler check. Can't benull
.
-
checkForSwitchEventHandler
public void checkForSwitchEventHandler(EventHandler eventHandler)
Checks if switch point have event handler. If switch point does not have event handler fires error.- Parameters:
eventHandler
- - event handler to check. Can't benull
.
-
checkSubBpPoints
public void checkSubBpPoints(GraphicalSchemeItem item)
Checks if sub busines process point have sub process or needed event handlers. If sub busines process point does not have sub process or needed event handlers fires error.- Parameters:
item
- - graphical scheme item to check. Can't benull
.
-
checkForSplitOutgoingConnectionsCount
public void checkForSplitOutgoingConnectionsCount(GraphicalScheme scheme)
Checks for split points ougoing connections count. If split point has only one outgoing connections fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForSeveralSplitOutgoingToOnePoint
public void checkForSeveralSplitOutgoingToOnePoint(GraphicalScheme scheme)
Check for split point outgoing connections targets. If several connections outgoing from one split point have one target point fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForJoinIncomingConnectionsCount
public void checkForJoinIncomingConnectionsCount(GraphicalScheme scheme)
Checks for join point incoming connections count. If join point has only one incoming connection fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForAddressingAttributesValuesExistance
public void checkForAddressingAttributesValuesExistance(GraphicalScheme scheme)
Checks if "Action" elements addressing attributes values exist. If addressing attribute value cannot be resolved fires error.- Parameters:
scheme
- - graphical scheme. Cannot benull
.
-
checkSplitToJoinConnections
public void checkSplitToJoinConnections(GraphicalScheme scheme)
Checks split points outgoing connections. If connections goes from split point immideately to join point fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkIncomingToJoinConnections
public void checkIncomingToJoinConnections(GraphicalScheme scheme)
Checks for incoming to join point connections. If connection does not go from split point fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkForCycles
public void checkForCycles(GraphicalScheme scheme)
Checks if scheme contains cycles which does not contain one of "Activity", "Sub Bp" or "Processing". If cycle does not containing "Activity", "Sub Bp" or "Processing" was found fires error.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkSwitchItem
public void checkSwitchItem(GraphicalSchemeItem item)
Checks switch points for case count. if switch point has one case fires warning.- Parameters:
item
- - item to check. Can't benull
.
-
checkConditionOutgoingLines
public void checkConditionOutgoingLines(GraphicalScheme scheme)
Checks condition points outgoing lines. If both lines enters one point fires warning.- Parameters:
scheme
- - graphical scheme. Can't benull
.
-
checkSwitchOutgoingLines
public void checkSwitchOutgoingLines(GraphicalScheme scheme)
Checks switch point outgoing lines. If several lines enters one point fires warning- Parameters:
scheme
-
-
checkHandlerForExistance
public void checkHandlerForExistance(EventHandler eventHandler)
Checks if event handler exists in business process object module. If event handler does not exist in business process module fires warning.- Parameters:
eventHandler
- - event handler to check. Can't benull
.
-
getEPackages
protected List<org.eclipse.emf.ecore.EPackage> getEPackages()
Description copied from class:AbstractModelDeclarativeValidator
Returns list ofEPackage
s for wich this validotor will be registered.- Specified by:
getEPackages
in classAbstractModelDeclarativeValidator
-
getCurrentLanguage
protected String getCurrentLanguage(Map<Object,Object> context, org.eclipse.emf.ecore.EObject eObject)
- Overrides:
getCurrentLanguage
in classAbstractModelDeclarativeValidator
-
-