Skip to content

Commit d3bed0e

Browse files
committed
[feature #124] Refactor spaces in Config.java
1 parent eadd9b0 commit d3bed0e

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

unitex/src/fr/umlv/unitex/config/Config.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class Config {
7676
*/
7777
private static File applicationDir;
7878
private static File unitexToolLogger;
79-
79+
8080
/**
8181
* Path of the directory <code>.../Unitex</code>
8282
*/
@@ -489,15 +489,15 @@ public static JFileChooser getFileEditionDialogBox() {
489489
fileEditionDialogBox.setDialogTitle("Select a file to edit");
490490
return fileEditionDialogBox;
491491
}
492-
492+
493493
public static JFileChooser initializeJFileChooser(JFileChooser jFileChooser,
494494
String extension, String description, String subfolder)
495495
{
496496
if (jFileChooser != null)
497497
return jFileChooser;
498498
jFileChooser = new JFileChooser();
499499
final PersonalFileFilter fileFilter=new PersonalFileFilter(extension,
500-
description);
500+
description);
501501
jFileChooser.addChoosableFileFilter(fileFilter);
502502
jFileChooser.setFileFilter(fileFilter);
503503
jFileChooser.setDialogType(JFileChooser.OPEN_DIALOG);
@@ -507,7 +507,7 @@ public static JFileChooser initializeJFileChooser(JFileChooser jFileChooser,
507507
jFileChooser.setDialogTitle("Select a file to edit");
508508
return jFileChooser;
509509
}
510-
510+
511511
public static JFileChooser getFileEditionDialogBox(String extension) {
512512
JFileChooser chooser;
513513
if(extension == null)
@@ -563,7 +563,7 @@ public static JFileChooser getTransducerListDialogBox() {
563563
//transducerListDialogBox.setControlButtonsAreShown(false);
564564
return transducerListDialogBox;
565565
}
566-
566+
567567
public static JFileChooser getExploreGraphOutputDialogBox() {
568568
if (exploreGraphOutputDialogBox != null)
569569
return exploreGraphOutputDialogBox;
@@ -847,7 +847,7 @@ public static String getUnitexToolLoggerSemVer() {
847847
try {
848848
CommandBuilder cmd = new VersionInfoCommand().getSemver();
849849
String[] comm = cmd.getCommandArguments(true);
850-
850+
851851
final Process p = Runtime.getRuntime().exec(comm);
852852
final BufferedReader in = new BufferedReader(
853853
new InputStreamReader(p.getInputStream(), "UTF8"));
@@ -887,13 +887,13 @@ private static void setApplicationDir(String appPath, File s) {
887887

888888
/**
889889
* Setup the UnitexToolLogger executable
890-
*
890+
*
891891
* @param path
892892
* external programs directory
893893
*
894894
* @author martinec
895895
*/
896-
public static File setupUnitexToolLogger(File path) {
896+
public static File setupUnitexToolLogger(File path) {
897897
// define the default unitexToolLogger path
898898
File UnitexToolLogger = new File(path, "UnitexToolLogger" +
899899
(Config.getSystem() == Config.WINDOWS_SYSTEM ? ".exe" : ""));
@@ -902,7 +902,7 @@ public static File setupUnitexToolLogger(File path) {
902902
// Windows, try to install it
903903
if(!UnitexToolLogger.exists() &&
904904
Config.getSystem() != Config.WINDOWS_SYSTEM) {
905-
// define the default setup script path
905+
// define the default setup script path
906906
File setupScript = new File(path, "install" + File.separatorChar + "setup");
907907
if(setupScript.exists()) {
908908
// setup ProcessBuilder
@@ -912,36 +912,36 @@ public static File setupUnitexToolLogger(File path) {
912912
StringBuilder sb = new StringBuilder();
913913
sb.append(setupScript.getAbsolutePath()).append(' ');
914914
sb.append("> ").append("install" + File.separatorChar + "setup.log");
915-
String cmd[] = new String[] { "sh", "-c", sb.toString() };
915+
String cmd[] = new String[] { "sh", "-c", sb.toString() };
916916
final ProcessBuilder pb = new ProcessBuilder(cmd);
917-
917+
918918
// Java 7+ only
919919
//final ProcessBuilder pb = new ProcessBuilder(setupScript.getAbsolutePath());
920920
//pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);
921921

922922
pb.directory(path);
923923
pb.redirectErrorStream(true);
924-
924+
925925
// show a "Please wait" message dialog. This was adapted from
926926
// @source http://www.coding-dude.com/wp/java/modal-progress-bar-dialog-java-swing
927927
java.awt.Frame f=null;
928928

929929
final JDialog dlgProgress = new JDialog(f, "Please wait until installation is finished", true);
930930
dlgProgress.setAlwaysOnTop(true);
931-
931+
932932
JLabel lblStatus = new JLabel("Compiling " + UnitexToolLogger.getName() + "...");
933-
933+
934934
JProgressBar pbProgress = new JProgressBar(0, 100);
935935
pbProgress.setIndeterminate(true);
936936

937937
dlgProgress.add(BorderLayout.NORTH, lblStatus);
938938
dlgProgress.add(BorderLayout.CENTER, pbProgress);
939-
939+
940940
// prevent the user from closing the dialog
941941
dlgProgress.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
942942

943943
dlgProgress.setSize(400, 90);
944-
944+
945945
// center on screen
946946
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
947947
dlgProgress.setLocation((screenSize.width - dlgProgress.getWidth()) / 2,
@@ -952,20 +952,20 @@ public static File setupUnitexToolLogger(File path) {
952952
@Override
953953
protected Void doInBackground() throws Exception {
954954
// execute the setup script
955-
try {
955+
try {
956956
// star script
957957
Process p = pb.start();
958958
// wait to finish
959959
p.waitFor();
960960
} catch (Exception e) {
961961
// do nothing
962-
}
962+
}
963963
return null;
964964
}
965965

966966
@Override
967967
protected void done() {
968-
//close the modal dialog
968+
//close the modal dialog
969969
dlgProgress.dispose();
970970
}
971971
};
@@ -976,7 +976,7 @@ protected void done() {
976976
dlgProgress.setVisible(true);
977977
}
978978
}
979-
979+
980980
// check if UnitexToolLogger exists
981981
if(!UnitexToolLogger.exists()) {
982982
JOptionPane.showMessageDialog(null,
@@ -986,7 +986,7 @@ protected void done() {
986986
UnitexToolLogger.getName() + " not found",
987987
JOptionPane.INFORMATION_MESSAGE);
988988
}
989-
989+
990990
return UnitexToolLogger;
991991
}
992992

@@ -1307,24 +1307,24 @@ private static void chooseInitialLanguage() {
13071307
final TreeSet<String> languages = new TreeSet<String>();
13081308
collectLanguage(getUnitexDir(), languages);
13091309
collectLanguage(getUserDir(), languages);
1310-
1310+
13111311
String [] langArr = languages.toArray(new String[0]);
13121312
int defaultLangIndex = -1;
13131313
String preferedLanguage = PreferencesManager.getUserPreferences().getPreferedLanguage();
13141314
if(preferedLanguage != null)
13151315
for(int i=0; i<langArr.length && defaultLangIndex == -1; i++)
13161316
if(preferedLanguage.equals(langArr[i]))
13171317
defaultLangIndex = i;
1318-
1318+
13191319
final JComboBox langList = new JComboBox(langArr);
13201320
if(defaultLangIndex != -1)
13211321
langList.setSelectedIndex(defaultLangIndex);
1322-
1322+
13231323
p.add(new JLabel("User: " + getUserName()));
13241324
p.add(new JLabel("Choose the language you want"));
13251325
p.add(new JLabel("to work on:"));
13261326
p.add(langList);
1327-
1327+
13281328
final JFrame frame = new JFrame();
13291329
frame.setAlwaysOnTop(true);
13301330
final String[] options = { "OK", "Exit" };
@@ -1336,7 +1336,7 @@ private static void chooseInitialLanguage() {
13361336
String selectedItem = (String) (langList.getSelectedItem());
13371337
setCurrentLanguage(selectedItem);
13381338
PreferencesManager.getUserPreferences().setPreferedLanguage(selectedItem);
1339-
1339+
13401340
}
13411341

13421342
/**

0 commit comments

Comments
 (0)