Revision f13a970a
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java | ||
---|---|---|
20 | 20 |
import org.eclipse.core.runtime.IProgressMonitor; |
21 | 21 |
import org.eclipse.core.runtime.IStatus; |
22 | 22 |
import org.eclipse.core.runtime.Status; |
23 |
import org.eclipse.core.runtime.jobs.IJobChangeEvent; |
|
24 |
import org.eclipse.core.runtime.jobs.IJobChangeListener; |
|
25 | 23 |
import org.eclipse.core.runtime.jobs.Job; |
26 |
import org.eclipse.core.runtime.jobs.JobChangeAdapter; |
|
27 | 24 |
import org.eclipse.jface.action.MenuManager; |
28 | 25 |
import org.eclipse.jface.viewers.CellEditor; |
29 | 26 |
import org.eclipse.jface.viewers.ICellModifier; |
... | ... | |
41 | 38 |
import org.eclipse.swt.widgets.Display; |
42 | 39 |
import org.eclipse.swt.widgets.Menu; |
43 | 40 |
import org.eclipse.swt.widgets.Table; |
44 |
import org.eclipse.ui.IActionBars; |
|
45 | 41 |
import org.eclipse.ui.IWorkbenchPart; |
46 | 42 |
import org.springframework.remoting.RemoteAccessException; |
47 | 43 |
|
... | ... | |
80 | 76 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
81 | 77 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
82 | 78 |
import eu.etaxonomy.taxeditor.model.DescriptionHelper; |
83 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
|
84 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
|
85 | 79 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
86 | 80 |
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart; |
87 | 81 |
|
... | ... | |
109 | 103 |
|
110 | 104 |
public ReferencingObjectsView() { |
111 | 105 |
// cdmEntitySession = CdmStore.getCurrentSessionManager().getNullSession(); |
112 |
|
|
106 |
|
|
113 | 107 |
//cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession(); |
114 | 108 |
} |
115 | 109 |
|
... | ... | |
123 | 117 |
createColumns(viewer); |
124 | 118 |
viewer.setContentProvider(new ReferencingObjectsContentProvider()); |
125 | 119 |
viewer.setLabelProvider(new ReferencingObjectsLabelProvider()); |
126 |
|
|
120 |
|
|
127 | 121 |
viewer.setCellModifier(new ICellModifier() { |
128 | 122 |
@Override |
129 | 123 |
public void modify(Object element, String property, Object value) { |
... | ... | |
197 | 191 |
if (actualUuid == entityUUID){ |
198 | 192 |
return ; |
199 | 193 |
} |
200 |
|
|
194 |
|
|
201 | 195 |
if(actualMonitor!=null && !actualMonitor.isCanceled()){ |
202 | 196 |
// boolean success = false; |
203 | 197 |
// //wait for cancel to be done |
... | ... | |
257 | 251 |
return Status.CANCEL_STATUS; |
258 | 252 |
} |
259 | 253 |
monitor.worked(80); |
260 |
|
|
254 |
|
|
261 | 255 |
updateView(); |
262 | 256 |
// if(previousCdmEntitySession != null) { |
263 | 257 |
// previousCdmEntitySession.bind(); |
264 | 258 |
// }else{ |
265 |
// CdmStore.getCurrentSessionManager().bind(null);
|
|
259 |
// CdmStore.getCurrentSessionManager().bind(null); |
|
266 | 260 |
// } |
267 | 261 |
// actualUuid = entityUUID; |
268 | 262 |
} |
269 | 263 |
monitor.done(); |
270 | 264 |
actualMonitor = null; |
271 |
|
|
265 |
|
|
272 | 266 |
return Status.OK_STATUS; |
273 | 267 |
|
274 | 268 |
|
... | ... | |
388 | 382 |
Display.getDefault().asyncExec(new Runnable() { |
389 | 383 |
@Override |
390 | 384 |
public void run() { |
391 |
|
|
385 |
|
|
392 | 386 |
if (viewer != null && !viewer.getControl().isDisposed()){ |
393 | 387 |
try{ |
394 | 388 |
viewer.setInput(referencingObjects); |
... | ... | |
418 | 412 |
} else { |
419 | 413 |
setContentDescription(description); |
420 | 414 |
} |
421 |
|
|
415 |
|
|
422 | 416 |
} |
423 | 417 |
|
424 | 418 |
}); |
... | ... | |
439 | 433 |
|
440 | 434 |
/** {@inheritDoc} */ |
441 | 435 |
@Override |
442 |
public void showViewer(IWorkbenchPart part, IStructuredSelection selection) {
|
|
436 |
public void showViewer(Object part, IStructuredSelection selection) {
|
|
443 | 437 |
// this.part = part; |
444 | 438 |
|
445 | 439 |
Object firstElement = selection.getFirstElement(); |
Also available in: Unified diff
ref #6596 Refactored selection handling to support e3 and e4 parts