Revision f51d204a
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/DeleteTaxonBaseHandlerE4.java | ||
---|---|---|
128 | 128 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID); |
129 | 129 |
} |
130 | 130 |
} else if (selectedElement instanceof Taxon ){ |
131 |
if (selectedElement instanceof Taxon &&((Taxon) selectedElement).isProparteSynonym() ) { |
|
131 |
if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isProparteSynonym() ) {
|
|
132 | 132 |
editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR()); |
133 | 133 |
editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.PARTIAL_SYNONYM_FOR()); |
134 |
|
|
134 | 135 |
}else{ |
135 | 136 |
editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR()); |
136 | 137 |
editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR()); |
137 | 138 |
editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.PARTIAL_MISAPPLIED_NAME_FOR()); |
139 |
|
|
138 | 140 |
} |
139 | 141 |
editor.getEditorInput().addTaxonBaseToDelete((TaxonBase)selectedElement,deleteConfig); |
140 | 142 |
editor.setDirty(); |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetPublishForSubtreeOperation.java | ||
---|---|---|
23 | 23 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
24 | 24 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
25 | 25 |
import org.eclipse.swt.widgets.Display; |
26 |
import org.eclipse.ui.progress.IProgressConstants; |
|
27 | 26 |
|
28 | 27 |
import eu.etaxonomy.cdm.api.service.ITaxonNodeService; |
29 | 28 |
import eu.etaxonomy.cdm.api.service.UpdateResult; |
30 | 29 |
import eu.etaxonomy.cdm.api.service.config.PublishForSubtreeConfigurator; |
30 |
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor; |
|
31 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
31 | 32 |
import eu.etaxonomy.taxeditor.navigation.l10n.Messages; |
33 |
import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled; |
|
32 | 34 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
33 | 35 |
|
34 | 36 |
/** |
... | ... | |
36 | 38 |
* @date 11.10.2017 |
37 | 39 |
* |
38 | 40 |
*/ |
39 |
public class SetPublishForSubtreeOperation extends UpdateSubtreeOperation { |
|
41 |
public class SetPublishForSubtreeOperation extends UpdateSubtreeOperation implements IPostMoniteredOperationEnabled{
|
|
40 | 42 |
|
41 | 43 |
private final static String LABEL = Messages.SetPublishForSubtreeOperation_CHANGE_PUBLISH_OP; |
42 | 44 |
private static final Logger logger = Logger |
... | ... | |
62 | 64 |
} |
63 | 65 |
@Override |
64 | 66 |
protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception { |
65 |
// runMoniteredOperation(); |
|
67 |
runMoniteredOperation(); |
|
68 |
updateNameEditors(); |
|
66 | 69 |
|
67 |
Job job = createJob(monitor); |
|
68 |
// configure the job |
|
69 |
job.setProperty(IProgressConstants.KEEP_PROPERTY, true); |
|
70 |
job.setUser(true); |
|
71 |
// schedule job |
|
72 |
job.schedule(); |
|
70 |
// Job job = createJob(monitor);
|
|
71 |
// // configure the job
|
|
72 |
// job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
|
|
73 |
// job.setUser(true);
|
|
74 |
// // schedule job
|
|
75 |
// job.schedule();
|
|
73 | 76 |
|
74 | 77 |
return updateResult; |
75 | 78 |
|
... | ... | |
100 | 103 |
return job; |
101 | 104 |
} |
102 | 105 |
|
106 |
public void runMoniteredOperation() { |
|
107 |
ITaxonNodeService nodeService; |
|
108 |
final UUID uuid = longRunningTaskService.monitLongRunningTask(config); |
|
109 |
Display.getDefault().asyncExec(new Runnable() { |
|
110 |
@Override |
|
111 |
public void run() { |
|
112 |
AbstractUtility.executeMoniteredOperation("Set Publish Flag for Subtree: ", |
|
113 |
uuid, |
|
114 |
1000, |
|
115 |
false, |
|
116 |
SetPublishForSubtreeOperation.this, |
|
117 |
null); |
|
118 |
} |
|
119 |
}); |
|
120 |
|
|
121 |
|
|
122 |
} |
|
123 |
/** |
|
124 |
* {@inheritDoc} |
|
125 |
*/ |
|
126 |
@Override |
|
127 |
public void postOperation(IRemotingProgressMonitor monitor) { |
|
128 |
// TODO Auto-generated method stub |
|
129 |
|
|
130 |
} |
|
131 |
|
|
132 |
|
|
103 | 133 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
711 | 711 |
if (remotingMonitor.getResult() instanceof ExportResult) { |
712 | 712 |
reportSb.append(((ExportResult)remotingMonitor.getResult()).createReport()); |
713 | 713 |
}else if (remotingMonitor.getResult() instanceof UpdateResult){ |
714 |
reportSb.append(((UpdateResult)remotingMonitor.getResult()).getExceptions().toString()); |
|
714 |
if (((UpdateResult)remotingMonitor.getResult()).isOk()){ |
|
715 |
reportSb.append("Update successfull. \n"+"Updated Objects: " + ((UpdateResult)remotingMonitor.getResult()).getUpdatedObjects().size()); |
|
716 |
} |
|
717 |
if (!((UpdateResult)remotingMonitor.getResult()).getExceptions().isEmpty()){ |
|
718 |
reportSb.append(((UpdateResult)remotingMonitor.getResult()).getExceptions().toString()); |
|
719 |
} |
|
715 | 720 |
} |
716 | 721 |
// } |
717 | 722 |
if(!StringUtils.isBlank(reportSb.toString()) && reportSb.length() != 0) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/e4/SaveImportedSpecimenActionE4.java | ||
---|---|---|
112 | 112 |
} |
113 | 113 |
abcdConfigurators.add(configuratorAbcd); |
114 | 114 |
|
115 |
|
|
115 | 116 |
} |
116 | 117 |
tripleId = response.getTripleID(); |
117 | 118 |
unitIdsBioCase.add(tripleId); |
Also available in: Unified diff
adapt deleteHandler in nameEditor to partial and pro parte misapplied names