Skip to content

Commit

Permalink
Minor REPL improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Sep 3, 2024
1 parent 6e48b32 commit a65c58f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions convex-gui/src/main/java/convex/gui/panels/REPLPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,13 @@ public REPLPanel(Convex convex) {
});
actionPanel.add(btnRun);

btnClear = new JButton("Clear");
actionPanel.add(btnClear);
btnClear.addActionListener(e -> {
btnClear = new ActionButton("Clear",0xe9d5,e -> {
output.setText("");
input.requestFocus();
});
actionPanel.add(btnClear);

btnInfo = new JButton("Connection Info");
actionPanel.add(btnInfo);
btnInfo.addActionListener(e -> {
btnInfo = new ActionButton("Connection Info",0xe88e,e -> {
StringBuilder sb=new StringBuilder();
if (convex instanceof ConvexRemote) {
sb.append("Remote host: " + convex.getHostAddress() + "\n");
Expand All @@ -221,6 +218,7 @@ public REPLPanel(Convex convex) {
String infoString = sb.toString();
JOptionPane.showMessageDialog(this, infoString);
});
actionPanel.add(btnInfo);

btnTX=new JCheckBox("Show transaction");
btnTX.setToolTipText("Tick to show full transaction details.");
Expand Down Expand Up @@ -317,7 +315,7 @@ private void sendMessage(String s) {
return m;
});
} catch (ParseException e) {
output.append(" PARSE ERROR: "+e.getMessage(),Color.RED);
output.append(" PARSE ERROR: "+e.getMessage()+"\n",Color.RED);
} catch (TimeoutException t) {
output.append(" TIMEOUT waiting for result\n",Color.RED);
} catch (IllegalStateException t) {
Expand Down

0 comments on commit a65c58f

Please sign in to comment.