Révision 1614

tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1614)
1356 1356
				
1357 1357
				this.parent.removeChild(this);
1358 1358
				
1359
				// FIXME: to delete the hidden parent when using shortcut command (eg. Specificities on Partition that hides the parent LexicalTable)
1360
				// need to prove this method
1361
				if(!parent.isVisible() &&
1362
						!(parent instanceof Project) // FIXME: actually removing this test and modify DeleteObject.java method public static List<Object> delete(Object o) by removing the MainCorpus test should work
1363
						)	{
1364
					parent.delete();
1365
				}
1366

  
1367 1359
			}
1368 1360
			this.parent = null;
1369 1361
			return true;
tmp/org.txm.core/src/java/org/txm/objects/Project.java (revision 1614)
33 33
import java.lang.reflect.Constructor;
34 34
import java.util.ArrayList;
35 35
import java.util.Arrays;
36
import java.util.Date;
37 36
import java.util.HashMap;
38 37
import java.util.List;
39 38

  
40 39
import javax.xml.parsers.ParserConfigurationException;
41 40

  
42
import org.apache.commons.lang.StringUtils;
43 41
import org.eclipse.core.resources.IFolder;
44 42
import org.eclipse.core.resources.IProject;
45 43
import org.eclipse.core.resources.IResource;
......
66 64
import org.txm.core.results.TXMParameters;
67 65
import org.txm.core.results.TXMResult;
68 66
import org.txm.importer.xtz.ImportKeys;
69
import org.txm.utils.ConsoleProgressBar;
70 67
import org.txm.utils.LogMonitor;
71 68
import org.txm.utils.logger.Log;
72 69
import org.txm.utils.zip.Zip;
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java (revision 1614)
214 214
				ArrayList<Annotation> allSegmentAnnotations = new ArrayList<Annotation>();
215 215
				ArrayList<Annotation> allTokenAnnotations = new ArrayList<Annotation>();
216 216

  
217
				System.out.println("Using KR="+defaultKR);
217
				//System.out.println("Using KR="+defaultKR);
218 218
				for (Annotation a : allAnnotations) {
219 219
					AnnotationType type = defaultKR.getType(a.getType());
220 220
					if (type != null) {
tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java (revision 1614)
91 91
					//project._load(params);
92 92
				}
93 93
				
94
				project.setDoUpdate(false);
94 95
				project.saveParameters();
95 96
				return true;
96 97
			} catch (Exception e) {
tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java (revision 1614)
28 28
package org.txm.rcp.handlers.results;
29 29

  
30 30
import java.util.ArrayList;
31
import java.util.Collection;
31 32
import java.util.HashSet;
32 33
import java.util.List;
33 34

  
......
53 54
import org.txm.core.engines.EngineType;
54 55
import org.txm.core.messages.TXMCoreMessages;
55 56
import org.txm.core.results.TXMResult;
57
import org.txm.objects.CorpusBuild;
56 58
import org.txm.objects.Project;
57 59
import org.txm.rcp.StatusLine;
58 60
import org.txm.rcp.editors.TXMEditor;
......
146 148
			return new HashSet<Object>();
147 149
		}
148 150
		
149
		List<Object> objects = new ArrayList<Object>(selection.toList());
150
		return delete(objects);
151
		HashSet<Object> objects = new HashSet<Object>(selection.toList());
152
		HashSet<Object> hidden = new HashSet<Object>();
153
		for (Object o : objects) {
154
			if (o != null && o instanceof TXMResult) {
155
				TXMResult r = (TXMResult) o;
156
				TXMResult parent = r.getParent();
157
				while (parent != null && !(parent instanceof CorpusBuild) && !parent.isVisible()) {
158
					hidden.add(parent);
159
					parent = parent.getParent();
160
				}
161
			}
162
		}
163
		objects.addAll(hidden);
164
		return delete(new ArrayList<Object>(objects));
151 165
	}
152 166
	
153 167

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java (revision 1614)
1017 1017
	public void startImport() {
1018 1018
		//TODO: test all sections here
1019 1019
		project.setDirty();
1020
		project.setDoUpdate(false);
1020 1021
		project.setNeedToBuild();
1021 1022
		ExecuteImportScript.executeScript(project);
1022 1023

  
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages_fr.properties (revision 1614)
3 3
aboutAnnotations=À propos des annotations
4 4
addANewCategory=Ajouter une nouvelle catégorie
5 5
affect=Affecter
6
AffectP0ToSelectionEqualsP1=Affecter {0} à la sélection ({1}).
6
AffectP0ToSelectionEqualsP1=Affectation de {0} à la sélection ({1}).
7 7
all=Tous
8
allLines=toutes les lignes
8
allLines=Toutes les lignes
9 9
annotatingConcordanceSelection=Annotation de la sélection de la concordance...
10 10
annotationCanceledByUser=Annotation annulée par l'utilisateur.
11 11
availableAnnotationTypesColonP0=Types d''annotation disponibles\: {0}
tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java (revision 1614)
63 63
			}
64 64
			
65 65
			if (project.getDoUpdate()) {
66
				// drop CorpusBuild and Editions
66
							// drop CorpusBuild and Editions
67 67
				List<? extends CorpusBuild> corpora = project.getCorpora();
68 68
				while (project.getCorpora().size() > 0) {
69 69
					CorpusBuild c = project.getCorpora().get(0);
70 70
					c.delete();
71 71
				}
72
				
73 72
				List<Text> texts = project.getTexts();
74 73
				for (Text t : texts) {
75 74
					while (t.getEditions().size() > 0) {
......
77 76
						ed.delete();
78 77
					}
79 78
				}
80
				
81 79
			} else {
82 80
				// clear all children
83 81
				while (project.getChildren().size() > 0) {
84 82
					TXMResult child = project.getChildren().get(0);
85 83
					child.delete();
86 84
				}
87

  
88 85
			}
89 86

  
90 87
			// the binary directory which is going to be created

Formats disponibles : Unified diff