Skip to content

Commit

Permalink
Hided not wanted elements in visualizatin of iteration pact plans
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuelfen authored and mhuelfen committed May 13, 2013
1 parent 3e1c771 commit 88827e2
Showing 1 changed file with 31 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ public class SWTGraphCanvas extends Canvas implements PaintListener, Listener, M
private final GraphVisualizationData visualizationData;

private final boolean detectBottlenecks;


private final String FAKE_TAIL = "Fake Tail";
private final String ITERATION_SYNC = "Iteration Sync";

private AbstractSWTComponent toolTipComponent = null;

private SWTToolTip displayedToolTip = null;

private volatile boolean runAnimation = false;



public SWTGraphCanvas(GraphVisualizationData visualizationData, SWTJobTabItem jobTabItem, Composite parent,
int style, boolean detectBottlenecks) {
Expand Down Expand Up @@ -129,9 +135,14 @@ private Map<ManagementGroupVertex, SWTGroupVertex> addGroupVertices(Map<Manageme
for (int i = 0; i < managementStage.getNumberOfGroupVertices(); i++) {

final ManagementGroupVertex groupVertex = managementStage.getGroupVertex(i);
final SWTGroupVertex visualGroupVertex = new SWTGroupVertex(parent, groupVertex);

groupMap.put(groupVertex, visualGroupVertex);
// hide unwanted elements of iteration pact plans
if (!(groupVertex.getName().equals(this.FAKE_TAIL)|| groupVertex.getName().contains(this.ITERATION_SYNC)) ){
final SWTGroupVertex visualGroupVertex = new SWTGroupVertex(parent, groupVertex);
groupMap.put(groupVertex, visualGroupVertex);
}


}
}

Expand Down Expand Up @@ -172,20 +183,24 @@ private void addExecutionVertices(Map<ManagementGroupVertex, SWTGroupVertex> gro
final ManagementVertex mv = iterator.next();
final SWTGroupVertex parent = groupMap.get(mv.getGroupVertex());

final SWTVertex visualVertex = new SWTVertex(parent, mv);
vertexMap.put(mv, visualVertex);

for (int i = 0; i < mv.getNumberOfOutputGates(); i++) {
final ManagementGate outputGate = mv.getOutputGate(i);
final SWTGate visualGate = new SWTGate(visualVertex, outputGate);
gateMap.put(outputGate, visualGate);
}

for (int i = 0; i < mv.getNumberOfInputGates(); i++) {
final ManagementGate inputGate = mv.getInputGate(i);
final SWTGate visualGate = new SWTGate(visualVertex, inputGate);
gateMap.put(inputGate, visualGate);
}
// draw connections only for elements that are not hided
if ( !(mv.getName().equals(this.FAKE_TAIL) || mv.getName().contains(this.ITERATION_SYNC))){

final SWTVertex visualVertex = new SWTVertex(parent, mv);
vertexMap.put(mv, visualVertex);

for (int i = 0; i < mv.getNumberOfOutputGates(); i++) {
final ManagementGate outputGate = mv.getOutputGate(i);
final SWTGate visualGate = new SWTGate(visualVertex, outputGate);
gateMap.put(outputGate, visualGate);
}

for (int i = 0; i < mv.getNumberOfInputGates(); i++) {
final ManagementGate inputGate = mv.getInputGate(i);
final SWTGate visualGate = new SWTGate(visualVertex, inputGate);
gateMap.put(inputGate, visualGate);
}
}
}

iterator = new ManagementGraphIterator(managementGraph, true);
Expand Down

0 comments on commit 88827e2

Please sign in to comment.