Skip to content

Commit f55a9ab

Browse files
posibilidad de parar la ejecucion si hay mas de 40 ficheros
1 parent c28e984 commit f55a9ab

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

dist/compareToGit-0.4-boot.jar

4.83 MB
Binary file not shown.

dist/compareToGit-0.4-sources.jar

59.1 KB
Binary file not shown.

dist/compareToGit-0.4.jar

161 KB
Binary file not shown.

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.bcjj.gitCompare</groupId>
55
<artifactId>compareToGit</artifactId>
66
<packaging>jar</packaging>
7-
<version>0.3</version>
7+
<version>0.4</version>
88
<name>compareToGit</name>
99
<url>http://maven.apache.org</url>
1010

src/main/java/org/bcjj/gitCompare/gui/GitCompareMainWindow.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ If you do need the body, consider extracting the data you need and then calling
135135
*/
136136

137137
public class GitCompareMainWindow implements ContenedorHistorico {
138+
139+
private final int MAX_FILES_WARNING=40;
138140

139141
private final static String SUFIX_DEL="-del"; //$NON-NLS-1$
140142
private final static String TEMP_DIR_GITCOMPARE="/temp/gitCompare-"; //$NON-NLS-1$
@@ -731,10 +733,13 @@ public int compare(File f1, File f2) {
731733

732734
FileVsGit fileVsGit=new FileVsGit(fich,gitRepo,fileAbsMapeado,borrar,tempDirectoy);
733735
filesGit.add(fileVsGit);
734-
if (filesGit.size()==40) {
736+
if (filesGit.size()==MAX_FILES_WARNING) {
735737
int input = JOptionPane.showConfirmDialog(frmGitcompare,
736-
"There is more than 40 files. Are you sure to continue, or is the 'from Date' wrong? Continue?", "Lots of files, Continue?",
737-
JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
738+
"There is more than "+MAX_FILES_WARNING+" files. Are you sure to continue, or is the 'from Date' wrong? Continue?", "Lots of files, Continue?",
739+
JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
740+
if (input==JOptionPane.CANCEL_OPTION) {
741+
throw new Exception("cancelado por usuario");
742+
}
738743
}
739744
if (fileAbsMapeado.contains("codigo.java")) {
740745
System.out.println(fileAbsMapeado);
@@ -991,7 +996,7 @@ public static void showMessage(String message) {
991996
public static void showMessage(String message,boolean info) {
992997
int opc=JOptionPane.OK_OPTION;
993998
if (info) {
994-
opc=JOptionPane.PLAIN_MESSAGE;
999+
opc=JOptionPane.INFORMATION_MESSAGE;
9951000
}
9961001
JOptionPane.showMessageDialog(null, message,"CompareToGit",opc);
9971002
}

0 commit comments

Comments
 (0)