3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.store
;
13 import java
.util
.UUID
;
15 import org
.eclipse
.core
.commands
.operations
.IOperationHistory
;
16 import org
.eclipse
.core
.commands
.operations
.IUndoContext
;
17 import org
.eclipse
.jface
.action
.IStatusLineManager
;
18 import org
.eclipse
.ui
.IEditorInput
;
19 import org
.eclipse
.ui
.IEditorPart
;
21 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
22 import eu
.etaxonomy
.taxeditor
.store
.internal
.TaxeditorStorePlugin
;
25 * <p>StoreUtil class.</p>
31 public class StoreUtil
extends AbstractUtility
{
34 * <p>checktaxonExists</p>
36 * @param fromString a {@link java.util.UUID} object.
38 public static void checktaxonExists(UUID fromString
) {
39 // if (CdmStore.getTaxonService().getTaxonByUuid(UUID.fromString(uuid)) == null) {
40 // logger.warn("Couldn't find taxon with UUID " + uuid);
46 * <p>getOperationHistory</p>
48 * @return a {@link org.eclipse.core.commands.operations.IOperationHistory} object.
50 public static IOperationHistory
getOperationHistory() {
51 return TaxeditorStorePlugin
.getDefault().getWorkbench().
52 getOperationSupport().getOperationHistory();
56 * <p>setStatusLineManager</p>
58 * @param manager a {@link org.eclipse.jface.action.IStatusLineManager} object.
60 public static void setStatusLineManager(IStatusLineManager manager
) {
61 statusLineManager
= manager
;
66 * <p>getUndoContext</p>
68 * @return a {@link org.eclipse.core.commands.operations.IUndoContext} object.
70 public static IUndoContext
getUndoContext(){
71 return IOperationHistory
.GLOBAL_UNDO_CONTEXT
;
77 * @return a {@link java.lang.String} object.
79 public static String
getPluginId(){
80 return TaxeditorStorePlugin
.PLUGIN_ID
;
87 public static IEditorInput
getActiveEditorInput() {
88 IEditorPart activeEditor
= getActiveEditor();
89 if (activeEditor
!= null){
90 return activeEditor
.getEditorInput();