Replace tab by space and remove trailing comment

This commit is contained in:
Didier Clermonté 2016-08-17 23:38:04 +02:00
parent 8bc116734c
commit ee8abfbca8
14 changed files with 1480 additions and 1478 deletions

View File

@ -90,7 +90,7 @@ org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
@ -297,7 +297,7 @@ org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

View File

@ -49,7 +49,7 @@ public final class SibaCLI
{
File result;
result = SibaManager.backup(directoryToSave);
System.out.println(BUNDLE.getString("confirmDialog.text") + result.getName()); //$NON-NLS-1$
System.out.println(BUNDLE.getString("confirmDialog.text") + result.getName());
}
/**
@ -67,7 +67,7 @@ public final class SibaCLI
{
File result;
result = SibaManager.backup(directoryToSave, targetDirectory);
System.out.println(BUNDLE.getString("confirmDialog.text") + result.getName()); //$NON-NLS-1$
System.out.println(BUNDLE.getString("confirmDialog.text") + result.getName());
}
/**
@ -178,7 +178,7 @@ public final class SibaCLI
}
else
{
throw new SibaException(BUNDLE.getString("ToManyParameter.text")); //$NON-NLS-1$
throw new SibaException(BUNDLE.getString("ToManyParameter.text"));
}
}
else if (StringUtils.equals(args[0], "check"))
@ -207,7 +207,7 @@ public final class SibaCLI
}
else
{
throw new SibaException(BUNDLE.getString("ToManyParameter.text")); //$NON-NLS-1$
throw new SibaException(BUNDLE.getString("ToManyParameter.text"));
}
}
else

View File

@ -73,7 +73,7 @@ public class BackupPanel extends JPanel
JPanel helpPanel = new JPanel();
add(helpPanel, BorderLayout.NORTH);
JLabel lblHelp = new JLabel(BUNDLE.getString("BackupPanel.lblNewLabel_2.text")); //$NON-NLS-1$
JLabel lblHelp = new JLabel(BUNDLE.getString("BackupPanel.lblNewLabel_2.text"));
helpPanel.add(lblHelp);
JPanel choosePanel = new JPanel();
@ -86,7 +86,7 @@ public class BackupPanel extends JPanel
FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, }));
JLabel lblSourceDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblSourceDirectory.text")); //$NON-NLS-1$
JLabel lblSourceDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblSourceDirectory.text"));
choosePanel.add(lblSourceDirectory, "2, 2");
lblSourceDirectory.setHorizontalAlignment(SwingConstants.LEFT);
lblSourceDirectory.setVerticalAlignment(SwingConstants.TOP);
@ -95,7 +95,7 @@ public class BackupPanel extends JPanel
choosePanel.add(this.sourceDirectoryField, "4, 2");
this.sourceDirectoryField.setColumns(10);
JButton btnSourceDirectory = new JButton(BUNDLE.getString("BackupPanel.btnNewButton.text")); //$NON-NLS-1$
JButton btnSourceDirectory = new JButton(BUNDLE.getString("BackupPanel.btnNewButton.text"));
btnSourceDirectory.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
btnSourceDirectory.addActionListener(new ActionListener()
{
@ -113,7 +113,7 @@ public class BackupPanel extends JPanel
});
choosePanel.add(btnSourceDirectory, "6, 2");
JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text")); //$NON-NLS-1$
JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text"));
choosePanel.add(lblTargetDirectory, "2, 4");
lblTargetDirectory.setVerticalAlignment(SwingConstants.TOP);
lblTargetDirectory.setHorizontalAlignment(SwingConstants.LEFT);
@ -122,7 +122,7 @@ public class BackupPanel extends JPanel
choosePanel.add(this.targetDirectoryField, "4, 4");
this.targetDirectoryField.setColumns(10);
JButton btnTarget = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$
JButton btnTarget = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text"));
btnTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
btnTarget.addActionListener(new ActionListener()
{
@ -157,7 +157,7 @@ public class BackupPanel extends JPanel
Component horizontalGlue = Box.createHorizontalGlue();
buttonActionPanel.add(horizontalGlue);
JButton btnBackup = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_2.text")); //$NON-NLS-1$
JButton btnBackup = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_2.text"));
btnBackup.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
buttonActionPanel.add(btnBackup);

View File

@ -49,7 +49,7 @@ public class CheckDirectorySelector extends JFileChooser
//
setSelectedFile(file);
setDialogTitle(BUNDLE.getString("CheckDirectorySelector.this.dialogTitle")); //$NON-NLS-1$
setDialogTitle(BUNDLE.getString("CheckDirectorySelector.this.dialogTitle"));
setFileSelectionMode(JFileChooser.FILES_ONLY);
FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichiers md5", "md5");
setAcceptAllFileFilterUsed(false);

View File

@ -77,11 +77,11 @@ public class CheckPanel extends JPanel
FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, },
new RowSpec[] { FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, }));
JLabel lblNewLabel = new JLabel(BUNDLE.getString("CheckPanel.lblNewLabel.text")); //$NON-NLS-1$
JLabel lblNewLabel = new JLabel(BUNDLE.getString("CheckPanel.lblNewLabel.text"));
lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
choosePanel.add(lblNewLabel, "2, 2, left, center");
JButton btnNewButton = new JButton(BUNDLE.getString("CheckPanel.btnNewButton.text")); //$NON-NLS-1$
JButton btnNewButton = new JButton(BUNDLE.getString("CheckPanel.btnNewButton.text"));
btnNewButton.addActionListener(new ActionListener()
{
@Override
@ -116,7 +116,7 @@ public class CheckPanel extends JPanel
Component horizontalGlue = Box.createHorizontalGlue();
panel.add(horizontalGlue);
JButton btnCheck = new JButton(BUNDLE.getString("CheckPanel.btnNewButton_1.text")); //$NON-NLS-1$
JButton btnCheck = new JButton(BUNDLE.getString("CheckPanel.btnNewButton_1.text"));
panel.add(btnCheck);
btnCheck.addActionListener(new ActionListener()
{

View File

@ -172,13 +172,13 @@ public final class SibaGUI
this.backupPanel = new BackupPanel();
this.backupPanel.setBackground(new Color(0, 255, 0));
tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleBackupPanel.text"), //$NON-NLS-1$
tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleBackupPanel.text"),
new ImageIcon(SibaGUI.class.getResource("/org/dclermonte/siba/gui/SibaLogo.png")), this.backupPanel,
null);
this.checkPanel = new CheckPanel();
this.checkPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
this.checkPanel.setBackground(new Color(144, 238, 144));
tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleCheckPanel.text"), //$NON-NLS-1$
tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleCheckPanel.text"),
new ImageIcon(SibaGUI.class.getResource("/org/dclermonte/siba/gui/SibaLogo.png")), this.checkPanel,
null);
this.frmSimpleBackup.setFont(new Font("DejaVu Sans", Font.BOLD, 12));
@ -192,14 +192,14 @@ public final class SibaGUI
menuBar.setBackground(Color.GREEN);
this.frmSimpleBackup.setJMenuBar(menuBar);
JMenu mnFile = new JMenu(BUNDLE.getString("SibaGUI.mnFile.text")); //$NON-NLS-1$
JMenu mnFile = new JMenu(BUNDLE.getString("SibaGUI.mnFile.text"));
mnFile.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
mnFile.setBackground(Color.GREEN);
mnFile.setMnemonic('F');
mnFile.setForeground(Color.BLACK);
menuBar.add(mnFile);
JMenuItem mntmBackup = new JMenuItem(BUNDLE.getString("SibaGUI.mntmBackup.text")); //$NON-NLS-1$
JMenuItem mntmBackup = new JMenuItem(BUNDLE.getString("SibaGUI.mntmBackup.text"));
mntmBackup.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
mntmBackup.setBackground(Color.GREEN);
mntmBackup.addActionListener(new ActionListener()
@ -217,7 +217,7 @@ public final class SibaGUI
});
mnFile.add(mntmBackup);
JMenuItem mntmCheck = new JMenuItem(BUNDLE.getString("SibaGUI.mntmCheck.text")); //$NON-NLS-1$
JMenuItem mntmCheck = new JMenuItem(BUNDLE.getString("SibaGUI.mntmCheck.text"));
mntmCheck.setBackground(Color.GREEN);
mntmCheck.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
mntmCheck.addActionListener(new ActionListener()
@ -235,7 +235,7 @@ public final class SibaGUI
});
mnFile.add(mntmCheck);
JMenuItem mntmQuit = new JMenuItem(BUNDLE.getString("SibaGUI.mntmQuit.text")); //$NON-NLS-1$
JMenuItem mntmQuit = new JMenuItem(BUNDLE.getString("SibaGUI.mntmQuit.text"));
mntmQuit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
mntmQuit.setBackground(Color.GREEN);
mntmQuit.setMnemonic(KeyEvent.VK_Q);
@ -252,7 +252,7 @@ public final class SibaGUI
mnFile.add(separator);
mnFile.add(mntmQuit);
JMenu mnNewMenu = new JMenu(BUNDLE.getString("SibaGUI.mnNewMenu.text")); //$NON-NLS-1$
JMenu mnNewMenu = new JMenu(BUNDLE.getString("SibaGUI.mnNewMenu.text"));
mnNewMenu.setMnemonic('H');
mnNewMenu.setLocation(new Point(500, 0));
mnNewMenu.setHorizontalTextPosition(SwingConstants.RIGHT);

View File

@ -48,7 +48,7 @@ public class SourceDirectorySelector extends JFileChooser
//
setSelectedFile(file);
setDialogTitle(BUNDLE.getString("SourceDirectorySelector.this.dialogTitle")); //$NON-NLS-1$
setDialogTitle(BUNDLE.getString("SourceDirectorySelector.this.dialogTitle"));
setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
setAcceptAllFileFilterUsed(false);
setApproveButtonText(BUNDLE.getString("BackupPanel.sourceFileChooserButton.text"));

View File

@ -49,7 +49,7 @@ public class TargetDirectorySelector extends JFileChooser
//
setSelectedFile(file);
setDialogTitle(BUNDLE.getString("TargetDirectorySelector.this.dialogTitle")); //$NON-NLS-1$
setDialogTitle(BUNDLE.getString("TargetDirectorySelector.this.dialogTitle"));
setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
setAcceptAllFileFilterUsed(false);
setApproveButtonText(BUNDLE.getString("BackupPanel.targetFileChooserButton.text"));

View File

@ -70,7 +70,7 @@ public final class SibaManager
}
/**
* This method perform the backup.
* This method performs the backup.
*
* @param fileToSave
* name of the directory to save
@ -159,11 +159,11 @@ public final class SibaManager
}
catch (IOException exception)
{
throw new SibaException(BUNDLE.getString("ioExceptionCheck.text"), exception); //$NON-NLS-1$
throw new SibaException(BUNDLE.getString("ioExceptionCheck.text"), exception);
}
catch (NoSuchAlgorithmException exception)
{
throw new SibaException(BUNDLE.getString("noSuchAlgorithm.text"), exception); //$NON-NLS-1$
throw new SibaException(BUNDLE.getString("noSuchAlgorithm.text"), exception);
}
//

View File

@ -211,6 +211,7 @@ public final class SibaUtils
public static File readFileNameToCheck(final File choosenFile) throws IOException
{
File result;
FileReader in = null;
try
{
@ -241,6 +242,7 @@ public final class SibaUtils
{
IOUtils.closeQuietly(in);
}
//
return result;
}