| author | Rohit Agrawal | 2012-08-17 05:33:31 (EDT) |
|---|---|---|
| committer | Rohit Agrawal | 2012-08-17 05:33:31 (EDT) |
| commit | dcee6b9fddff23d49c1373f96424e2d45df76762 (patch) (side-by-side diff) | |
| tree | 208d61c4981869892ff0f7d97ab263d6d53a747b | |
| parent | c58122321c34dc11466ef74e3db491e8e2d47b91 (diff) | |
| download | org.eclipse.etrice-dcee6b9fddff23d49c1373f96424e2d45df76762.zip org.eclipse.etrice-dcee6b9fddff23d49c1373f96424e2d45df76762.tar.gz org.eclipse.etrice-dcee6b9fddff23d49c1373f96424e2d45df76762.tar.bz2 | |
[CQ6589] : Complete, with all the info and warning markers andrefs/changes/91/7291/1
proposals.
1. I authored 100% of the content I contributed
2. I have the rights to donate the content to Eclipse
3. I contribute the content under the EPL
Change-Id: Iccff8ec4178015c40101653edc7d97801c7febaf
Change-Id: I6216735d273f5b16a73c6f6e5e54fc686540668b
3 files changed, 27 insertions, 7 deletions
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java index 3901c75..ad209e7 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java @@ -129,6 +129,31 @@ public class AbstractExecutionValidator implements IRoomValidator { State st = (State) obj;
propGen.createProposals(st);
// TODO : create markers for the proposals
+ List<MessageFromIf> incoming = propGen.getIncomingProposals();
+ EObject orig = xpac.getOrig(st);
+ EObject container = orig.eContainer();
+ @SuppressWarnings("unchecked")
+ int idx = ((List<? extends EObject>)container.eGet(orig.eContainingFeature())).indexOf(orig);
+ if(incoming != null)
+ for(MessageFromIf msg : incoming)
+ {
+ messageAcceptor.acceptWarning(
+ "State should be receiving the message " + msg.getMessage().getName() + " from port " + msg.getFrom().getName() + " ",
+ container, orig.eContainingFeature(), idx,
+ "Receive message", st.getName());
+ }
+ List<MessageFromIf> outgoing = propGen.getOutgoingProposals();
+ if(outgoing != null)
+ {
+ for(MessageFromIf msg : outgoing)
+ {
+ messageAcceptor.acceptInfo(
+ "State should be sending the message " + msg.getMessage().getName() + " from port " + msg.getFrom().getName() + " ",
+ container, orig.eContainingFeature(), idx,
+ "Send message", st.getName());
+
+ }
+ }
}
// the following part takes care of all the warnings
if (obj instanceof StateGraphItem) {
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java index e853b36..5631351 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java @@ -31,7 +31,6 @@ public class ProposalGenerator { private SemanticsCheck checker;
private List<MessageFromIf> outgoingProposal = new LinkedList<MessageFromIf>();
private List<MessageFromIf> incomingProposal = new LinkedList<MessageFromIf>();
- private List<ActiveTrigger> warningTrigger = new LinkedList<ActiveTrigger>();
private static boolean traceProposals = false;
static {
if (Activator.getDefault().isDebugging()) {
@@ -56,10 +55,7 @@ public class ProposalGenerator { return outgoingProposal;
}
- public List<ActiveTrigger> getWarningTriggers() {
- return warningTrigger;
- }
-
+
public void createProposals(State st) {
ActiveRules rules = checker.getActiveRules(st);
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java index 06a399f..5b68fff 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java @@ -158,8 +158,7 @@ public class SemanticsCheck { }
List<HandledMessage> wrongMsgList = tempRule.consumeMessages(msgList);
addToWarning(node, wrongMsgList);
- if(mapToWarnings.containsKey(node))
-
+
if (traceChecks && traceLevel>=TRACE_DETAILS)
System.out.println(" Messages consumed");
|

