- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
public void actionPerformed(ActionEvent ev) { DeviceEntry entry = (DeviceEntry) lsDevices.getSelectedValue(); boolean canDeleteFile = true; for (Enumeration en = lsDevicesModel.elements(); en.hasMoreElements();) { DeviceEntry test = (DeviceEntry) en.nextElement(); if (test != entry && test.getFileName() != null && test.getFileName().equals(entry.getFileName())) { canDeleteFile = false; break; } } if (canDeleteFile) { File deviceFile = new File(Config.getConfigPath(), entry.getFileName()); deviceFile.delete(); } if (entry.isDefaultDevice()) { for (Enumeration en = lsDevicesModel.elements(); en.hasMoreElements();) { DeviceEntry tmp = (DeviceEntry) en.nextElement(); if (!tmp.canRemove()) { tmp.setDefaultDevice(true); break; } } } lsDevicesModel.removeElement(entry); Config.removeDeviceEntry(entry); } };
Config.removeDeviceEntry(entry);
removeDeviceEntry(entry); File src = new File(getConfigPath(), entry.getFileName()); File dst = File.createTempFile("dev", ".jar", getConfigPath());