Revision 87156a2a
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java | ||
---|---|---|
12 | 12 |
import java.util.Collection; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
16 |
import org.eclipse.ui.IEditorInput; |
|
17 |
import org.eclipse.ui.IPersistableElement; |
|
18 |
|
|
19 | 15 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
20 | 16 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
21 | 17 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
... | ... | |
33 | 29 |
* |
34 | 30 |
*/ |
35 | 31 |
|
36 |
public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled {
|
|
32 |
public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IConversationEnabled { |
|
37 | 33 |
private ConversationHolder conversation; |
38 | 34 |
private Group group; |
39 | 35 |
|
... | ... | |
57 | 53 |
return new CdmAuthorityEditorInput(conversation, group); |
58 | 54 |
} |
59 | 55 |
|
60 |
/* (non-Javadoc) |
|
61 |
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) |
|
62 |
*/ |
|
63 |
@Override |
|
64 | 56 |
public Object getAdapter(Class adapter) { |
65 | 57 |
if (adapter == Group.class) { |
66 | 58 |
return this.group; |
... | ... | |
83 | 75 |
public ConversationHolder getConversationHolder() { |
84 | 76 |
return this.conversation; |
85 | 77 |
} |
86 |
/* (non-Javadoc) |
|
87 |
* @see org.eclipse.ui.IEditorInput#exists() |
|
88 |
*/ |
|
89 |
@Override |
|
90 |
public boolean exists() { |
|
91 |
return group != null; |
|
92 |
} |
|
93 |
/* (non-Javadoc) |
|
94 |
* @see org.eclipse.ui.IEditorInput#getImageDescriptor() |
|
95 |
*/ |
|
96 |
@Override |
|
97 |
public ImageDescriptor getImageDescriptor() { |
|
98 |
// TODO Auto-generated method stub |
|
99 |
return null; |
|
100 |
} |
|
101 |
/* (non-Javadoc) |
|
102 |
* @see org.eclipse.ui.IEditorInput#getName() |
|
103 |
*/ |
|
104 |
@Override |
|
105 | 78 |
public String getName() { |
106 | 79 |
return group.getName(); |
107 | 80 |
} |
108 |
/* (non-Javadoc) |
|
109 |
* @see org.eclipse.ui.IEditorInput#getPersistable() |
|
110 |
*/ |
|
111 |
@Override |
|
112 |
public IPersistableElement getPersistable() { |
|
113 |
// TODO Auto-generated method stub |
|
114 |
return null; |
|
115 |
} |
|
116 |
/* (non-Javadoc) |
|
117 |
* @see org.eclipse.ui.IEditorInput#getToolTipText() |
|
118 |
*/ |
|
119 |
@Override |
|
120 |
public String getToolTipText() { |
|
121 |
return getName(); |
|
122 |
} |
|
123 | 81 |
|
124 | 82 |
/* (non-Javadoc) |
125 | 83 |
* @see java.lang.Object#equals(java.lang.Object) |
... | ... | |
158 | 116 |
@Override |
159 | 117 |
public void merge() { |
160 | 118 |
group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity(); |
161 |
|
|
119 |
|
|
162 | 120 |
} |
163 | 121 |
} |
Also available in: Unified diff
ref #6913 Remove IEditorInput dependency from authority editor input