Revision 027fe4eb
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
@Override |
59 | 59 |
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) { |
60 |
if(part == this){
|
|
60 |
if(workbenchPart == this){
|
|
61 | 61 |
return; |
62 | 62 |
} |
63 |
Object part = workbenchPart; |
|
64 |
Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part); |
|
63 |
Object partObject = workbenchPart;
|
|
64 |
Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
|
|
65 | 65 |
if(wrappedPart!=null){ |
66 |
part = wrappedPart; |
|
66 |
partObject = wrappedPart;
|
|
67 | 67 |
} |
68 | 68 |
if(AbstractUtility.getActiveE4Editor() == null){ |
69 | 69 |
showEmptyPage(); |
70 | 70 |
return; |
71 | 71 |
} |
72 | 72 |
|
73 |
if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
|
|
73 |
if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart) {
|
|
74 | 74 |
// do not show empty page as these views are also used to edit the |
75 | 75 |
// description selected in this view |
76 | 76 |
return; |
77 | 77 |
} |
78 |
else if(part instanceof BulkEditor && selection instanceof LineSelection){ |
|
78 |
else if(partObject instanceof BulkEditor && selection instanceof LineSelection){
|
|
79 | 79 |
if(((LineSelection) selection).getFirstElement() instanceof Taxon){ |
80 |
showViewer(part, (LineSelection) selection); |
|
80 |
showViewer(partObject, (LineSelection) selection);
|
|
81 | 81 |
} |
82 | 82 |
else{ |
83 | 83 |
showEmptyPage(); |
84 | 84 |
} |
85 | 85 |
return; |
86 | 86 |
} |
87 |
else if(part instanceof AbstractGraphKeyEditor){ |
|
87 |
else if(partObject instanceof AbstractGraphKeyEditor){
|
|
88 | 88 |
showEmptyPage(); |
89 | 89 |
return; |
90 | 90 |
} |
91 |
else if(part instanceof MultiPageTaxonEditor){ |
|
92 |
if(! part.equals(this.part)){ |
|
93 |
IEditorInput input = ((IEditorPart) part).getEditorInput(); |
|
94 |
showViewer(part, new StructuredSelection(input)); |
|
91 |
else if(partObject instanceof MultiPageTaxonEditor){
|
|
92 |
if(! partObject.equals(this.part)){
|
|
93 |
IEditorInput input = ((IEditorPart) partObject).getEditorInput();
|
|
94 |
showViewer(partObject, new StructuredSelection(input));
|
|
95 | 95 |
} |
96 | 96 |
} |
97 | 97 |
else { |
Also available in: Unified diff
ref #6748 Refactor parameter name to avoid ambiguity