Révision 372
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java (revision 372) | ||
---|---|---|
49 | 49 |
import org.eclipse.ui.IWorkbenchWindow; |
50 | 50 |
import org.eclipse.ui.handlers.HandlerUtil; |
51 | 51 |
import org.eclipse.ui.internal.Workbench; |
52 |
import org.txm.concordances.functions.Concordance;
|
|
52 |
import org.txm.concordance.core.functions.Concordance;
|
|
53 | 53 |
import org.txm.core.preferences.TXMPreferences; |
54 | 54 |
import org.txm.core.results.ITXMResult; |
55 | 55 |
import org.txm.functions.Function; |
... | ... | |
263 | 263 |
// p.removeResult(specif); |
264 | 264 |
// } |
265 | 265 |
// System.out.println(NLS.bind(Messages.DeleteObject_10, specif.getName())); |
266 |
} else if (o instanceof Concordance) { |
|
267 |
Concordance conc = (Concordance) o; |
|
268 |
Corpus c = conc.getCorpus(); |
|
269 |
c.removeResult(conc); |
|
270 |
conc.cleanMemory(); |
|
271 |
System.out.println(NLS.bind(Messages.DeleteObject_10, conc.getName())); |
|
266 |
// } else if (o instanceof Concordance) {
|
|
267 |
// Concordance conc = (Concordance) o;
|
|
268 |
// Corpus c = conc.getCorpus();
|
|
269 |
// c.removeResult(conc);
|
|
270 |
// conc.cleanMemory();
|
|
271 |
// System.out.println(NLS.bind(Messages.DeleteObject_10, conc.getName()));
|
|
272 | 272 |
} else if (o instanceof Referencer) { |
273 | 273 |
Referencer referencer = (Referencer) o; |
274 | 274 |
Corpus c = referencer.getCorpus(); |
275 | 275 |
c.removeResult(referencer); |
276 | 276 |
System.out.println(NLS.bind(Messages.DeleteObject_10, referencer.getName())); |
277 |
// } else if (o instanceof Cooccurrence) { |
|
277 |
} |
|
278 |
// else if (o instanceof Cooccurrence) { |
|
278 | 279 |
// Cooccurrence cooc = (Cooccurrence) o; |
279 | 280 |
// Corpus c = cooc.getCorpus(); |
280 | 281 |
// c.removeResult(cooc); |
... | ... | |
303 | 304 |
// cah.delete(); |
304 | 305 |
// deleted.add(cah); |
305 | 306 |
// System.out.println(NLS.bind(Messages.DeleteObject_10, cah.getName())); |
306 |
} else if (o instanceof LexicalTable) { |
|
307 |
LexicalTable lt = (LexicalTable) o; |
|
308 |
for (int i = 0 ; i < lt.getResults().size() ; i++) { |
|
309 |
deleted.addAll(delete(lt.getResults().get(i))); |
|
310 |
i--; |
|
311 |
} |
|
312 |
lt.getParent().removeResult(lt); |
|
313 |
System.out.println(NLS.bind(Messages.DeleteObject_10, lt.getName())); |
|
314 |
|
|
315 |
} |
|
307 |
// } else if (o instanceof LexicalTable) {
|
|
308 |
// LexicalTable lt = (LexicalTable) o;
|
|
309 |
// for (int i = 0 ; i < lt.getResults().size() ; i++) {
|
|
310 |
// deleted.addAll(delete(lt.getResults().get(i)));
|
|
311 |
// i--;
|
|
312 |
// }
|
|
313 |
// lt.getParent().removeResult(lt);
|
|
314 |
// System.out.println(NLS.bind(Messages.DeleteObject_10, lt.getName()));
|
|
315 |
// |
|
316 |
// }
|
|
316 | 317 |
// FIXME: when TXMResult will be implemented, only this code must be left |
317 | 318 |
else if (o instanceof ITXMResult) { |
318 | 319 |
((ITXMResult) o).delete(); |
Formats disponibles : Unified diff