diff --git a/pom.xml b/pom.xml index 5a3854e..43a8463 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,14 @@ 1.1.1 + + + junit + junit + [4.13.1,) + test + + com.formdev @@ -55,6 +63,18 @@ + + com.github.spotbugs + spotbugs-maven-plugin + 4.7.3.0 + + + + spotbugs + + + + diff --git a/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.form b/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.form index f93e226..bd5b278 100644 --- a/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.form +++ b/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.form @@ -98,12 +98,12 @@ - + - + - + diff --git a/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.java b/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.java index 302a898..986569c 100644 --- a/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.java +++ b/src/main/java/com/mycompany/autobackupprogram/BackupManagerGUI.java @@ -145,7 +145,7 @@ private void initComponents() { AutoBackupMenuItem = new javax.swing.JCheckBoxMenuItem(); jSeparator2 = new javax.swing.JPopupMenu.Separator(); jMenu4 = new javax.swing.JMenu(); - CopyFilenamePopupItem = new javax.swing.JMenuItem(); + CopyBackupNamePopupItem = new javax.swing.JMenuItem(); CopyInitialPathPopupItem = new javax.swing.JMenuItem(); CopyDestinationPathPopupItem = new javax.swing.JMenuItem(); TabbedPane = new javax.swing.JTabbedPane(); @@ -272,13 +272,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jMenu4.setText("Copy text"); - CopyFilenamePopupItem.setText("Copy filename"); - CopyFilenamePopupItem.addActionListener(new java.awt.event.ActionListener() { + CopyBackupNamePopupItem.setText("Copy backup name"); + CopyBackupNamePopupItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - CopyFilenamePopupItemActionPerformed(evt); + CopyBackupNamePopupItemActionPerformed(evt); } }); - jMenu4.add(CopyFilenamePopupItem); + jMenu4.add(CopyBackupNamePopupItem); CopyInitialPathPopupItem.setText("Copy initial path"); CopyInitialPathPopupItem.setToolTipText(""); @@ -813,7 +813,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }// //GEN-END:initComponents private void displayBackupList(List backups) { - model = new DefaultTableModel(new Object[]{"Backup Name", "Start Path", "Destination Path", "Last Backup", "Automatic Backup", "Next Backup Date", "Time Interval"}, 0) { + model = new DefaultTableModel(new Object[]{"Backup Name", "Initial Path", "Destination Path", "Last Backup", "Automatic Backup", "Next Backup Date", "Time Interval"}, 0) { @Override public Class getColumnClass(int columnIndex) { @@ -1227,12 +1227,12 @@ private void RunBackupPopupItemActionPerformed(java.awt.event.ActionEvent evt) { } }//GEN-LAST:event_RunBackupPopupItemActionPerformed - private void CopyFilenamePopupItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CopyFilenamePopupItemActionPerformed + private void CopyBackupNamePopupItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CopyBackupNamePopupItemActionPerformed if (selectedRow != -1) { StringSelection selection = new StringSelection(backups.get(selectedRow).getBackupName()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, null); } - }//GEN-LAST:event_CopyFilenamePopupItemActionPerformed + }//GEN-LAST:event_CopyBackupNamePopupItemActionPerformed private void CopyInitialPathPopupItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CopyInitialPathPopupItemActionPerformed if (selectedRow != -1) { @@ -1849,8 +1849,8 @@ public static void main(String args[]) { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBoxMenuItem AutoBackupMenuItem; private javax.swing.JMenu Backup; + private javax.swing.JMenuItem CopyBackupNamePopupItem; private javax.swing.JMenuItem CopyDestinationPathPopupItem; - private javax.swing.JMenuItem CopyFilenamePopupItem; private javax.swing.JMenuItem CopyInitialPathPopupItem; private javax.swing.JMenuItem DeletePopupItem; private javax.swing.JMenuItem DuplicatePopupItem; diff --git a/src/main/resources/res/log_file b/src/main/resources/res/log_file index 8dc3167..c9b038d 100644 --- a/src/main/resources/res/log_file +++ b/src/main/resources/res/log_file @@ -1,3 +1,28 @@ +2024-11-06T18:38:47.094931900 [INFO] Event --> share +2024-11-06T18:38:40.705057300 [INFO] Event --> shard website +2024-11-06T18:38:03.044570100 [INFO] The application is running with administrator privileges. +2024-11-06T18:38:01.771050600 [DEBUG] Background mode: false +2024-11-06T18:38:01.742282800 [INFO] Application started +2024-11-06T18:18:33.219556700 [INFO] The application is running with administrator privileges. +2024-11-06T18:18:32.725260800 [DEBUG] Background mode: false +2024-11-06T18:18:32.707429800 [INFO] Application started +2024-11-06T18:17:45.890632100 [INFO] The application is running with administrator privileges. +2024-11-06T18:17:45.393987300 [DEBUG] Background mode: false +2024-11-06T18:17:45.377123100 [INFO] Application started +2024-11-06T18:15:45.049149500 [INFO] Event --> backup renaming +2024-11-06T18:15:28.918572900 [INFO] Event --> backup renaming +2024-11-06T18:15:12.784110100 [INFO] The application is running with administrator privileges. +2024-11-06T18:15:12.288021400 [DEBUG] Background mode: false +2024-11-06T18:15:12.270165400 [INFO] Application started +2024-11-06T18:13:04.762108500 [WARN] The folder does not exist or is invalid +2024-11-06T18:13:04.756156300 [INFO] Event --> opening folder +2024-11-06T18:12:57.105817100 [INFO] Event --> opening folder +2024-11-06T18:12:51.280874 [INFO] Event --> opening folder +2024-11-06T18:12:01.705521200 [INFO] You selected the directory: C:\Users\Utente\Desktop\gg +2024-11-06T18:11:57.123456400 [INFO] You selected the file: C:\Users\Utente\Desktop\Aseprite.url +2024-11-06T18:10:45.576643500 [INFO] The application is running with administrator privileges. +2024-11-06T18:10:45.034874200 [DEBUG] Background mode: false +2024-11-06T18:10:45.017415300 [INFO] Application started 2024-11-06T15:31:37.256730900 [INFO] The application is running with administrator privileges. 2024-11-06T15:31:36.781522200 [DEBUG] Background mode: false 2024-11-06T15:31:36.763666500 [INFO] Application started