Skip to content
Snippets Groups Projects
Commit fb63a5a7 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Update on dependency graphs

parent 852af036
No related branches found
No related tags found
No related merge requests found
...@@ -77,6 +77,7 @@ public class AvatarDependencyGraph { ...@@ -77,6 +77,7 @@ public class AvatarDependencyGraph {
} }
// Connect everything ie writers to all potential readers // Connect everything ie writers to all potential readers
// For each writing state, we draw a transition to all possible corresponding readers // For each writing state, we draw a transition to all possible corresponding readers
// Double direction if synchronous
for(AUTState state: states) { for(AUTState state: states) {
if (state.referenceObject instanceof AvatarActionOnSignal) { if (state.referenceObject instanceof AvatarActionOnSignal) {
AvatarActionOnSignal aaos = (AvatarActionOnSignal) state.referenceObject; AvatarActionOnSignal aaos = (AvatarActionOnSignal) state.referenceObject;
...@@ -91,9 +92,14 @@ public class AvatarDependencyGraph { ...@@ -91,9 +92,14 @@ public class AvatarDependencyGraph {
AvatarActionOnSignal aaosD = (AvatarActionOnSignal) stateDestination.referenceObject; AvatarActionOnSignal aaosD = (AvatarActionOnSignal) stateDestination.referenceObject;
if (aaosD.getSignal() == correspondingSig) { if (aaosD.getSignal() == correspondingSig) {
// Found relation // Found relation
TraceManager.addDev("Found relation!"); //TraceManager.addDev("Found relation!");
AUTTransition tr = new AUTTransition(state.id, "", stateDestination.id); AUTTransition tr = new AUTTransition(state.id, "", stateDestination.id);
transitions.add(tr); transitions.add(tr);
AvatarRelation ar = _avspec.getAvatarRelationWithSignal(correspondingSig);
if (!(ar.isAsynchronous())) {
tr = new AUTTransition(stateDestination.id, "", state.id);
transitions.add(tr);
}
} }
} }
} }
......
...@@ -99,8 +99,8 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable ...@@ -99,8 +99,8 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable
"edge {text-color: black; shape: cubic-curve; text-size:10;} " + "edge {text-color: black; shape: cubic-curve; text-size:10;} " +
"edge.defaultedge {text-size:10; text-color:black;} " + "edge.defaultedge {text-size:10; text-color:black;} " +
"edge.external {text-color:blue; text-size:14;} " + "edge.external {text-color:blue; text-size:14;} " +
"node.deadlock {fill-color: red; text-color: white; size: 20px, 20px; text-size:16;} " + "node.deadlock {fill-color: orange; text-color: red; size: 20px, 20px; text-size:15;} " +
"node.init { fill-color: green; text-color: black; size: 20px, 20px; text-size:16;}"; "node.init { fill-color: green; text-color: black; size: 20px, 20px; text-size:15;}";
protected static String STYLE_SHEET2 = "graph { canvas-color: white; fill-mode: gradient-vertical; fill-color: white, #004; padding: 20px; } " + protected static String STYLE_SHEET2 = "graph { canvas-color: white; fill-mode: gradient-vertical; fill-color: white, #004; padding: 20px; } " +
"node { shape: circle; size-mode: dyn-size; size: 10px; fill-mode: gradient-radial; fill-color: #FFFC, #FFF0; stroke-mode: none; " + "node { shape: circle; size-mode: dyn-size; size: 10px; fill-mode: gradient-radial; fill-color: #FFFC, #FFF0; stroke-mode: none; " +
...@@ -111,22 +111,7 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable ...@@ -111,22 +111,7 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable
"edge.external { shape: L-square-line; size: 3px; fill-color: #AAA3; fill-mode: plain; arrow-shape: circle; } " + "edge.external { shape: L-square-line; size: 3px; fill-color: #AAA3; fill-mode: plain; arrow-shape: circle; } " +
"sprite { shape: circle; fill-mode: gradient-radial; fill-color: #FFF8, #FFF0; }"; "sprite { shape: circle; fill-mode: gradient-radial; fill-color: #FFF8, #FFF0; }";
/*public static String STYLE_SHEET =
"node {" +
" fill-color: #B1CAF1; text-color: black; size: 11px, 11px;" +
"} " +
"edge.default edge {" + "text-color: blue;" + " shape: cubic-curve; }" +
"edge.external {" +
//" arrow-shape: circle" +
" text-style: bold;" +
"} " +
"node.deadlock {" +
" fill-color: red; text-color: white; size: 15px, 15px;" +
"} " +
"node.init {" +
" fill-color: green; text-color: black; size: 15px, 15px;" +
"} ";*/
public AUTGraphDisplay(AUTGraph _graph, boolean _exitOnClose) { public AUTGraphDisplay(AUTGraph _graph, boolean _exitOnClose) {
graph = _graph; graph = _graph;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment