Révision 439
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java (revision 439) | ||
---|---|---|
53 | 53 |
import org.txm.Toolbox; |
54 | 54 |
import org.txm.concordance.core.functions.Concordance; |
55 | 55 |
import org.txm.core.preferences.TXMPreferences; |
56 |
import org.txm.core.results.ITXMResult;
|
|
57 |
import org.txm.functions.Function;
|
|
56 |
import org.txm.core.results.TXMResult; |
|
57 |
import org.txm.functions.TXMCommand;
|
|
58 | 58 |
//import org.txm.functions.queryindex.QueryIndex; |
59 | 59 |
import org.txm.functions.referencer.Referencer; |
60 | 60 |
import org.txm.lexicaltable.core.functions.LexicalTable; |
... | ... | |
112 | 112 |
public static synchronized boolean askContinueToDelete(final IStructuredSelection selection) { |
113 | 113 |
continueToDelete = true; |
114 | 114 |
|
115 |
boolean dontShowAlert = !TXMPreferences.getBoolean(RCPPreferences.PREFERENCES_NODE, RCPPreferences.USER_ALERT_DELETE);
|
|
115 |
boolean dontShowAlert = !TXMPreferences.getBoolean(RCPPreferences.USER_ALERT_DELETE, RCPPreferences.PREFERENCES_NODE);
|
|
116 | 116 |
|
117 | 117 |
if (dontShowAlert) { |
118 | 118 |
Display.getDefault().syncExec(new Runnable() { |
... | ... | |
256 | 256 |
// } else if (o instanceof SpecificitesResult) { |
257 | 257 |
// SpecificitesResult specif = (SpecificitesResult) o; |
258 | 258 |
// |
259 |
// ITXMResult p = specif.getParent();
|
|
259 |
// TXMResult p = specif.getParent(); |
|
260 | 260 |
// |
261 | 261 |
// if (p != null) { |
262 | 262 |
// if (p instanceof Partition) { |
... | ... | |
317 | 317 |
// |
318 | 318 |
// } |
319 | 319 |
// FIXME: when TXMResult will be implemented, only this code must be left |
320 |
else if (o instanceof ITXMResult) {
|
|
321 |
((ITXMResult) o).delete();
|
|
322 |
System.out.println(NLS.bind(Messages.DeleteObject_10, ((ITXMResult) o).getName()));
|
|
320 |
else if (o instanceof TXMResult) { |
|
321 |
((TXMResult) o).delete(); |
|
322 |
System.out.println(NLS.bind(Messages.DeleteObject_10, ((TXMResult) o).getName())); |
|
323 | 323 |
} |
324 |
else if (o instanceof Function) {
|
|
325 |
Function l = (Function) o;
|
|
324 |
else if (o instanceof TXMCommand) {
|
|
325 |
TXMCommand l = (TXMCommand) o;
|
|
326 | 326 |
l.delete(); |
327 | 327 |
System.out.println(NLS.bind(Messages.DeleteObject_10, l)); |
328 | 328 |
} |
Formats disponibles : Unified diff