Commit feaf6b51 authored by Michael Schwarz's avatar Michael Schwarz 🤔
Browse files

4 way split to account for items that are irrelevant (i.e. (*) in front

of terminal but other terminal taken)
parent e317ef47
......@@ -20,7 +20,7 @@ public class ConflictStateTooltip extends MultipleTextTooltipBase implements ITo
private CupConflictState cState;
public ConflictStateTooltip(Display display) {
super(display,3);
super(display,4);
}
......@@ -44,6 +44,7 @@ public class ConflictStateTooltip extends MultipleTextTooltipBase implements ITo
StringBuilder core = new StringBuilder();
StringBuilder closure = new StringBuilder();
StringBuilder finished = new StringBuilder();
StringBuilder irrelevantCore = new StringBuilder();
for (Enumeration e = this.cState.getState().items().all(); e.hasMoreElements(); ) {
lalr_item item = (lalr_item)e.nextElement();
......@@ -57,6 +58,10 @@ public class ConflictStateTooltip extends MultipleTextTooltipBase implements ITo
finished.append(item.toString().replace("(*)", "\u2022"));
finished.append("\n");
}
else if(cNode.getTransitionSymbol() != "" && !item.symbol_after_dot().is_non_term() && !item.symbol_after_dot().toString().equals(cNode.getTransitionSymbol())){
irrelevantCore.append(item.toString().replace("(*)", "\u2022"));
irrelevantCore.append("\n");
}
else {
core.append(item.toString().replace("(*)", "\u2022"));
core.append("\n");
......@@ -72,6 +77,7 @@ public class ConflictStateTooltip extends MultipleTextTooltipBase implements ITo
setText(0,core.toString());
setText(1,closure.toString());
setText(2,finished.toString());
setText(3,irrelevantCore.toString());
}
show();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment