You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot evaluate because of compilation error(s): Evaluations must contain either an expression or a block of well-formed statements #844
While debugging Java, watches emit Cannot evaluate because of compilation error(s): Evaluations must contain either an expression or a block of well-formed statements
Environment
Operating System:
Ubuntu 18.04.4 LTS
Linux 5.3.0-62-generic add activate event in telemetry #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
JDK version:
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)
Set a breakpoint in a lambda expression being used, say, to map a Vavr Array (I have not been able to reproduce this with plain Java Stream).
Debug a test to hit that breakpoint.
[attach a sample project reproducing the error]
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import io.vavr.collection.Array;
public class AoeuTest {
@Test
public void shouldHavePerfectGrade() {
final Array<Integer> integers = Array.of(1);
final int actual = function(integers);
assertThat(actual).isEqualTo(1);
}
static int function(final Array<Integer> integers) {
return integers
.map(i -> {
final Integer result = i;
return result; // set breakpoint here and create watch on `result`. also create a condition for the breakpoint
})
.get();
}
}
Current Result
Cannot evaluate because of compilation error(s): Evaluations must contain either an expression or a block of well-formed statements emitted for watches and breakpoint conditions even for literal primitives like 15.
Expected Result
Watches and breakpoint conditions work.
Additional Informations
Reacted by Nicolas THIERION, Hoyeong Heo and Hannes
Also can reproduce it in the upstream eclipse, looks like a new corner case that needs fix in the upstream.
Regarding the case you provide above, i try to use maven to add io.vavr.vavr dependency, then try the sample snippet Array<Integer>.map(lambda) and also get the same evaluation error.
But if i use the JDK built-in Stream API or define a lambda callback in my source code itself, the evaluation in the lambda body works well. See a sample below.
So it seems this error only happens at the third party build tool dependencies such as maven/gradle. However, need open an issue in the upstream and fix there.
I get this error annoyingly after several iterations of running a relatively simple program derived from the Tables tutorial, running v 0.32.1 of the debugger in Windows. It is cured by restarting VSCode. More details available if any interest.
Update: Now there is no cure, and the issue is quite reproducible, at least in my project. The debug console becomes useless after a few statements of the class constructor.
packageSlideCatalog;
/** Copyright (c)*//** SlideCatalog.java requires no other files.*/importjavax.swing.*;
importjavax.swing.plaf.FontUIResource;
importjavax.swing.table.*;
importjava.awt.*;
importjava.awt.event.*;
importjava.io.*;
importjava.nio.file.Files;
importjava.util.*;
importjava.util.stream.*;
importjava.util.prefs.*;
publicclassSlideCatalog
{
privatefinalbooleandebug;
voiddebugPrint(Objectdat) {
if (debug) System.out.println(dat);
}
voiddebugPrint(Stringformat, Object ... dat) {
debugPrint(String.format(format, dat));
}
booleanisWindows() {
returnSystem.getProperty("os.name").toLowerCase().contains("windows");
}
privateJFrameframe;
privateJTabletable;
privateMyTableModelmodel;
privatePreferencespreferences = Preferences.userNodeForPackage(SlideCatalog.class);
privateStringslideShowCmd = preferences.get("SlideShow",
"cmd /c start slideshow /ro slides/%"); // "sh -c cd slides; eog %" for linuxprivateRecentFilesrecent;
privateintscale;
/*** SlideCatalog frame initializer* No arguments (except from preferences!)*/publicSlideCatalog() {
debug = !getClass().getResource("SlideCatalog.class").toString().contains(".jar");
// build the table with its model and sorter/filtermodel = newMyTableModel();
table = newJTable(model);
table.getSelectionModel().addListSelectionListener(event-> {
if (event.getValueIsAdjusting()) return;
debugPrint(event);
introw = table.getSelectedRow();
if (MNU.EDIT.getState() && row>0) ;//ask if updated, revert if cancel//MNU.EDIT.menuItem.setEnabled(table.getSelectedRowCount() == 1);MNU.SLIDESHOW.menuItem.setEnabled(table.getSelectedRowCount() > 0);
});
table.setFillsViewportHeight(true);
TableRowSorter<MyTableModel> sorter = newTableRowSorter<>(model);
sorter.setRowFilter(newRowFilter<MyTableModel,Integer>() {
@Overridepublicbooleaninclude(RowFilter.Entry<? extendsMyTableModel, ? extendsInteger> entry) {
returnmodel.isRowShown(entry.getIdentifier());
}
});
table.setRowSorter(sorter);
table.moveColumn(3, 1); //switch file's code,count,good,subject to view's cd,sb,ct,gdInputMapim = table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).getParent();
im.remove(KeyStroke.getKeyStroke("control C")); //table has row-editing acceleratorsim.remove(KeyStroke.getKeyStroke("control X")); //remove them!im.remove(KeyStroke.getKeyStroke("control A"));
// build the frameworkframe = newJFrame("Slide Catalog - (untitled) *");
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(newWindowAdapter() {
@OverridepublicvoidwindowClosing(WindowEvente) {
preferences.putInt("Width", frame.getWidth());
preferences.putInt("Height", frame.getHeight());
System.exit(0);
}
});
// make Alt-mnemonic work for empty JMenus (table has focus)table.addKeyListener(newKeyAdapter() {
@OverridepublicvoidkeyPressed(KeyEvente) {
JMenujm = MNU.doMnemonic(e);
if (jm != null) menuClicked(jm.getText());
}
});
/*frame.setUndecorated(true); // nice appearance, but not too practical*/// Build the menusframe.setJMenuBar(createMenus());
recent = newRecentFiles((JMenu)MNU.RECENT.menuItem, preferences, 0) {
@Overridepublicvoidclicked(Filefile) {model.readFile(file);}
};
//Create the scroll pane, add table to it, add it to frame.frame.setContentPane(newJScrollPane(table));
//Set up column sizes.initColumnSizes();
//Display the window.frame.setPreferredSize(newDimension(
preferences.getInt("Width", 600),
preferences.getInt("Height", 200)));
frame.pack();
frame.setLocationRelativeTo(null); //center screen - works better after set sizemodel.scaleFont(preferences.getInt("Scale", 0));
frame.setVisible(true);
//Load data if indicatedif (MNU.AUTOLOAD.getState()) model.readFile(recent.last());
}
publicStringtoRGB(Stringin) {
Stringout = "<html>";
for (Characterc:(in+".....").substring(0,5).toLowerCase().toCharArray()) {
out += String.format("<span x%s style=background-color:%s> ",
c=='r'?"1":c=='g'?"2":c=='b'?'3':'0',
c=='r'?"red": //weirdly spelled to sort by r,g,bc=='g'?"lime":
c=='b'?"blue":"#f0f0f0");
}
//System.out.println(in+"->"+fromRGB(out));returnout;
}
publicStringfromRGB(Stringin) {
String[] out = in.split("x");
out[0] = "";
IntStream.range(1,out.length)
.forEach(i->out[i] = String.valueOf("_rgb".charAt(out[i].charAt(0)%4)));
returnString.join("", out);
}
/*** This method picks good column sizes.* If all column heads are wider than the column's cells'* contents, then you can just use column.sizeWidthToFit().*/privatevoidinitColumnSizes() {
for (inti = 0; i < 4; i++) {
TableColumncolumn = table.getColumnModel().getColumn(i);
inth = table.getFontMetrics(table.getFont()).getHeight();
table.setRowHeight(h);
table.getTableHeader().setPreferredSize(newDimension(table.getWidth(), h+h));
if (i == 1) continue;
intWidth = Math.round(table.getFont().getSize2D()*5.3f +.6f);
column.setMaxWidth(Width);
column.setPreferredWidth(Width);
}
}
publicvoidsetUpUpDownColumn(intcol) {
//Set up the editor for the sport cells.TableColumntcol = table.getColumn(col);
JSpinnerspinner = newJSpinner();
//tcol.setCellEditor(new DefaultCellEditor(spinner));
}
classMyTableModelextendsAbstractTableModel {
privatestaticfinallongserialVersionUID = 1L;
privateString[] columnNames = {"","","",""};
privateArrayList<Object[]> data = newArrayList<>();
publicMyTableModel() {
addRow("r.g.b 5 0 Snowboarding");
addRow("b.b.r 4 3 Rowing");
addRow("g...b 0 0 Knitting");
addRow("...rg 10 5 Playing in the Pool");
}
publicintgetColumnCount() {
returncolumnNames.length;
}
publicintgetRowCount() {
returndata.size(); // - permutes;
}
publicStringgetColumnName(intcol) {
if (columnNames[1].isEmpty()) doFilter();
returncolumnNames[col];
}
publicObjectgetValueAt(introw, intcol) {
//debugPrint("GetValue %d,%d",row,col);returndata.get(row)[col];
}
/* * JTable uses this method to determine the default renderer/ * editor for each cell. If we didn't implement this method, * then the last column would contain text ("true"/"false"), * rather than a check box. */publicClass<?> getColumnClass(intc) {
if (data.size() == 0) return"".getClass();
returngetValueAt(0, c).getClass();
}
/* * Don't need to implement this method unless your table's * editable. */publicbooleanisCellEditable(introw, intcol) {
//Note that the data/cell address is constant,//no matter where the cell appears onscreendebugPrint("IsEditable %d,%d",row,col);
return (MNU.EDIT.getState() && col > 0);
}
/* * Don't need to implement this method unless your table's * data can change. */publicvoidsetValueAt(Objectvalue, introw, intcol) {
debugPrint("SetValue %d,%d", row, col);
data.get(row)[col] = value;
fireTableCellUpdated(row, col);
}
publicbooleanisRowShown(introw) {
if (MNU.SKIPEMPTY.getState() && !MNU.EDIT.getState())
if (data.get(row)[1] == Integer.valueOf(0)) returnfalse;
if (!MNU.PERMUTE.getState() || MNU.EDIT.getState())
if ("<p>".equals(data.get(row)[4])) returnfalse;
returntrue;
}
publicStringgetSlideShowCmd() {
if (table.getSelectedRowCount() == 0) return"";
ArrayList<String> out = newArrayList<>();
Strings;
for (introw: table.getSelectedRows()) {
row = table.convertRowIndexToModel(row);
s = fromRGB(""+getValueAt(row, 0)) + "*";
if (!out.contains(s)) out.add(s);
}
Stringf = slideShowCmd.split("%")[0];
s = (slideShowCmd + "% ").split("%")[1];
if (s.isEmpty()) s = " ";
returnf + String.join(s, out);
}
publicvoidclear() {
data.clear();
frame.setTitle("Slide Catalog - (untitled) ");
table.getTableHeader().setVisible(false);
fireTableDataChanged();
}
privateObject[] validateRow(Stringrowtext) { //format: Code\tCount\tGood\tSubjectObject[] orow = newObject[]{"",0,0,"",rowtext};
String[] row = rowtext.split("\\s+",4);
Stringc;
if (row.length > 0) {
c = row[0];
if (c.length() < 10) orow[0] = toRGB(c);
elseorow[0] = toRGB(fromRGB(c));
}
if (row.length > 1) {
c = row[1]; if (c.matches("\\d+")) orow[1] = Integer.valueOf(c);
}
if (row.length > 2) {
c = row[2]; if (c.matches("\\d+")) orow[2] = Integer.valueOf(c);
}
if (row.length > 2) orow[3] = String.join(" ",row[3].split("\\s+"));
orow[4] = String.format("%s %d %d %s", fromRGB((String)orow[0]),
orow[1], orow[2], orow[3]);
returnorow;
}
publicvoidaddRow(Stringrow) {
Object[] orow = validateRow(row);
data.add(orow);
fireTableRowsInserted(data.size()-1, data.size()-1);
Stringsubject = (String)orow[3];
subject = String.join(" ",subject.split("\\s+"));
for (inti=0;;) {
i = subject.indexOf(' ', i) + 1;
if (i == 0) break;
orow = orow.clone();
orow[4] = "<p>";
orow[3] = subject.substring(i) + ", " + subject.substring(0,i-1) + " <p>";
data.add(orow);
fireTableRowsInserted(data.size()-1, data.size()-1);
}
}
publicvoidopenFile() {
JFileChooserfc = newJFileChooser();
fc.setFileFilter(newjavax.swing.filechooser.FileNameExtensionFilter(
"SlideCatalog File", "slc"));
if (fc.showOpenDialog(frame) != JFileChooser.APPROVE_OPTION) return;
readFile(fc.getSelectedFile());
}
publicvoidreadFile(Filef) {
try {
java.nio.charset.Charsetcs = java.nio.charset.Charset.forName("cp437");
java.util.List<String> s = Files.readAllLines(f.toPath(),cs);
clear();
s.forEach(line->addRow(line));
recent.promote(f);
frame.setTitle("Slide Catalog - " + f.getName() + " ");
table.getTableHeader().setVisible(true);
doFilter();
} catch (Exceptione0) {
if (f.getName().isEmpty()) return;
JOptionPane.showMessageDialog(frame,
f.getAbsolutePath()+"\n"+e0.getClass().getSimpleName(),
"Read File", JOptionPane.ERROR_MESSAGE);
recent.remove(f);
return;
}
}
publicvoidscaleFont(intx1) {
if (table.getFont().getSize() + x1 < 4 || x1 == 0) return;
scale += x1;
preferences.putInt("Scale", scale);
UIDefaultsud = UIManager.getDefaults();
HashMap<String, Font> fmap = newHashMap<>();
HashMap<Object, Font> map = newHashMap<>();
ud.keys().asIterator().forEachRemaining(s->{
if (ud.get(s) instanceofFont) { // make all fonts bigger or smallerFontUIResourcef = (FontUIResource)ud.get(s);
fmap.putIfAbsent(f.toString(), newFontUIResource(
f.getFontName(), f.getStyle(), f.getSize()+x1));
map.put(s, fmap.get(f.toString()));
}
});
map.forEach((s,f)->ud.put(s,f));
SwingUtilities.updateComponentTreeUI(frame);
inth = frame.getFontMetrics(MNU.MENU.menuItem.getFont()).getHeight();
frame.getJMenuBar().setPreferredSize(newDimension(20, h));
initColumnSizes();
}
publicvoiddoFilter() {
intshown = 0;
intcount = 0;
intgood = 0;
for (inti = 0; i < data.size();++i) {
if (isRowShown(i)) {
shown += 1;
if ("<p>".equals(data.get(i)[4])) continue;
count += (int)data.get(i)[1];
good += (int)data.get(i)[2];
}
}
columnNames[0] = headerFormat[0];
columnNames[1] = String.format(headerFormat[1], count);
columnNames[2] = String.format(headerFormat[2], good);
columnNames[3] = String.format(headerFormat[3], shown, data.size());
if (table == null) return;
TableColumnModelcm = table.getColumnModel();
for (inti=0; i<getColumnCount(); ++i) {
cm.getColumn(table.convertColumnIndexToView(i)).setHeaderValue(columnNames[i]);}
table.getRowSorter().allRowsChanged(); //re-sort and filtertable.getTableHeader().repaint(); //update header text
}
privatefinalString[] headerFormat = {
"Code",
"<html><div align=right>Count<br>%d",
"<html><div align=right>Good<br>%d",
"<html><div align=center>Subject<br>%d of %d shown"
};
}
/** * Recent Files list - maintains a dropdown list of recent file paths * Construct with its menu or menuitem parent. */publicclassRecentFiles {
privatefinalArrayList<File> lst;
privatefinalJMenumenu;
privatefinalPreferencesprefs;
privatefinalintlimit;
publicRecentFiles(JMenumenu, Preferencesprefs, intlimit) {
this.menu = menu;
this.prefs = prefs;
this.limit = limit;
lst = newArrayList<File>();
for (inti = 1;;i++) {
Filef = newFile(prefs.get("RecentFiles/"+i, ""));
if (f.toString().isEmpty()) break;
lst.add(f);
}
setMenu();
}
publicFilelast() {returnlst.isEmpty()? newFile("") : lst.get(0);}
publicvoidpromote(Filef) {
if (f.toString().isEmpty()) return;
if (lst.contains(f)) if (lst.indexOf(f) == 0) return;
lst.remove(f);
lst.add(0, f);
if (limit > 3 && lst.size() > limit) lst.remove(limit);
menu.removeAll();
setMenu();
}
publicvoidremove(Filef) {
inti = lst.indexOf(f);
if (i < 0) return;
menu.remove(i);
setMenu();
}
privatevoidsetMenu(){
prefs.remove("RecentFiles/" + (lst.size()+1));
if (lst.isEmpty()) {
menu.setVisible(false);
return;
}
menu.setVisible(true);
menu.removeAll();
for (inti = 0; i < lst.size(); i++) {
Strings = lst.get(i).getName();
if (i>0) if (!lst.get(i).getParent().equals(lst.get(0).getParent()))
s = "... " + s;
if (i < 10) s = "" + (i+1) + " " + s;
JMenuItemf = newJMenuItem(s);
f.setToolTipText(lst.get(i).getAbsolutePath());
if (i < 10) {
intc = s.charAt(0);
f.setMnemonic(c);
c = KeyEvent.getExtendedKeyCodeForChar(c);
f.setAccelerator(KeyStroke.getKeyStroke(c, InputEvent.CTRL_DOWN_MASK));
}
menu.add(f);
f.addActionListener(e->clicked(newFile(f.getToolTipText())));
prefs.put("RecentFiles/"+(i+1), lst.get(i).toString());
}
}
publicvoidclicked(Filefile) {
debugPrint(file);
}
}
/** * Menu building script. MNU names are canonical labels for menu items. * So that spellings can be changed, etc. Two parameters, first is * menu text. Second starts with mnemonic unless '\0'; then flags: * '-' for addSep after, '^' for new JMenuBar menu, 'm' for submenu, * 'x' for last submenu item, '~' for checkbox item, 'd' for disabled, * 'l' for a label, * 'c', 'a', 's' for ctrl,alt,shift modifiers, 0 for no accelerator; * then tooltip after '|'. */privateenumMNU {MENU("Menu","M^a"),
NEW("New","Nc|Empty the list"),
OPEN("Open","Oc|Open a file"),
SAVE("Save","Sc|Save the current data"),
SAVEAS("Save As","Acs|Save with a new name"),
RECENT("Recent Files","Rmx-|Shows recently opened files"),
EDIT("Edit","E~c|Change the data in the selected row"),
KEYWORD("KeyWord","W|Search in Subject text"),
BIG("Bigger","B|Make everything bigger"),
SMALL("Smaller","m-|Make everything smaller"),
EDITSHOW("Edit ShowCmd","wc|Change the Slideshow command line"),
SKIPEMPTY("Skip Empty","k~|Show only line with Count>0"),
PERMUTE("Show Permuted", "P~|Show lines with permuted Subject words"),
AUTOLOAD("AutoLoad","Lc~|Load last opened file at startup"),
ABOUT("About","tc-|Show slide Catlog info"),
EXIT("Exit","xax|Exit the program"),
SLIDESHOW("SlideShow","S^dx|Invoke another program to show selected images"),
MSG("F1 for Help","\0l|This area shows notes");
publicfinalStringtext;
publicfinalbooleanisCheck;
publicfinalbooleanaddSep;
publicfinalbooleanisMenu;
publicfinalbooleanisLabel;
publicfinalbooleanisSubMenu;
publicfinalbooleanisLast;
publicfinalJMenuItemmenuItem;
publicfinalJLabellabel;
privatefinalStringtooltip;
MNU(Stringtxt, Stringflg) {
// System.out.println(txt); - clever! only happens once per label! text = txt;
intc = KeyEvent.getExtendedKeyCodeForChar(flg.charAt(0));
inttt = flg.indexOf('|');
if (tt >= 0) {tooltip = flg.substring(tt+1); flg = flg.substring(1,tt);}
else {tooltip = ""; flg = flg.substring(1);}
isCheck = flg.contains("~");
addSep = flg.contains("-");
isMenu = flg.contains("^");
isSubMenu = flg.contains("m");
isLast = flg.contains("x");
isLabel = flg.contains("l");
label = (isLabel) ? newJLabel(text) : null;
menuItem = (isMenu || isSubMenu) ? newJMenu(text)
: (isCheck) ? newJCheckBoxMenuItem(text)
: (isLabel) ? null
: newJMenuItem(text);
if (isLabel) {
label.setToolTipText(tooltip);
return;
}
menuItem.setEnabled(!flg.contains("d"));
menuItem.setToolTipText(tooltip);
if (c == KeyEvent.VK_UNDEFINED) return;
menuItem.setMnemonic(c);
if (isMenu || isSubMenu) return;
if (flg.contains("0")) return;
intmsk = 0;
if (flg.contains("c")) msk |= InputEvent.CTRL_DOWN_MASK;
if (flg.contains("a")) msk |= InputEvent.ALT_DOWN_MASK;
if (flg.contains("s")) msk |= InputEvent.SHIFT_DOWN_MASK;
menuItem.setAccelerator(KeyStroke.getKeyStroke(c, msk));
}
publicJMenugetMenu() {
return (menuIteminstanceofJMenu) ? (JMenu)menuItem : null;
}
publicbooleangetState() {
if (!isCheck) returnfalse;
return ((JCheckBoxMenuItem)menuItem).getState();
}
publicvoidsetState(booleanstate) {
if (isCheck) ((JCheckBoxMenuItem)menuItem).setState(state);
}
/** look up ActionCommand (menu.text) to find MNU instance */publicstaticMNUbyText(Stringtxt) {
for (MNUmnu:MNU.values())
if(mnu.text.equals(txt)) returnmnu;
returnnull;
}
/** Alt-mnemonic finds empty JMenu item and consumes the event */publicstaticJMenudoMnemonic(KeyEvente) {
if (!e.isAltDown() || e.getKeyChar() > 127) returnnull;
for (MNUmnu:MNU.values())
if (mnu.isMenu && mnu.getMenu().getPopupMenu().getComponentCount() == 0
&& e.getKeyCode() == mnu.menuItem.getMnemonic()) {
if (mnu.menuItem.isEnabled()) {
e.consume(); //don't leave the menu pressedreturn (JMenu)mnu.menuItem;
}
}
returnnull;
}
}
privateJMenuBarcreateMenus() {
//Create and setup a menu bar.JMenuBarjMenu = newJMenuBar();
jMenu.setBackground(Color.yellow);
JMenum = null;
for (MNUmnu: MNU.values()) {
JMenuItemmi = mnu.menuItem;
if (mnu.isLabel) {
if (m == null) jMenu.add(mnu.label); elsem.add(mnu.label);
} elseif (mnu.isMenu || mnu.isSubMenu) {
mi.addMouseListener(newMouseAdapter() {
publicvoidmouseClicked(MouseEvente)
{menuClicked(((JMenu)e.getSource()).getText());}
});
if (mnu.isSubMenu) m.add(mi); elsejMenu.add(mi);
if (!mnu.isLast) m = (JMenu)mi;
} else {
mi.addActionListener(e->menuClicked(e.getActionCommand()));
if (m == null) jMenu.add(mi); elsem.add(mi);
if (mnu.isLast) m = (m.getParent() == jMenu) ? null : (JMenu)m.getParent();
}
if (mnu.addSep) m.addSeparator();
}
MNU.SKIPEMPTY.setState(preferences.getBoolean("SkipEmpty", false));
MNU.PERMUTE.setState(preferences.getBoolean("ShowPermute", false));
MNU.AUTOLOAD.setState(preferences.getBoolean("AutoLoad", false));
returnjMenu;
}
publicvoidmenuClicked(Stringt) {
MNUmnu = MNU.byText(t);
if (!mnu.menuItem.isEnabled()) return;
debugPrint("Action %s",t);
switch (mnu) {
caseEXIT:
frame.dispatchEvent(newWindowEvent(frame, WindowEvent.WINDOW_CLOSING));
caseNEW:
model.clear(); break;
caseOPEN:
model.openFile(); break;
caseBIG:
model.scaleFont(1); break;
caseSMALL:
model.scaleFont(-1); break;
caseAUTOLOAD:
preferences.putBoolean("AutoLoad", MNU.AUTOLOAD.getState());
casePERMUTE:
preferences.putBoolean("ShowPermute", MNU.PERMUTE.getState());
model.doFilter(); break;
caseSKIPEMPTY: // toggles happen automaticallypreferences.putBoolean("SkipEmpty", MNU.AUTOLOAD.getState());
model.doFilter(); break;
caseEDITSHOW:
Strings = JOptionPane.showInputDialog(frame,
"Edit SlideShow command", slideShowCmd);
if (s == null) break;
preferences.put("SlideShow", slideShowCmd); break;
caseSLIDESHOW:
try {newProcessBuilder((model.getSlideShowCmd()).split("\\s+")).start();}
catch (IOExceptionex) {} break;
caseEDIT:
if (MNU.EDIT.getState()) {
table.clearSelection();
MNU.MSG.label.setText("Editing data ...");
} elseMNU.MSG.label.setText("");
model.doFilter(); break;
caseMENU: // not neededcaseRECENT: // not neededcaseMSG: // not possiblebreak;
}
}
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread. */publicstaticvoidmain(String[] args) {
//Schedule a job for the event-dispatching thread://creating and showing this application's GUI.javax.swing.SwingUtilities.invokeLater(newRunnable() {
publicvoidrun() {
newSlideCatalog();
}
});
}
}
Activity
testforstephen commentedon Jul 15, 2020
Also can reproduce it in the upstream eclipse, looks like a new corner case that needs fix in the upstream.
Regarding the case you provide above, i try to use maven to add
io.vavr.vavrdependency, then try the sample snippet Array<Integer>.map(lambda) and also get the same evaluation error.But if i use the JDK built-in Stream API or define a lambda callback in my source code itself, the evaluation in the lambda body works well. See a sample below.
So it seems this error only happens at the third party build tool dependencies such as maven/gradle. However, need open an issue in the upstream and fix there.
noel-yap commentedon Jul 15, 2020
I wasn't able to reproduce the issue using Java's
Stream, either, so I'm not understanding how the build tool is a factor here.prumseycsi commentedon Apr 19, 2021
I get this error annoyingly after several iterations of running a relatively simple program derived from the Tables tutorial, running v 0.32.1 of the debugger in Windows. It is cured by restarting VSCode. More details available if any interest.
Update: Now there is no cure, and the issue is quite reproducible, at least in my project. The debug console becomes useless after a few statements of the class constructor.
testforstephen commentedon Dec 14, 2021
Duplicate with #754, let's use that issue to track the progress.