Revision 296bc5e0
Added by Patrick Plitzner over 9 years ago
- rename IDirtyMarkableSelectionProvider to IDirtyMarkable
- extended interface IDirtyMarkable #2645
- added method forceDirty()
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/KeyEditor.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
22 | 22 |
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyGraphEditor; |
23 | 23 |
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor; |
24 | 24 |
import eu.etaxonomy.taxeditor.model.DataChangeBridge; |
25 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
|
|
25 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
|
26 | 26 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
27 | 27 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
28 | 28 |
|
... | ... | |
32 | 32 |
* @version 1.0 |
33 | 33 |
*/ |
34 | 34 |
public class KeyEditor extends FormEditor implements IConversationEnabled, |
35 |
IDirtyMarkableSelectionProvider, IPartContentHasDetails {
|
|
35 |
IDirtyMarkable, IPartContentHasDetails { |
|
36 | 36 |
|
37 | 37 |
public static final String ID = "eu.etaxonomy.taxeditor.editor.key"; |
38 | 38 |
|
... | ... | |
44 | 44 |
|
45 | 45 |
/* |
46 | 46 |
* (non-Javadoc) |
47 |
*
|
|
47 |
* |
|
48 | 48 |
* @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime. |
49 | 49 |
* IProgressMonitor) |
50 | 50 |
*/ |
... | ... | |
63 | 63 |
|
64 | 64 |
/* |
65 | 65 |
* (non-Javadoc) |
66 |
*
|
|
66 |
* |
|
67 | 67 |
* @see org.eclipse.ui.part.EditorPart#doSaveAs() |
68 | 68 |
*/ |
69 | 69 |
@Override |
... | ... | |
73 | 73 |
|
74 | 74 |
/* |
75 | 75 |
* (non-Javadoc) |
76 |
*
|
|
76 |
* |
|
77 | 77 |
* @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed() |
78 | 78 |
*/ |
79 | 79 |
@Override |
... | ... | |
88 | 88 |
} |
89 | 89 |
/* |
90 | 90 |
* (non-Javadoc) |
91 |
*
|
|
91 |
* |
|
92 | 92 |
* @see |
93 | 93 |
* eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update |
94 | 94 |
* (eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap) |
... | ... | |
103 | 103 |
|
104 | 104 |
/* |
105 | 105 |
* (non-Javadoc) |
106 |
*
|
|
106 |
* |
|
107 | 107 |
* @see |
108 | 108 |
* eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder |
109 | 109 |
* () |
... | ... | |
115 | 115 |
|
116 | 116 |
/* |
117 | 117 |
* (non-Javadoc) |
118 |
*
|
|
118 |
* |
|
119 | 119 |
* @see |
120 | 120 |
* eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#changed( |
121 | 121 |
* java.lang.Object) |
... | ... | |
124 | 124 |
public void changed(Object element) { |
125 | 125 |
editorDirtyStateChanged(); |
126 | 126 |
IEditorPart activeEditor = getActiveEditor(); |
127 |
if (activeEditor instanceof IDirtyMarkableSelectionProvider) {
|
|
128 |
((IDirtyMarkableSelectionProvider) activeEditor).changed(element);
|
|
127 |
if (activeEditor instanceof IDirtyMarkable) { |
|
128 |
((IDirtyMarkable) activeEditor).changed(element); |
|
129 | 129 |
} |
130 | 130 |
} |
131 | 131 |
|
132 |
/* (non-Javadoc) |
|
133 |
* @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty() |
|
134 |
*/ |
|
135 |
@Override |
|
136 |
public void forceDirty() { |
|
137 |
changed(null); |
|
138 |
} |
|
139 |
|
|
132 | 140 |
/* |
133 | 141 |
* (non-Javadoc) |
134 |
*
|
|
142 |
* |
|
135 | 143 |
* @see org.eclipse.ui.forms.editor.FormEditor#editorDirtyStateChanged() |
136 | 144 |
*/ |
137 | 145 |
@Override |
... | ... | |
155 | 163 |
|
156 | 164 |
/* |
157 | 165 |
* (non-Javadoc) |
158 |
*
|
|
166 |
* |
|
159 | 167 |
* @see org.eclipse.ui.forms.editor.FormEditor#isDirty() |
160 | 168 |
*/ |
161 | 169 |
@Override |
... | ... | |
165 | 173 |
|
166 | 174 |
/* |
167 | 175 |
* (non-Javadoc) |
168 |
*
|
|
176 |
* |
|
169 | 177 |
* @see org.eclipse.ui.forms.editor.FormEditor#dispose() |
170 | 178 |
*/ |
171 | 179 |
@Override |
... | ... | |
177 | 185 |
|
178 | 186 |
/* |
179 | 187 |
* (non-Javadoc) |
180 |
*
|
|
188 |
* |
|
181 | 189 |
* @see org.eclipse.ui.forms.editor.FormEditor#addPages() |
182 | 190 |
*/ |
183 | 191 |
@Override |
... | ... | |
195 | 203 |
MessagingUtils.error(getClass(), e); |
196 | 204 |
} |
197 | 205 |
|
198 |
|
|
206 |
|
|
199 | 207 |
|
200 | 208 |
setPartName(); |
201 | 209 |
|
202 | 210 |
} |
203 | 211 |
|
204 | 212 |
/** |
205 |
*
|
|
213 |
* |
|
206 | 214 |
*/ |
207 | 215 |
public void setPartName() { |
208 | 216 |
AbstractIdentificationEditorInput input = (AbstractIdentificationEditorInput) getEditorInput(); |
Also available in: Unified diff