Revision 880f5390
Added by Andreas Müller about 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java | ||
---|---|---|
19 | 19 |
import org.eclipse.ui.PlatformUI; |
20 | 20 |
import org.eclipse.ui.commands.ICommandService; |
21 | 21 |
|
22 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
22 | 23 |
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache; |
23 | 24 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
24 | 25 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
41 | 42 |
* representation |
42 | 43 |
*/ |
43 | 44 |
public static Map<Command, String> getAvailableViewers(Object input){ |
44 |
Map<Command, String> commandViewerNameMap = new HashMap<Command, String>();
|
|
45 |
Map<Command, String> commandViewerNameMap = new HashMap<>();
|
|
45 | 46 |
|
46 | 47 |
if(input!=null){ |
47 | 48 |
//for generic UuidAndTitleCache objects try to load the object |
48 | 49 |
if (input instanceof UuidAndTitleCache){ |
49 |
UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache)input;
|
|
50 |
UuidAndTitleCache<? extends CdmBase> uuidAndTitleCache = (UuidAndTitleCache<? extends CdmBase>)input;
|
|
50 | 51 |
input = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid()); |
51 | 52 |
} |
52 | 53 |
//for tree nodes get the value resp. the object of the node |
Also available in: Unified diff
ref #9541 refactor Open..Handlers to all use UuidAndTitleCache as input and some more changes and bugfixes