Revision 92eade32
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java | ||
---|---|---|
193 | 193 |
private static void openTaxonEditor_internal(TaxonEditorInput input, EModelService modelService, EPartService partService, MApplication application) { |
194 | 194 |
TaxonBase<?> taxonBase = input.getTaxon(); |
195 | 195 |
TaxonNode node = input.getTaxonNode(); |
196 |
if(taxonBase==null){
|
|
196 |
if(taxonBase == null){
|
|
197 | 197 |
return; |
198 | 198 |
} |
199 | 199 |
boolean hasPermission = false; |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/e4/MediaViewPartE4.java | ||
---|---|---|
76 | 76 |
|
77 | 77 |
@Override |
78 | 78 |
public void selectionChanged_internal(Object selection, MPart activePart, MPart thisPart) { |
79 |
if(activePart==thisPart){
|
|
79 |
if(activePart == thisPart){
|
|
80 | 80 |
return; |
81 | 81 |
} |
82 | 82 |
|
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java | ||
---|---|---|
35 | 35 |
import eu.etaxonomy.taxeditor.navigation.l10n.Messages; |
36 | 36 |
import eu.etaxonomy.taxeditor.operation.CdmUpdateOperation; |
37 | 37 |
|
38 |
|
|
39 | 38 |
/** |
40 | 39 |
* @author cmathew |
41 | 40 |
* @date 17 Jun 2015 |
42 |
* |
|
43 | 41 |
*/ |
44 | 42 |
public class ChangeAcceptedTaxonToSynonymOperation extends CdmUpdateOperation { |
45 | 43 |
|
46 |
private Set<UUID> oldTaxonNodeUuids = new HashSet(); |
|
44 |
private Set<UUID> oldTaxonNodeUuids = new HashSet<>();
|
|
47 | 45 |
private final UUID newAcceptedTaxonNodeUuid; |
48 | 46 |
private UUID secundumUuid; |
49 | 47 |
private boolean setNameInSource ; |
50 | 48 |
private SecReferenceHandlingEnum secHandling; |
51 |
private DeleteResult deleteResult; |
|
52 |
|
|
53 | 49 |
|
54 | 50 |
private final static String LABEL = Messages.RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP; |
55 | 51 |
|
56 |
/** |
|
57 |
* @param label |
|
58 |
*/ |
|
59 | 52 |
public ChangeAcceptedTaxonToSynonymOperation(Object source, |
60 | 53 |
boolean async, |
61 | 54 |
Set<UUID> oldTaxonNodeUuids, |
... | ... | |
75 | 68 |
|
76 | 69 |
} |
77 | 70 |
|
78 |
/** |
|
79 |
* @param label |
|
80 |
*/ |
|
81 | 71 |
public ChangeAcceptedTaxonToSynonymOperation(Object source, |
82 | 72 |
boolean async, |
83 | 73 |
UUID oldTaxonNodeUuid, |
... | ... | |
96 | 86 |
this.secHandling = secHandling; |
97 | 87 |
} |
98 | 88 |
|
99 |
/** |
|
100 |
* @param label |
|
101 |
*/ |
|
102 | 89 |
public ChangeAcceptedTaxonToSynonymOperation(Object source, |
103 | 90 |
boolean async, |
104 | 91 |
UUID oldTaxonNodeUuid, |
... | ... | |
114 | 101 |
this.secHandling = secHandling; |
115 | 102 |
} |
116 | 103 |
|
117 |
/* (non-Javadoc) |
|
118 |
* @see eu.etaxonomy.taxeditor.operation.CdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable) |
|
119 |
*/ |
|
120 | 104 |
@Override |
121 | 105 |
protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception { |
122 | 106 |
|
... | ... | |
153 | 137 |
} |
154 | 138 |
} |
155 | 139 |
} |
156 |
|
|
157 | 140 |
} |
158 | 141 |
if (newTaxon != null && oldTaxaPublished != newTaxon.isPublish()){ |
159 | 142 |
MessagingUtils.warningDialog("Publish flag", null, Messages.RemotingChangeAcceptedTaxonToSynonym_warning_publish); |
160 | 143 |
} |
161 | 144 |
updateTaxonEditor(); |
162 | 145 |
return updateResult; |
163 |
|
|
164 | 146 |
} |
165 | 147 |
|
166 | 148 |
private void updateTaxonEditor(){ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IDirtyMarkable.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.model; |
11 | 10 |
|
12 |
|
|
13 | 11 |
/** |
14 | 12 |
* Interface for handling the current "dirty" state of an object. An object is |
15 | 13 |
* dirty when changes are done but not saved/persisted yet. |
16 |
*
|
|
14 |
* |
|
17 | 15 |
* @author n.hoffmann |
18 | 16 |
* @created Mar 8, 2010 |
19 |
* @version 1.0 |
|
20 | 17 |
*/ |
21 | 18 |
public interface IDirtyMarkable { |
22 | 19 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPart.java | ||
---|---|---|
185 | 185 |
delaySelection.setActivePart(activePart); |
186 | 186 |
delaySelection.setThisPart(thisPart); |
187 | 187 |
} |
188 |
|
|
188 | 189 |
System.out.println("...selection: " + (selection == null? "": selection.toString().substring(0,10)) + "; a: " + (activePart == null? "":activePart.getLabel())+ "; t: " + (thisPart == null? "":thisPart.getLabel())); |
189 | 190 |
//as long as the delay thread is running, |
190 | 191 |
if(!isInDelay){ |
... | ... | |
262 | 263 |
this.isEnabled = doEnable; |
263 | 264 |
} |
264 | 265 |
} |
266 |
|
|
265 | 267 |
if (taxon.isMisapplication() || taxon.isProparteSynonym() ){ |
266 | 268 |
|
267 | 269 |
if(part instanceof ITaxonEditor){ |
... | ... | |
289 | 291 |
element = CdmStore.getService(IVocabularyService.class).load(((TermVocabularyDto) element).getUuid()); |
290 | 292 |
} |
291 | 293 |
|
292 |
|
|
293 | 294 |
selectionProvidingPart = activePart; |
294 | 295 |
if (viewer instanceof DetailsViewerE4){ |
295 | 296 |
|
Also available in: Unified diff
cleanup