Revision c12b01cf
Added by Katja Luther over 8 years ago
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties | ||
---|---|---|
161 | 161 |
Bundle-Name = Editor Bundle |
162 | 162 |
command.name.48 = delete |
163 | 163 |
command.name.49 = delete |
164 |
command.name.50 = delete |
|
164 |
command.name.50 = delete |
|
165 |
command.name.51 = delete |
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
1461 | 1461 |
id="eu.etaxonomy.taxeditor.editor.view.concept.command.open" |
1462 | 1462 |
name="%command.name.33"> |
1463 | 1463 |
</command> |
1464 |
<command |
|
1465 |
categoryId="eu.etaxonomy.taxeditor.editor.view.concept.category" |
|
1466 |
defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.DeleteConceptHandler" |
|
1467 |
id="eu.etaxonomy.taxeditor.editor.view.concept.command.delete" |
|
1468 |
name="%command.name.51"> |
|
1469 |
</command> |
|
1464 | 1470 |
<category |
1465 | 1471 |
id="eu.etaxonomy.taxeditor.bulkeditor.group.category" |
1466 | 1472 |
name="%category.name.7"> |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java | ||
---|---|---|
16 | 16 |
import org.eclipse.core.commands.ExecutionException; |
17 | 17 |
import org.eclipse.core.commands.common.NotDefinedException; |
18 | 18 |
import org.eclipse.core.commands.operations.IUndoContext; |
19 |
import org.eclipse.jface.dialogs.MessageDialog; |
|
19 | 20 |
import org.eclipse.jface.viewers.IStructuredSelection; |
20 | 21 |
import org.eclipse.ui.handlers.HandlerUtil; |
21 | 22 |
|
... | ... | |
41 | 42 |
DefinedTermEditor editor = (DefinedTermEditor) HandlerUtil |
42 | 43 |
.getActiveEditor(event); |
43 | 44 |
|
45 |
if (editor.isDirty()){ |
|
46 |
boolean proceed = MessageDialog.openQuestion(null, |
|
47 |
"Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?"); |
|
48 |
if (proceed) { |
|
49 |
editor.doSave(null); |
|
50 |
} else { |
|
51 |
return null; |
|
52 |
} |
|
53 |
} |
|
44 | 54 |
if (editor instanceof DefinedTermEditor){ |
45 | 55 |
DefinedTermEditor dfe = (DefinedTermEditor) editor; |
46 | 56 |
try { |
Also available in: Unified diff
fixing #5115