Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy

SearchReplaceInDirectoryMacro.groovy (revision 479)
25 25
// imports
26 26
import org.kohsuke.args4j.*
27 27
import groovy.transform.Field
28
import org.txm.rcp.swt.widget.parameters.*
28
import org.txm.rcpapplication.swt.widget.parameters.*
29 29

  
30 30
// parameters
31 31

  
32 32
// **change this parameter**
33
@Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à modifier", widget="Folder", required=true, def='voeux')
33
@Field @Option(name="inputDirectory",usage="Dossier qui contient les fichiers à modifier", widget="Folder", required=true, def='voeux')
34 34
		inputDirectory = new File(System.getProperty("user.home"), "Bureau/voeux")
35 35

  
36 36
// **change this parameter**
37
@Field @Option(name="extension", usage="Regexp de l'extension des fichiers à modifier", widget="String", required=true, def='\\.txt')
37
@Field @Option(name="extension",usage="Regexp de l'extension des fichiers à modifier", widget="String", required=true, def='\\.txt')
38 38
		extension = "\\.txt"
39 39

  
40 40
// **change this parameter**
41
@Field @Option(name="find", usage="Expression régulière", widget="String", required=true, def='’')
41
@Field @Option(name="find",usage="Expression régulière", widget="String", required=true, def='’')
42 42
		find = "’"
43 43

  
44 44
// **change this parameter**
45
@Field @Option(name="replaceWith", usage="Chaîne de remplacement", widget="String", required=false, def='\'')
45
@Field @Option(name="replaceWith",usage="Chaîne de remplacement", widget="String", required=false, def='\'')
46 46
		replaceWith = "'"
47 47

  
48 48
// **change this parameter**
49
@Field @Option(name="encoding", usage="Encodage des fichiers", widget="String", required=true, def='UTF-8')
49
@Field @Option(name="encoding",usage="Encodage des fichiers", widget="String", required=true, def='UTF-8')
50 50
		encoding = "utf-8"
51 51

  
52 52
// **change this parameter**
53 53
// 'true' = only display matching lines, 'false' = replace in matching files
54
//@Field @Option(name="showMatchingFilesOnly", usage="Montrer seulement les matchs", widget="Boolean", required=false, def='false')
54
//@Field @Option(name="showMatchingFilesOnly",usage="Montrer seulement les matchs", widget="Boolean", required=false, def='false')
55 55
		showMatchingFilesOnly = false;
56 56

  
57 57
if (!ParametersDialog.open(this)) return;

Also available in: Unified diff