Commit ebe0c40f authored by Mihai Herda's avatar Mihai Herda
Browse files

Opt button for watch expressions and conditional breakpoints now has

"Opt" written on it, so you can see it's a button.

Default watch expressions and conditional breakpoints are now "false".
parent b5e25ce8
...@@ -145,10 +145,10 @@ public class ConditionalBreakpointPanel extends ExpressionPanel { ...@@ -145,10 +145,10 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
dataEntries = new ArrayList<String[]>(); dataEntries = new ArrayList<String[]>();
String[] s = new String[3]; String[] s = new String[3];
s[0] = " "; s[0] = " ";
s[1] = "A.i <= B.k"; s[1] = "false";
s[2] = "false"; s[2] = "false";
dataEntries.add(s); dataEntries.add(s);
mainInterface.getControlFacade().createConditionalBreakpoint(0, "A.i <= B.k"); mainInterface.getControlFacade().createConditionalBreakpoint(0, "false");
tableModel = new DefaultTableModel(createDataFromList(), columnTitles) { tableModel = new DefaultTableModel(createDataFromList(), columnTitles) {
@Override @Override
public boolean isCellEditable(int row, int column) { public boolean isCellEditable(int row, int column) {
...@@ -157,8 +157,8 @@ public class ConditionalBreakpointPanel extends ExpressionPanel { ...@@ -157,8 +157,8 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
}; };
table = new JTable(tableModel); table = new JTable(tableModel);
table.setToolTipText(CB_TOOLTIP); table.setToolTipText(CB_TOOLTIP);
table.getColumnModel().getColumn(0).setPreferredWidth(5); table.getColumnModel().getColumn(0).setPreferredWidth(30);
table.getColumnModel().getColumn(1).setPreferredWidth(150); table.getColumnModel().getColumn(1).setPreferredWidth(130);
table.getColumnModel().getColumn(2).setPreferredWidth(5); table.getColumnModel().getColumn(2).setPreferredWidth(5);
table.addMouseListener(new MouseListener() { table.addMouseListener(new MouseListener() {
@Override @Override
...@@ -255,7 +255,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel { ...@@ -255,7 +255,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
int row = this.table.getRowCount(); int row = this.table.getRowCount();
idMap.put(row, currentHighestId + 1); idMap.put(row, currentHighestId + 1);
currentHighestId++; currentHighestId++;
String[] newRow = { " ", "A.i <= B.k", "" }; String[] newRow = { "Opt", "false", "" };
tableModel.addRow(newRow); tableModel.addRow(newRow);
// ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length); // ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length);
// dataAsList.addAll(Arrays.asList(dataEntries)); // dataAsList.addAll(Arrays.asList(dataEntries));
...@@ -272,7 +272,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel { ...@@ -272,7 +272,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
int row = this.table.getRowCount(); int row = this.table.getRowCount();
idMap.put(row, id); idMap.put(row, id);
currentHighestId = Math.max(currentHighestId, id); currentHighestId = Math.max(currentHighestId, id);
String[] newRow = { " ", "A.i <= B.k", " " }; String[] newRow = { "Opt", "false", " " };
tableModel.addRow(newRow); tableModel.addRow(newRow);
dataEntries.add(newRow); dataEntries.add(newRow);
this.updateUI(); this.updateUI();
...@@ -306,7 +306,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel { ...@@ -306,7 +306,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
//Option Cell Renderer //Option Cell Renderer
private class ButtonCellRenderer extends DefaultTableCellRenderer{ private class ButtonCellRenderer extends DefaultTableCellRenderer{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final JButton btn = new JButton(""); private final JButton btn = new JButton("Opt");
@Override @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
......
...@@ -119,7 +119,7 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -119,7 +119,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
addButton.addActionListener(e -> { addButton.addActionListener(e -> {
addRow(); addRow();
mainInterface.getControlFacade().createWatchExpression(currentHighestId, "A.i * B.k"); mainInterface.getControlFacade().createWatchExpression(currentHighestId, "false");
getWatchExpressionPanel(mainInterface).updateUI(); getWatchExpressionPanel(mainInterface).updateUI();
saveWEs(); saveWEs();
}); });
...@@ -144,10 +144,10 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -144,10 +144,10 @@ public class WatchExpressionPanel extends ExpressionPanel {
dataEntries = new ArrayList<String[]>(); dataEntries = new ArrayList<String[]>();
String[] s = new String[3]; String[] s = new String[3];
s[0] = " "; s[0] = " ";
s[1] = "A.i * B.k"; s[1] = "false";
s[2] = " "; s[2] = " ";
dataEntries.add(s); dataEntries.add(s);
mainInterface.getControlFacade().createWatchExpression(0, "A.i * B.k"); mainInterface.getControlFacade().createWatchExpression(0, "false");
tableModel = new DefaultTableModel(createDataFromList(), columnTitles) { tableModel = new DefaultTableModel(createDataFromList(), columnTitles) {
@Override @Override
...@@ -157,8 +157,8 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -157,8 +157,8 @@ public class WatchExpressionPanel extends ExpressionPanel {
}; };
table = new JTable(tableModel); table = new JTable(tableModel);
table.setToolTipText(WE_TOOLTIP); table.setToolTipText(WE_TOOLTIP);
table.getColumnModel().getColumn(0).setPreferredWidth(5); table.getColumnModel().getColumn(0).setPreferredWidth(30);
table.getColumnModel().getColumn(1).setPreferredWidth(150); table.getColumnModel().getColumn(1).setPreferredWidth(130);
table.getColumnModel().getColumn(2).setPreferredWidth(10); table.getColumnModel().getColumn(2).setPreferredWidth(10);
table.addMouseListener(new MouseListener() { table.addMouseListener(new MouseListener() {
@Override @Override
...@@ -269,7 +269,7 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -269,7 +269,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
int row = this.table.getRowCount(); int row = this.table.getRowCount();
idMap.put(row, currentHighestId + 1); idMap.put(row, currentHighestId + 1);
currentHighestId += 1; currentHighestId += 1;
String[] newRow = { " ", "A.i * B.k", " " }; String[] newRow = { " ", "false", " " };
tableModel.addRow(newRow); tableModel.addRow(newRow);
// ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length); // ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length);
// dataAsList.addAll(Arrays.asList(dataEntries)); // dataAsList.addAll(Arrays.asList(dataEntries));
...@@ -286,7 +286,7 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -286,7 +286,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
int row = this.table.getRowCount(); int row = this.table.getRowCount();
idMap.put(row, id); idMap.put(row, id);
currentHighestId = Math.max(currentHighestId, id); currentHighestId = Math.max(currentHighestId, id);
String[] newRow = { " ", "A.i * B.k", " " }; String[] newRow = { " ", "false", " " };
tableModel.addRow(newRow); tableModel.addRow(newRow);
dataEntries.add(newRow); dataEntries.add(newRow);
this.updateUI(); this.updateUI();
...@@ -318,7 +318,7 @@ public class WatchExpressionPanel extends ExpressionPanel { ...@@ -318,7 +318,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
//Option Cell Renderer //Option Cell Renderer
private class ButtonCellRenderer extends DefaultTableCellRenderer{ private class ButtonCellRenderer extends DefaultTableCellRenderer{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final JButton btn = new JButton(""); private final JButton btn = new JButton("Opt");
@Override @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
......
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