Révision 2154

tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/SchemasProgressionMacro.groovy (revision 2154)
102 102
		cql_limit_matches = corpus.getMatches()
103 103
	}
104 104
	
105
	mainCorpus = corpus.getMainCorpus()
105
	def word = corpus.getWordProperty()
106
	def analecCorpus = URSCorpora.getCorpus(corpus)
106 107

  
107
	def word = mainCorpus.getWordProperty()
108
	def analecCorpus = URSCorpora.getCorpus(mainCorpus)
109

  
110 108
	def errors = AnalecUtils.isPropertyDefined(Schema.class, analecCorpus, schema_ursql)
111 109
	if (errors.size() > 0) {
112 110
		println "** The $schema_ursql schema URSQL cannot be computed in the corpus with types: $errors."
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/edit/UnitsAnnotateMacro.groovy (revision 2154)
77 77
	def word = corpus.getWordProperty()
78 78
	def analecCorpus = URSCorpora.getCorpus(corpus)
79 79
	Vue analecView = URSCorpora.getVue(corpus)
80
	def typesAVoir = analecView.getTypesAVoir(Unite.class)
81
	
80 82
	Structure structure = analecCorpus.getStructure()
81 83

  
82 84
	AnalecUtils.defineProperty(Unite.class, analecCorpus, unit_ursql, property_name)
83
	analecView.initVueParDefaut()
84 85

  
85 86
	def selectedUnits = AnalecUtils.selectUnitsInSchema(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size,
86 87
			unit_ursql, position_in_schema, cql_limit, strict_inclusion, position_in_matches);
......
89 90
	def n = 0
90 91
	def nerrors = 0
91 92
	for (Unite unit : selectedUnits) {
92
		
93
		String unit_type = unit.getType()
94
		// ensure the unit_type & property_name are declared in the Vue
95
		if (!typesAVoir.contains(unit_type)) {
96
			analecView.ajouterType(Unite.class, unit_type)
97
		}
98
		if (!analecView.getNomsChamps(Unite.class, unit_type).contains(property_name)) {
99
			analecView.ajouterProp(Unite.class, unit_type, property_name)
100
		}
93 101
		if (!analecView.setValeurChamp(unit, property_name, property_value)) {
94 102
			errors << ""+unit.getDeb()+"->"+unit.getFin()
95 103
			nerrors++
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/edit/ConcordanceToUnitsMacro.groovy (revision 2154)
12 12
import org.txm.concordance.core.functions.Concordance
13 13
import org.txm.concordance.rcp.editors.ConcordanceEditor
14 14
import visuAnalec.elements.Unite
15
import visuAnalec.vue.Vue
15 16

  
16 17
// BEGINNING OF PARAMETERS
17 18

  
......
85 86
	analecCorpus.getStructure().ajouterVal(Unite.class, unit_type, property_name, property_value)
86 87
}
87 88

  
89
Vue vue = URSCorpora.getVue(corpus)
90
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
91
	vue.ajouterType(Unite.class, unit_type)
92
}
93
if (!vue.getNomsChamps(Unite.class, unit_type).contains(property_name)) {
94
	vue.ajouterProp(Unite.class, unit_type, property_name)
95
}
96

  
88 97
// browse lines and check
89 98
def units = analecCorpus.getUnites(unit_type)
90 99
def lines = concordance.getLines()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/DemoMacro.groovy (revision 2154)
23 23

  
24 24
def view = URSCorpora.getVue(corpus)
25 25

  
26
// set a default vue -> all is visible
27
view.retablirVueParDefaut()
28

  
29
// list the viewed types and properties
30
for (def type : view.getTypesAVoir(Unite.class)) {
31
	println "$type: "+view.getNomsChamps(Unite.class, type)
32
}
33

  
34
// manage the viewed&enabled type, properties ; the types and properties must be enabled to use the "view.setValeurChamp(TYPE, PROPERTY, VALUE)" method
35
view.ajouterType(Unite.class, "EXEMPLE")
36
view.ajouterProp(Unite.class, "EXEMPLE", "PEXEMPLE")
37

  
26 38
// display annotations per Element type (Unite, Relation, Schema) and per type
27 39

  
28 40
// Create annotation type
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/PROPERanaphoriquesMacro.groovy (revision 2154)
29 29
// CORPS DU SCRIPT
30 30

  
31 31
if (!(corpusViewSelection instanceof MainCorpus)) {
32
	println "Corpora selection is not a Corpus: "+corpusViewSelection
32
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
33 33
	return
34 34
}
35 35

  
......
60 60
structure.ajouterVal(Unite.class, unit_type, CATEGORIE, "PRO.PERA")
61 61
structure.ajouterVal(Unite.class, unit_type, CATEGORIE, "PRO.PERD")
62 62

  
63
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
64
	vue.ajouterType(Unite.class, unit_type)
65
}
66
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
67
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
68
}
69

  
63 70
def nModified = 0
64 71
def nIgnored = 0
65 72
def nProPerA = 0
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Frpos2CategorieMacro.groovy (revision 2154)
158 158
// CORPS DU SCRIPT
159 159

  
160 160
if (!(corpusViewSelection instanceof MainCorpus)) {
161
	println "Corpora selection is not a Corpus"
161
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
162 162
	return
163 163
}
164 164

  
......
210 210
//...
211 211
}
212 212

  
213
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
214
	vue.ajouterType(Unite.class, unit_type)
215
}
216
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
217
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
218
}
219

  
213 220
def nModified = 0
214 221
def nIgnored = 0
215 222

  
......
249 256

  
250 257
// udpate the view (also see also
251 258
// http://forge.cbp.ens-lyon.fr/redmine/issues/2065)
252
URSCorpora.getVue(analecCorpus).retablirVueParDefaut()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/CreationChainesMacro.groovy (revision 2154)
15 15
import visuAnalec.vue.Vue
16 16

  
17 17
if (!(corpusViewSelection instanceof MainCorpus)) {
18
	println "Corpora selection is not a Corpus"
18
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
19 19
	return;
20 20
}
21 21

  
......
30 30
int nUpdated = 0 // count the number of updated CHAINE
31 31

  
32 32
MainCorpus corpus = corpusViewSelection
33
def analecCorpus = URSCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus
33
def analecCorpus = URSCorpora.getCorpus(corpus); 
34 34
Structure structure = analecCorpus.getStructure()
35 35
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
36 36
	println "Error: corpus structure does not contains unit with name=$unit_type"
......
63 63
	analecCorpus.ajouterVal(Schema.class, "CHAINE", "TYPE REFERENT", "LIEU")
64 64
}
65 65

  
66
Vue vue = URSCorpora.getVue(corpus)
67
if (!vue.getTypesAVoir(Schema.class).contains("CHAINE")) {
68
	vue.ajouterType(Schema.class, "CHAINE")
69
}
70
if (!vue.getNomsChamps(Schema.class, "CHAINE").contains("REF")) {
71
	vue.ajouterProp(Schema.class, "CHAINE", "REF")
72
}
73
if (!vue.getNomsChamps(Schema.class, "CHAINE").contains("GENRE")) {
74
	vue.ajouterProp(Schema.class, "CHAINE", "GENRE")
75
}
76
if (!vue.getNomsChamps(Schema.class, "CHAINE").contains("NOMBRE")) {
77
	vue.ajouterProp(Schema.class, "CHAINE", "NOMBRE")
78
}
79
if (!vue.getNomsChamps(Schema.class, "CHAINE").contains("NB MAILLONS")) {
80
	vue.ajouterProp(Schema.class, "CHAINE", "NB MAILLONS")
81
}
82
if (!vue.getNomsChamps(Schema.class, "CHAINE").contains("TYPE")) {
83
	vue.ajouterProp(Schema.class, "CHAINE", "TYPE")
84
}
85

  
66 86
def props = structure.getUniteProperties(unit_type)
67 87
if (!props.contains(ref_property)) { // check the unit_type units have the REF property
68 88
	println "Error: $unit_type units have no proprerty named '$ref_property'"
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/SUJ-PARTINFMacro.groovy (revision 2154)
6 6
import org.txm.*
7 7
import org.txm.rcpapplication.swt.widget.parameters.*
8 8
import org.txm.analec.*
9
import org.txm.annotation.urs.*
9 10
import org.txm.searchengine.cqp.*
10 11
import org.txm.searchengine.cqp.corpus.*
11 12
import visuAnalec.Message.*
......
26 27
// CORPS DU SCRIPT
27 28

  
28 29
if (!(corpusViewSelection instanceof MainCorpus)) {
29
	println "Corpora selection is not a Corpus: "+corpusViewSelection
30
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
30 31
	return
31 32
}
32 33

  
......
49 50
	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
50 51
	return
51 52
}
52
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
53
vue = AnalecCorpora.getVue(corpus.getName())
53
analecCorpus = URSCorpora.getCorpus(corpus)
54
vue = URSCorpora.getVue(corpus)
54 55
structure = analecCorpus.getStructure()
55 56
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
56 57
	println "Erreur : le corpus ne contient d'unité de type $unit_type"
......
64 65
	return
65 66
}
66 67

  
68
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
69
	vue.ajouterType(Unite.class, unit_type)
70
}
71
if (!vue.getNomsChamps(Unite.class, unit_type).contains(property_name)) {
72
	vue.ajouterProp(Unite.class, unit_type, property_name)
73
}
74

  
67 75
def nModified = 0
68 76
def nIgnored = 0
69 77

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/AccessibiliteMacro.groovy (revision 2154)
64 64
	structure.ajouterVal(Unite.class, unit_type, ACCESSIBILITE, "Forte")
65 65
	structure.ajouterVal(Unite.class, unit_type, ACCESSIBILITE, "N/A")
66 66
}
67
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
68
	vue.ajouterType(Unite.class, unit_type)
69
}
70
if (!vue.getNomsChamps(Unite.class, unit_type).contains(ACCESSIBILITE)) {
71
	vue.ajouterProp(Unite.class, unit_type, ACCESSIBILITE)
72
}
67 73

  
68 74
def nModified = 0
69 75
def nIgnored = 0
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Fropos2CattexMacro.groovy (revision 2154)
151 151
// CORPS DU SCRIPT
152 152

  
153 153
if (!(corpusViewSelection instanceof MainCorpus)) {
154
	println "Corpora selection is not a Corpus"
154
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
155 155
	return
156 156
}
157 157

  
......
216 216
//...
217 217
}
218 218

  
219
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
220
	vue.ajouterType(Unite.class, unit_type)
221
}
222
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
223
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
224
}
225

  
219 226
def nModified = 0
220 227
def nIgnored = 0
221 228

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/VerificationsMacro.groovy (revision 2154)
38 38
// CORPS DU SCRIPT
39 39

  
40 40
if (!(corpusViewSelection instanceof MainCorpus)) {
41
	println "Corpora selection is not a Corpus"
41
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
42 42
	return
43 43
}
44 44

  
......
65 65
	return
66 66
}
67 67

  
68
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
69
vue = AnalecCorpora.getVue(corpus.getName())
68
analecCorpus = URSCorpora.getCorpus(corpus)
69
vue = URSCorpora.getVue(corpus)
70 70
structure = analecCorpus.getStructure()
71 71

  
72 72
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
......
255 255
println "- $nIgnored units of type $unit_type have not been modified."
256 256
println "- $nAdded forgotten pronominal units of type $unit_type have been added.\n"
257 257

  
258
AnalecCorpora.getVue(analecCorpus).retablirVueParDefaut()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/RetoucheComplementDuNomMacro.groovy (revision 2154)
7 7
import org.txm.*
8 8
import org.txm.rcpapplication.swt.widget.parameters.*
9 9
import org.txm.analec.*
10
import org.txm.annotation.urs.*
10 11
import org.txm.searchengine.cqp.*
11 12
import org.txm.searchengine.cqp.corpus.*
12 13
import visuAnalec.Message.*
......
42 43
if (!ParametersDialog.open(this)) return
43 44

  
44 45
corpus = corpusViewSelection
45
CQI = Toolbox.getCqiClient()
46
CQI = CQPSearchEngine.getCqiClient()
46 47
word = corpus.getWordProperty()
47 48

  
48
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
49
vue = AnalecCorpora.getVue(corpus.getName())
49
analecCorpus = URSCorpora.getCorpus(corpus)
50
vue = URSCorpora.getVue(corpus)
50 51
structure = analecCorpus.getStructure()
51 52
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
52 53
	println "Error: corpus structure does not contains unit with name=$unit_type"
......
62 63
def check_cat = "CDN.CHECK"
63 64
structure.ajouterVal(Unite.class, unit_type, category_name, check_cat)
64 65

  
66
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
67
	vue.ajouterType(Unite.class, unit_type)
68
}
69
if (!vue.getNomsChamps(Unite.class, unit_type).contains(category_name)) {
70
	vue.ajouterProp(Unite.class, unit_type, category_name)
71
}
65 72

  
66 73
def nModified = 0
67 74
def nIgnored1 = 0
......
78 85
println "$debut1 - $fin1"
79 86
units[1].setDeb( debut1 + 1)
80 87
units[1].setFin( fin1 + 1)
81
AnalecCorpora.getVue(analecCorpus).retablirVueParDefaut()
82 88
def debut2 = units[1].getDeb()
83 89
def fin2 = units[1].getFin()
84 90
println "$debut2 - $fin2"
85 91
*/
86 92

  
87

  
88 93
for (Unite unit : units) { // process all units
89 94
	
90 95
	def debut = unit.getDeb()
......
106 111
			   else println "not resizing"
107 112
			   def debut2 = unit.getDeb()
108 113
			   def fin2 = unit.getFin()
109
			   AnalecCorpora.getVue(analecCorpus).retablirVueParDefaut()
110 114
			   println "APRES => Unit $compteur : $debut2 - $fin2"
111 115
			   unit.getProps().put(category_name, check_cat)
112 116
			   break
......
124 128
println "- $nIgnored2 units have been ignored because no overlap.\n"
125 129
println "Total ($compteur)."
126 130

  
127
// END OF PARAMETERS
128
AnalecCorpora.getVue(analecCorpus).retablirVueParDefaut()
129
println "corpora selection: "+corpusViewSelection
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/CreationAnaphoresMacro.groovy (revision 2154)
19 19
import visuAnalec.vue.Vue
20 20

  
21 21
if (!(corpusViewSelection instanceof MainCorpus)) {
22
	println "Corpora selection is not a Corpus"
22
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
23 23
	return;
24 24
}
25 25

  
......
33 33
int nCreated = 0 // count the number of created RELATION
34 34

  
35 35
MainCorpus corpus = corpusViewSelection
36
def analecCorpus = URSCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus
36
def analecCorpus = URSCorpora.getCorpus(corpus);
37 37
Structure structure = analecCorpus.getStructure()
38 38
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
39 39
	println "Error: corpus structure does not contains unit with name=$unit_type"
......
54 54
	println "Error: This macro can't update existing Relations"
55 55
	return
56 56
}
57
Vue vue = URSCorpora.getVue(corpus)
58
if (!vue.getTypesAVoir(Relation.class).contains("ANAPHORE")) {
59
	vue.ajouterType(Relation.class, "ANAPHORE")
60
}
61
if (!vue.getNomsChamps(Relation.class, "ANAPHORE").contains("TYPE")) {
62
	vue.ajouterProp(Relation.class, "ANAPHORE", "TYPE")
63
}
57 64

  
58 65
for (Schema schema : analecCorpus.getSchemas(schema_type)) { // parse all CHAINE
59 66
	def units = []
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/LongueurDesMentionsMacro.groovy (revision 2154)
46 46
// CORPS DU SCRIPT
47 47

  
48 48
if (!(corpusViewSelection instanceof MainCorpus)) {
49
	println "Corpora selection is not a Corpus: "+corpusViewSelection
49
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
50 50
	return
51 51
}
52 52

  
......
89 89
	//...
90 90
}
91 91

  
92
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
93
	vue.ajouterType(Unite.class, unit_type)
94
}
95
if (!vue.getNomsChamps(Unite.class, unit_type).contains(LONGUEUR)) {
96
	vue.ajouterProp(Unite.class, unit_type, LONGUEUR)
97
}
98

  
92 99
def nModified = 0
93 100
def nIgnored = 0
94 101

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Fropos2CategorieMacro.groovy (revision 2154)
63 63
// CORPS DU SCRIPT
64 64

  
65 65
if (!(corpusViewSelection instanceof MainCorpus)) {
66
	println "Corpora selection is not a Corpus"
66
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
67 67
	return
68 68
}
69 69

  
......
109 109
//...
110 110
}
111 111

  
112
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
113
	vue.ajouterType(Unite.class, unit_type)
114
}
115
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
116
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
117
}
118

  
112 119
def nModified = 0
113 120
def nIgnored = 0
114 121

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Frpos2CategorieDemocratMacro.groovy (revision 2154)
158 158
// CORPS DU SCRIPT
159 159

  
160 160
if (!(corpusViewSelection instanceof MainCorpus)) {
161
	println "Corpora selection is not a Corpus"
161
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
162 162
	return
163 163
}
164 164

  
......
210 210
//...
211 211
}
212 212

  
213
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
214
	vue.ajouterType(Unite.class, unit_type)
215
}
216
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
217
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
218
}
219

  
213 220
def nModified = 0
214 221
def nIgnored = 0
215 222

  
......
249 256

  
250 257
// udpate the view (also see also
251 258
// http://forge.cbp.ens-lyon.fr/redmine/issues/2065)
252
URSCorpora.getVue(analecCorpus).retablirVueParDefaut()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/PremierMaillonMacro.groovy (revision 2154)
18 18
import visuAnalec.vue.Vue
19 19

  
20 20
if (!(corpusViewSelection instanceof MainCorpus)) {
21
	println "Corpora selection is not a Corpus"
21
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
22 22
	return;
23 23
}
24 24

  
......
54 54
	return
55 55
}
56 56

  
57
Vue vue = URSCorpora.getVue(corpus)
58
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
59
	vue.ajouterType(Unite.class, unit_type)
60
}
61
if (!vue.getNomsChamps(Unite.class, unit_type).contains(NEW)) {
62
	vue.ajouterProp(Unite.class, unit_type, NEW)
63
}
64

  
57 65
int nIgnored = 0; // number of units ignored
58 66
int nYes = 0 // number of "YES" unit set
59 67
int nNo = 0 // number of "NO" unit set
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Si2SingletonMacro.groovy (revision 2154)
21 21
// CORPS DU SCRIPT
22 22

  
23 23
if (!(corpusViewSelection instanceof MainCorpus)) {
24
	println "Corpora selection is not a Corpus"
24
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
25 25
	return
26 26
}
27 27

  
......
83 83
println "Result:"
84 84
println "- $nModified units of type $unitType have been modified."
85 85
println "- $nIgnored units of type $unitType have not been modified.\n"
86

  
87
// udpate the view (also see also
88
// http://forge.cbp.ens-lyon.fr/redmine/issues/2065)
89
URSCorpora.getVue(analecCorpus).retablirVueParDefaut()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/AjoutDefinitudeMacro.groovy (revision 2154)
55 55
	analecCorpus.ajouterVal(Unite.class, unit_type, DEFINITUDE, "AMBIGU");
56 56
	analecCorpus.ajouterVal(Unite.class, unit_type, DEFINITUDE, "NONE");
57 57
}
58
Vue vue = URSCorpora.getVue(corpus)
59
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
60
	vue.ajouterType(Unite.class, unit_type)
61
}
62
if (!vue.getNomsChamps(Unite.class, unit_type).contains(DEFINITUDE)) {
63
	vue.ajouterProp(Unite.class, unit_type, DEFINITUDE)
64
}
58 65

  
59 66
int nIgnored = 0 // number of ignored units
60 67
int nModified = 0 // number of modified units
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Frpos2CattexMacro.groovy (revision 2154)
164 164
// CORPS DU SCRIPT
165 165

  
166 166
if (!(corpusViewSelection instanceof MainCorpus)) {
167
	println "Corpora selection is not a Corpus"
167
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
168 168
	return
169 169
}
170 170

  
......
230 230
	structure.ajouterVal(Unite.class, unit_type, CATEGORIE, "ERREUR")
231 231
}
232 232

  
233
if (!vue.getTypesAVoir(Unite.class).contains(unit_type)) {
234
	vue.ajouterType(Unite.class, unit_type)
235
}
236
if (!vue.getNomsChamps(Unite.class, unit_type).contains(CATEGORIE)) {
237
	vue.ajouterProp(Unite.class, unit_type, CATEGORIE)
238
}
239

  
233 240
def nModified = 0
234 241
def nIgnored = 0
235 242

  
......
266 273
	println "Some rules should be added to this macro to process the following remaining 'FROPOS / words' values:"
267 274
	errors.keySet().each { println "fropos="+it+"\twords="+errors[it].join(" | ") }
268 275
}
269

  
270
// udpate the view (also see also
271
// http://forge.cbp.ens-lyon.fr/redmine/issues/2065)
272
URSCorpora.getVue(analecCorpus).retablirVueParDefaut()
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportAsMacro.groovy (revision 2154)
24 24
import visuAnalec.elements.*
25 25

  
26 26
def scriptName = this.class.getSimpleName()
27
if (!(corpusViewSelection instanceof CQPCorpus)) {
28
	println "** $scriptName please select a Corpus to run the macro"
27
if (!(corpusViewSelection instanceof MainCorpus)) {
28
	println "** $scriptName please select a MainCorpus to run the macro"
29 29
	return;
30 30
}
31 31

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportToGlozz1_0_0Macro.groovy (revision 2154)
31 31
// CHECK CORPUS
32 32

  
33 33
if (!(corpusViewSelection instanceof MainCorpus)) {
34
	println "Corpora selection is not a Corpus"
34
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
35 35
	return;
36 36
}
37 37

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportToGlozz1_1_0Macro.groovy (revision 2154)
41 41
// CHECK CORPUS
42 42

  
43 43
if (!(corpusViewSelection instanceof MainCorpus)) {
44
	println "Corpora selection is not a Corpus"
44
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
45 45
	return;
46 46
}
47 47

  
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportToGlozzMacro.groovy (revision 2154)
31 31
// CHECK CORPUS
32 32

  
33 33
if (!(corpusViewSelection instanceof MainCorpus)) {
34
	println "Corpora selection is not a Corpus"
34
	println "Corpora selection is not a MainCorpus: "+corpusViewSelection
35 35
	return;
36 36
}
37 37

  

Formats disponibles : Unified diff