<NME> SGraphJavaValidator.java
<BEF> /**
 * Copyright (c) 2012-2018 committers of YAKINDU and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     committers of YAKINDU - initial API and implementation
 */
package org.yakindu.sct.model.sgraph.validation;

import org.eclipse.xtext.validation.ComposedChecks;
import org.yakindu.sct.model.sgraph.SGraphPackage;

/**
 * Root validator for all elements contained in {@link SGraphPackage}
 * 
 * This validator is intended to be used by a compositeValidator (See
 * {@link org.eclipse.xtext.validation.ComposedChecks}) of another language
 * specific validator. It does not register itself as an EValidator.
 *
 *
 */
@ComposedChecks(validators = { 
		ResourceValidator.class, 
import org.yakindu.sct.model.sgraph.CompositeElement;
import org.yakindu.sct.model.sgraph.Entry;
import org.yakindu.sct.model.sgraph.EntryKind;
import org.yakindu.sct.model.sgraph.FinalState;
import org.yakindu.sct.model.sgraph.Region;
import org.yakindu.sct.model.sgraph.Synchronization;
		SynchronizationValidator.class,
		TransitionValidator.class, 
		VertexValidator.class })
public class SGraphJavaValidator extends AbstractSGraphValidator {

}
	public void transitionsWithNoGuard(Transition trans) {
		if (trans.getSource() instanceof Entry) {
			return;
		} else if(trans.getTrigger() == null){
			warning(ISSUE_TRANSITION_WITHOUT_GUARD, trans, null, -1);
		}
	}

<MSG> transitions without triggers will not show warnings when their source state is a composit state that contains a exit node
<DFF> @@ -27,6 +27,7 @@ import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Entry;
 import org.yakindu.sct.model.sgraph.EntryKind;
+import org.yakindu.sct.model.sgraph.Exit;
 import org.yakindu.sct.model.sgraph.FinalState;
 import org.yakindu.sct.model.sgraph.Region;
 import org.yakindu.sct.model.sgraph.Synchronization;
@@ -199,7 +200,20 @@ public class SGraphJavaValidator extends AbstractDeclarativeValidator {
 	public void transitionsWithNoGuard(Transition trans) {
 		if (trans.getSource() instanceof Entry) {
 			return;
-		} else if(trans.getTrigger() == null){
+		}
+		if (trans.getSource() instanceof org.yakindu.sct.model.sgraph.State) {
+			org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) trans.getSource();
+			if (state.isComposite()) {
+				for (Region r : state.getRegions()) {
+					for (Vertex v : r.getVertices()) {
+						if (v instanceof Exit) {
+							return;
+						}
+					}
+				}
+			}
+		}
+		if (trans.getTrigger() == null) {
 			warning(ISSUE_TRANSITION_WITHOUT_GUARD, trans, null, -1);
 		}
 	}

{'addition_count': 15, 'commit_subject': 'transitions without triggers will not show warnings when their source state is a composit state that contains a exit node', 'deletion_count': 1, 'file_extension': '.java', 'lang': 'yakindu', 'license': 'epl-1.0', 'repo_name': 'Yakindu/statecharts'}