1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.bulkeditor.referencingobjects;
|
11
|
|
12
|
import java.util.ArrayList;
|
13
|
import java.util.Collections;
|
14
|
import java.util.Comparator;
|
15
|
import java.util.List;
|
16
|
import java.util.Set;
|
17
|
import java.util.UUID;
|
18
|
|
19
|
import org.apache.log4j.Logger;
|
20
|
import org.eclipse.core.runtime.IProgressMonitor;
|
21
|
import org.eclipse.core.runtime.IStatus;
|
22
|
import org.eclipse.core.runtime.Status;
|
23
|
import org.eclipse.core.runtime.jobs.Job;
|
24
|
import org.eclipse.jface.action.MenuManager;
|
25
|
import org.eclipse.jface.viewers.CellEditor;
|
26
|
import org.eclipse.jface.viewers.ICellModifier;
|
27
|
import org.eclipse.jface.viewers.ISelection;
|
28
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
29
|
import org.eclipse.jface.viewers.ITableLabelProvider;
|
30
|
import org.eclipse.jface.viewers.TableViewer;
|
31
|
import org.eclipse.jface.viewers.TableViewerColumn;
|
32
|
import org.eclipse.jface.viewers.TextCellEditor;
|
33
|
import org.eclipse.jface.viewers.TreeNode;
|
34
|
import org.eclipse.jface.viewers.Viewer;
|
35
|
import org.eclipse.swt.SWT;
|
36
|
import org.eclipse.swt.widgets.Composite;
|
37
|
import org.eclipse.swt.widgets.Control;
|
38
|
import org.eclipse.swt.widgets.Display;
|
39
|
import org.eclipse.swt.widgets.Menu;
|
40
|
import org.eclipse.swt.widgets.Table;
|
41
|
import org.eclipse.ui.IWorkbenchPart;
|
42
|
import org.springframework.remoting.RemoteAccessException;
|
43
|
|
44
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
45
|
import eu.etaxonomy.cdm.api.service.IAgentService;
|
46
|
import eu.etaxonomy.cdm.api.service.IDescriptionService;
|
47
|
import eu.etaxonomy.cdm.api.service.IEventBaseService;
|
48
|
import eu.etaxonomy.cdm.api.service.IGroupService;
|
49
|
import eu.etaxonomy.cdm.api.service.IMediaService;
|
50
|
import eu.etaxonomy.cdm.api.service.INameService;
|
51
|
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
|
52
|
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
|
53
|
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
|
54
|
import eu.etaxonomy.cdm.api.service.IReferenceService;
|
55
|
import eu.etaxonomy.cdm.api.service.ITaxonService;
|
56
|
import eu.etaxonomy.cdm.api.service.ITermService;
|
57
|
import eu.etaxonomy.cdm.api.service.IUserService;
|
58
|
import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
|
59
|
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
|
60
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
61
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
62
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
63
|
import eu.etaxonomy.cdm.model.common.EventBase;
|
64
|
import eu.etaxonomy.cdm.model.common.Group;
|
65
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
66
|
import eu.etaxonomy.cdm.model.common.User;
|
67
|
import eu.etaxonomy.cdm.model.description.DescriptionBase;
|
68
|
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
|
69
|
import eu.etaxonomy.cdm.model.description.PolytomousKey;
|
70
|
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
|
71
|
import eu.etaxonomy.cdm.model.media.Media;
|
72
|
import eu.etaxonomy.cdm.model.molecular.Sequence;
|
73
|
import eu.etaxonomy.cdm.model.name.NonViralName;
|
74
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
|
75
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
76
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
77
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
78
|
import eu.etaxonomy.taxeditor.model.DescriptionHelper;
|
79
|
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
|
80
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
81
|
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
|
82
|
|
83
|
/**
|
84
|
* @author p.ciardelli
|
85
|
* @created 08.07.2009
|
86
|
* @version 1.0
|
87
|
*/
|
88
|
public class ReferencingObjectsView extends AbstractCdmViewPart {
|
89
|
private static final Logger logger = Logger
|
90
|
.getLogger(ReferencingObjectsView.class);
|
91
|
|
92
|
public static final String ID = "eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects";
|
93
|
|
94
|
private TableViewer viewer;
|
95
|
|
96
|
private String referencedObjectTitleCache;
|
97
|
private ConversationHolder conversation;
|
98
|
private final ICdmEntitySession cdmEntitySession;
|
99
|
private UUID actualUuid;
|
100
|
List<CdmBase> referencingObjects = null;
|
101
|
Set<CdmBase> referencingObjectsSet = null;
|
102
|
IProgressMonitor actualMonitor = null;
|
103
|
private Job currentJob = null;
|
104
|
|
105
|
public ReferencingObjectsView() {
|
106
|
cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession();
|
107
|
}
|
108
|
|
109
|
/** {@inheritDoc} */
|
110
|
@Override
|
111
|
public void createViewer(Composite parent) {
|
112
|
selectionService.addSelectionListener(this);
|
113
|
conversation = CdmStore.createConversation();
|
114
|
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
|
115
|
| SWT.V_SCROLL | SWT.FULL_SELECTION);
|
116
|
createColumns(viewer);
|
117
|
viewer.setContentProvider(new ReferencingObjectsContentProvider());
|
118
|
viewer.setLabelProvider(new ReferencingObjectsLabelProvider());
|
119
|
viewer.setCellModifier(new ICellModifier() {
|
120
|
@Override
|
121
|
public void modify(Object element, String property, Object value) {
|
122
|
}
|
123
|
|
124
|
@Override
|
125
|
public Object getValue(Object element, String property) {
|
126
|
ITableLabelProvider tableLabelProvider = null;
|
127
|
if(viewer.getLabelProvider() instanceof ITableLabelProvider){
|
128
|
tableLabelProvider = (ITableLabelProvider) viewer.getLabelProvider();
|
129
|
}
|
130
|
Object[] columnProperties = viewer.getColumnProperties();
|
131
|
for (int i=0;i<columnProperties.length;i++) {
|
132
|
if(columnProperties[i].equals(property) && tableLabelProvider!=null){
|
133
|
return tableLabelProvider.getColumnText(element, i);
|
134
|
}
|
135
|
}
|
136
|
return "";
|
137
|
}
|
138
|
|
139
|
@Override
|
140
|
public boolean canModify(Object element, String property) {
|
141
|
return true;
|
142
|
}
|
143
|
});
|
144
|
|
145
|
//create context menu
|
146
|
MenuManager menuManager = new MenuManager();
|
147
|
getSite().registerContextMenu(menuManager, viewer);
|
148
|
Control control = viewer.getControl();
|
149
|
Menu menu = menuManager.createContextMenu(control);
|
150
|
control.setMenu(menu);
|
151
|
|
152
|
// Propagate selection from viewer
|
153
|
getSite().setSelectionProvider(viewer);
|
154
|
}
|
155
|
|
156
|
/**
|
157
|
* Create the columns for the table
|
158
|
* @param viewer
|
159
|
*/
|
160
|
private void createColumns(TableViewer viewer) {
|
161
|
Table table = viewer.getTable();
|
162
|
String[] titles = {"Class", "Description", "UUID", "Object ID" };
|
163
|
int[] bounds = { 100, 200, 100, 70};
|
164
|
|
165
|
CellEditor[] editors = new CellEditor[titles.length];
|
166
|
|
167
|
for (int i = 0; i < titles.length; i++) {
|
168
|
TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
|
169
|
editors[i] = new TextCellEditor(table);
|
170
|
column.getColumn().setText(titles[i]);
|
171
|
column.getColumn().setWidth(bounds[i]);
|
172
|
column.getColumn().setResizable(true);
|
173
|
column.getColumn().setMoveable(true);
|
174
|
}
|
175
|
table.setHeaderVisible(true);
|
176
|
table.setLinesVisible(true);
|
177
|
|
178
|
viewer.setCellEditors(editors);
|
179
|
viewer.setColumnProperties(titles);
|
180
|
}
|
181
|
|
182
|
@Override
|
183
|
public void setFocus() {
|
184
|
cdmEntitySession.bind();
|
185
|
}
|
186
|
|
187
|
public void updateReferencingObjects(final UUID entityUUID, final Class objectClass) {
|
188
|
if (actualUuid == entityUUID){
|
189
|
return ;
|
190
|
}
|
191
|
showEmptyPage();
|
192
|
if(actualMonitor!=null && !actualMonitor.isCanceled()){
|
193
|
// boolean success = false;
|
194
|
// //wait for cancel to be done
|
195
|
// while(!success){
|
196
|
// success = currentJob.cancel();
|
197
|
// }
|
198
|
// currentJob = null;
|
199
|
while(!actualMonitor.isCanceled()){
|
200
|
actualMonitor.setCanceled(true);
|
201
|
}
|
202
|
|
203
|
}
|
204
|
currentJob = new Job("Update Referencing Objects " + entityUUID) {
|
205
|
|
206
|
@Override
|
207
|
protected IStatus run(IProgressMonitor monitor) {
|
208
|
monitor.beginTask("Calculating referencing objects", 100);
|
209
|
actualUuid = entityUUID;
|
210
|
|
211
|
monitor.worked(5);
|
212
|
referencingObjects = new ArrayList<>();
|
213
|
if(monitor.isCanceled()) {
|
214
|
actualUuid = null;
|
215
|
return Status.CANCEL_STATUS;
|
216
|
}
|
217
|
if (actualMonitor != null){
|
218
|
actualMonitor.setCanceled(true);
|
219
|
|
220
|
}
|
221
|
actualMonitor = monitor;
|
222
|
if (entityUUID != null){
|
223
|
ICdmEntitySession previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
|
224
|
cdmEntitySession.bind();
|
225
|
referencingObjectsSet = getReferencingObjects(entityUUID, objectClass);
|
226
|
|
227
|
if(monitor.isCanceled()) {
|
228
|
actualUuid = null;
|
229
|
|
230
|
return Status.CANCEL_STATUS;
|
231
|
}
|
232
|
monitor.worked(30);
|
233
|
referencingObjects = sortReferencing();
|
234
|
if (referencingObjects == null){
|
235
|
if (monitor.isCanceled()){
|
236
|
actualUuid = null;
|
237
|
|
238
|
return Status.CANCEL_STATUS;
|
239
|
}
|
240
|
}
|
241
|
|
242
|
if(monitor.isCanceled()) {
|
243
|
if(previousCdmEntitySession != null) {
|
244
|
previousCdmEntitySession.bind();
|
245
|
}
|
246
|
|
247
|
return Status.CANCEL_STATUS;
|
248
|
}
|
249
|
monitor.worked(80);
|
250
|
updateView();
|
251
|
|
252
|
if(previousCdmEntitySession != null) {
|
253
|
previousCdmEntitySession.bind();
|
254
|
}
|
255
|
// actualUuid = entityUUID;
|
256
|
}
|
257
|
monitor.done();
|
258
|
|
259
|
|
260
|
return Status.OK_STATUS;
|
261
|
|
262
|
|
263
|
}
|
264
|
};
|
265
|
currentJob.setUser(true);
|
266
|
|
267
|
currentJob.schedule();
|
268
|
// final IJobChangeListener listener;
|
269
|
// listener = new JobChangeAdapter() {
|
270
|
// @Override
|
271
|
// public void done(IJobChangeEvent event) {
|
272
|
// System.err.println("Job is done" + entityUUID);
|
273
|
// //event.getJob().cancel();
|
274
|
// }
|
275
|
//
|
276
|
// };
|
277
|
// currentJob.addJobChangeListener(listener);
|
278
|
|
279
|
|
280
|
|
281
|
|
282
|
}
|
283
|
|
284
|
private Set<CdmBase> getReferencingObjects(UUID entity, Class objectClass) {
|
285
|
CdmBase referencedObject = null;
|
286
|
try {
|
287
|
if (objectClass.getSuperclass().equals(TeamOrPersonBase.class) ){
|
288
|
referencedObject = CdmStore.getService(IAgentService.class).load(entity);
|
289
|
} else if (objectClass.getSuperclass().equals(NonViralName.class)){
|
290
|
referencedObject = CdmStore.getService(INameService.class).load(entity);
|
291
|
} else if (objectClass.getSuperclass().equals(TaxonBase.class)){
|
292
|
referencedObject = CdmStore.getService(ITaxonService.class).load(entity);
|
293
|
} else if (objectClass.equals(Reference.class)){
|
294
|
referencedObject = CdmStore.getService(IReferenceService.class).load(entity);
|
295
|
} else if (objectClass.getSuperclass().equals(SpecimenOrObservationBase.class)){
|
296
|
referencedObject = CdmStore.getService(IOccurrenceService.class).load(entity);
|
297
|
} else if (objectClass.isAssignableFrom(User.class)){
|
298
|
referencedObject = CdmStore.getService(IUserService.class).load(entity);
|
299
|
} else if (objectClass.isAssignableFrom(Group.class)){
|
300
|
referencedObject = CdmStore.getService(IGroupService.class).load(entity);
|
301
|
} else if (objectClass.isAssignableFrom(Media.class)){
|
302
|
referencedObject = CdmStore.getService(IMediaService.class).load(entity);
|
303
|
} else if (DescriptionBase.class.isAssignableFrom(objectClass)){
|
304
|
referencedObject = CdmStore.getService(IDescriptionService.class).load(entity);
|
305
|
} else if (DescriptionElementBase.class.isAssignableFrom(objectClass)){
|
306
|
referencedObject = CdmStore.getService(IDescriptionService.class).loadDescriptionElement(entity, null);
|
307
|
} else if (objectClass.equals(Sequence.class)){
|
308
|
referencedObject = CdmStore.getService(ISequenceService.class).load(entity, null);
|
309
|
} else if (PolytomousKey.class.isAssignableFrom(objectClass)){
|
310
|
referencedObject = CdmStore.getService(IPolytomousKeyService.class).load(entity, null);
|
311
|
} else if (PolytomousKeyNode.class.isAssignableFrom(objectClass)){
|
312
|
referencedObject = CdmStore.getService(IPolytomousKeyNodeService.class).load(entity, null);
|
313
|
} else if (DefinedTermBase.class.isAssignableFrom(objectClass)){
|
314
|
referencedObject = CdmStore.getService(ITermService.class).load(entity, null);
|
315
|
} else if (EventBase.class.isAssignableFrom(objectClass)){
|
316
|
referencedObject = CdmStore.getService(IEventBaseService.class).load(entity, null);
|
317
|
} else if (User.class.isAssignableFrom(objectClass)){
|
318
|
referencedObject = CdmStore.getService(IUserService.class).load(entity, null);
|
319
|
} else if (Group.class.isAssignableFrom(objectClass)){
|
320
|
referencedObject = CdmStore.getService(IGroupService.class).load(entity, null);
|
321
|
}
|
322
|
else if(CdmBase.class.isAssignableFrom(objectClass)){
|
323
|
referencedObject = CdmStore.getCommonService().find(objectClass, entity);
|
324
|
}
|
325
|
//referencedObject =(CdmBase) CdmStore.getService(IIdentifiableEntityService.class).load(referencedObject.getUuid());
|
326
|
Set<CdmBase> setOfReferencingObjects = null;
|
327
|
|
328
|
if (referencedObject != null){
|
329
|
if(referencedObject.isInstanceOf(IdentifiableEntity.class)){
|
330
|
referencedObjectTitleCache = (HibernateProxyHelper.deproxy(referencedObject, IdentifiableEntity.class)).getTitleCache();
|
331
|
}
|
332
|
else if(referencedObject.isInstanceOf(DescriptionElementBase.class)){
|
333
|
referencedObjectTitleCache = DescriptionHelper.getLabel(referencedObject);
|
334
|
}
|
335
|
else if (referencedObject.isInstanceOf(User.class)){
|
336
|
referencedObjectTitleCache = ((User)referencedObject).getUsername();
|
337
|
}else{
|
338
|
referencedObjectTitleCache = null;
|
339
|
}
|
340
|
setOfReferencingObjects = CdmStore.getCommonService().getReferencingObjects(referencedObject);
|
341
|
return setOfReferencingObjects;
|
342
|
}
|
343
|
|
344
|
} catch (Exception e) {
|
345
|
logger.debug("Error retrieving referencing objects", e);
|
346
|
e.printStackTrace();
|
347
|
updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
|
348
|
}
|
349
|
return null;
|
350
|
}
|
351
|
private List<CdmBase> sortReferencing(){
|
352
|
|
353
|
if (referencingObjectsSet != null){
|
354
|
List<CdmBase> referencingObjects = new ArrayList<CdmBase>(referencingObjectsSet);
|
355
|
try{
|
356
|
Collections.sort(referencingObjects, new ReferencingClassComparator());
|
357
|
}catch (RemoteAccessException e){
|
358
|
logger.debug(e.getStackTrace());
|
359
|
return null;
|
360
|
}
|
361
|
return referencingObjects;
|
362
|
|
363
|
}
|
364
|
|
365
|
return null;
|
366
|
}
|
367
|
|
368
|
|
369
|
class ReferencingClassComparator implements Comparator<CdmBase> {
|
370
|
|
371
|
@Override
|
372
|
public int compare(CdmBase o1, CdmBase o2) {
|
373
|
String string1 = o1.getClass().getSimpleName();
|
374
|
String string2 = o2.getClass().getSimpleName();
|
375
|
int result = string1.compareToIgnoreCase(string2);
|
376
|
if (result == 0) {
|
377
|
string1 = DescriptionHelper.getObjectDescription(o1);
|
378
|
string2 = DescriptionHelper.getObjectDescription(o2);
|
379
|
if (string1 == null && string2 == null){
|
380
|
return 0;
|
381
|
}
|
382
|
if (string1 == null && string2 != null){
|
383
|
return -1;
|
384
|
}
|
385
|
if (string2 == null && string1 != null){
|
386
|
return 1;
|
387
|
}
|
388
|
result = string1.compareToIgnoreCase(string2);
|
389
|
if (result == 0){
|
390
|
return o1.getUuid().compareTo(o2.getUuid());
|
391
|
}
|
392
|
}
|
393
|
return result;
|
394
|
}
|
395
|
}
|
396
|
|
397
|
private void updateView() {
|
398
|
Display.getDefault().asyncExec(new Runnable() {
|
399
|
@Override
|
400
|
public void run() {
|
401
|
if (viewer != null && !viewer.getControl().isDisposed()){
|
402
|
try{
|
403
|
viewer.setInput(referencingObjects);
|
404
|
|
405
|
showViewer();
|
406
|
|
407
|
//enable/disable table
|
408
|
viewer.getControl().setEnabled(referencingObjects!=null);
|
409
|
|
410
|
}catch(Exception e){
|
411
|
e.printStackTrace();
|
412
|
logger.debug(e.getStackTrace());
|
413
|
updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
|
414
|
}
|
415
|
|
416
|
}
|
417
|
}
|
418
|
});
|
419
|
}
|
420
|
|
421
|
|
422
|
private void updateDescription(final String description){
|
423
|
Display.getDefault().asyncExec(new Runnable() {
|
424
|
@Override
|
425
|
public void run() {
|
426
|
if (referencedObjectTitleCache != null){
|
427
|
setContentDescription(description);
|
428
|
} else {
|
429
|
setContentDescription(description);
|
430
|
}
|
431
|
}
|
432
|
|
433
|
});
|
434
|
}
|
435
|
|
436
|
/** {@inheritDoc} */
|
437
|
@Override
|
438
|
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
|
439
|
if(part == this){
|
440
|
return;
|
441
|
}
|
442
|
|
443
|
if(selection instanceof IStructuredSelection){
|
444
|
//referencedObjectTitleCache = null;
|
445
|
showViewer(part, (IStructuredSelection) selection);
|
446
|
}
|
447
|
}
|
448
|
|
449
|
/** {@inheritDoc} */
|
450
|
@Override
|
451
|
public void showViewer(IWorkbenchPart part, IStructuredSelection selection) {
|
452
|
// this.part = part;
|
453
|
|
454
|
Object firstElement = selection.getFirstElement();
|
455
|
if(firstElement instanceof TreeNode){
|
456
|
firstElement = ((TreeNode) firstElement).getValue();
|
457
|
}
|
458
|
if(firstElement instanceof CdmBase){
|
459
|
CdmBase referencedCdmObject = (CdmBase) firstElement;
|
460
|
if (referencedCdmObject.getUuid() == actualUuid){
|
461
|
return;
|
462
|
}
|
463
|
if (referencedCdmObject != null){
|
464
|
if(referencedCdmObject.isInstanceOf(IdentifiableEntity.class)){
|
465
|
referencedObjectTitleCache = (HibernateProxyHelper.deproxy(referencedCdmObject, IdentifiableEntity.class)).getTitleCache();
|
466
|
}
|
467
|
else if(referencedCdmObject.isInstanceOf(DescriptionElementBase.class)){
|
468
|
referencedObjectTitleCache = DescriptionHelper.getLabel(referencedCdmObject);
|
469
|
}
|
470
|
else if (referencedCdmObject.isInstanceOf(User.class)){
|
471
|
referencedObjectTitleCache = ((User)referencedCdmObject).getUsername();
|
472
|
}else if (referencedCdmObject.isInstanceOf(TaxonNode.class)){
|
473
|
referencedObjectTitleCache = "TaxonNode of "+(HibernateProxyHelper.deproxy(referencedCdmObject, TaxonNode.class)).getTaxon().getTitleCache();
|
474
|
}
|
475
|
}
|
476
|
if (referencedObjectTitleCache != null){
|
477
|
updateDescription("'" + referencedObjectTitleCache + "' is referenced by:");
|
478
|
} else{
|
479
|
updateDescription("");
|
480
|
}
|
481
|
|
482
|
updateReferencingObjects(referencedCdmObject.getUuid(),firstElement.getClass() );
|
483
|
|
484
|
}
|
485
|
else if (firstElement != null){
|
486
|
updateView();
|
487
|
updateDescription("");
|
488
|
}
|
489
|
}
|
490
|
|
491
|
/** {@inheritDoc} */
|
492
|
@Override
|
493
|
public void dispose() {
|
494
|
conversation.close();
|
495
|
selectionService.removePostSelectionListener(this);
|
496
|
selectionService.removeSelectionListener(this);
|
497
|
cdmEntitySession.dispose();
|
498
|
super.dispose();
|
499
|
|
500
|
}
|
501
|
|
502
|
/** {@inheritDoc} */
|
503
|
@Override
|
504
|
public Viewer getViewer() {
|
505
|
return viewer;
|
506
|
}
|
507
|
|
508
|
/** {@inheritDoc} */
|
509
|
@Override
|
510
|
public void changed(Object object) {
|
511
|
// no editing in this view
|
512
|
}
|
513
|
|
514
|
/** {@inheritDoc} */
|
515
|
@Override
|
516
|
public boolean onComplete() {
|
517
|
return false;
|
518
|
}
|
519
|
|
520
|
public void refresh(){
|
521
|
selectionService.removePostSelectionListener(this);
|
522
|
selectionService.removeSelectionListener(this);
|
523
|
selectionService.addPostSelectionListener(this);
|
524
|
selectionService.addSelectionListener(this);
|
525
|
|
526
|
}
|
527
|
|
528
|
@Override
|
529
|
protected String getViewName() {
|
530
|
return "Referencing Objects";
|
531
|
}
|
532
|
|
533
|
}
|