Révision 3575

TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.groovy (revision 3575)
12 12
import org.txm.core.preferences.TBXPreferences
13 13
import org.txm.rcp.swt.widget.parameters.*
14 14

  
15
@Field @Option(name="tsvFile", usage="The annotation TSV file", widget="FileOpen", required=true, def="")
16
def tsvFile
15
@Field @Option(name="csvFile", usage="The annotation CSV file", widget="FileOpen", required=true, def="")
16
def csvFile
17 17

  
18 18
@Field @Option(name="properties", usage="columns to inject separated by commas", widget="String", required=true, def="p1, p2, ... , pn")
19 19
def properties
......
24 24
@Field @Option(name="debug", usage="Debug de the macro", widget="Boolean", required=false, def="false")
25 25
def debug
26 26

  
27
if (!(corpusViewSelection instanceof MainCorpus)) {
28
	
29
	return;
30
}
31

  
27 32
if (!ParametersDialog.open(this)) return;
28 33

  
29
println "Importing the $properties properties in the $selection corpus"
34
println "Importing the $properties properties in the $corpusViewSelection corpus"
30 35

  
31
File inputDirectory = new File(selection.getParent().getProjectDirectory(), "txm/"+selection.getName())
36
File inputDirectory = new File(corpusViewSelection.getParent().getProjectDirectory(), "txm/"+selection.getName())
32 37

  
33 38
// insert the section in the TRS files
34 39
gse.runMacro(InjectWordPropTableMacro, ["inputDirectory": inputDirectory
35 40
	, "outputDirectory": inputDirectory
36
	, "tsvFile": tsvFile
41
	, "csvFile": csvFile
37 42
	, "properties": properties
38 43
	, "debug":debug] ,
39 44
)
40 45

  
41
org.txm.rcp.commands.workspace.UpdateCorpus.update(selection, update_edition)
46
org.txm.rcp.commands.workspace.UpdateCorpus.update(corpusViewSelection, update_edition)
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy (revision 3575)
18 18
@Field @Option(name="outputDirectory", usage="The result folder", widget="Folder", required=true, def="")
19 19
def outputDirectory
20 20

  
21
@Field @Option(name="csvFile", usage="The annotation TSV file", widget="FileOpen", required=true, def="")
21
@Field @Option(name="csvFile", usage="The annotation CSV file", widget="FileOpen", required=true, def="")
22 22
def csvFile
23 23

  
24 24
@Field @Option(name="properties", usage="columns to inject separated by commas", widget="String", required=true, def="p1, p2, ... , pn")
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy (revision 3575)
65 65
@Field @Option(name="references", usage="references to show", widget="String", required=true, def="text_id")
66 66
		def references
67 67

  
68
@Field @Option(name="csvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
68
@Field @Option(name="csvFile", usage="The result CSV file", widget="FileSave", required=true, def="")
69 69
		def csvFile
70 70

  
71 71
if (!ParametersDialog.open(this)) return;
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.groovy (revision 3575)
65 65
@Field @Option(name="references", usage="references to show", widget="String", required=true, def="text_id")
66 66
		def references
67 67

  
68
@Field @Option(name="csvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
68
@Field @Option(name="csvFile", usage="The result CSV file", widget="FileSave", required=true, def="export.tsv")
69 69
		def csvFile
70 70

  
71 71
if (!ParametersDialog.open(this)) return;
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java (revision 3575)
35 35

  
36 36
		HashMap<String, Object> defaultParameters = new HashMap<String, Object>();
37 37
		defaultParameters.put("properties", "frpos,frlemma"); //$NON-NLS-1$ //$NON-NLS-2$
38
		defaultParameters.put("tsvFile", corpus.getName()+"_annotations.tsv"); //$NON-NLS-1$ //$NON-NLS-2$
38
		defaultParameters.put("csvFile", corpus.getName()+"_annotations.tsv"); //$NON-NLS-1$ //$NON-NLS-2$
39 39
		
40 40
		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, null, null, defaultParameters); //$NON-NLS-1$
41 41
		return null;
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java (revision 3575)
70 70
		return update(corpus, false, TBXPreferences.getInstance().getBoolean(TBXPreferences.UPDATEEDITIONS));
71 71
	}
72 72
	
73
	public static JobHandler update(final MainCorpus corpus, boolean updateEdition) {
74
		return update(corpus, false, updateEdition);
75
	}
76
	
73 77
	public static JobHandler update(final MainCorpus corpus, boolean forceUpdate, boolean updateEdition) {
74 78
		
75 79
		final Project project = corpus.getProject();

Formats disponibles : Unified diff