@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
- if(part == this){
+ if(workbenchPart == this){
return;
}
- Object part = workbenchPart;
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object partObject = workbenchPart;
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
if(AbstractUtility.getActiveE4Editor() == null){
showEmptyPage();
return;
}
- if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
+ if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart) {
// do not show empty page as these views are also used to edit the
// description selected in this view
return;
}
- else if(part instanceof BulkEditor && selection instanceof LineSelection){
+ else if(partObject instanceof BulkEditor && selection instanceof LineSelection){
if(((LineSelection) selection).getFirstElement() instanceof Taxon){
- showViewer(part, (LineSelection) selection);
+ showViewer(partObject, (LineSelection) selection);
}
else{
showEmptyPage();
}
return;
}
- else if(part instanceof AbstractGraphKeyEditor){
+ else if(partObject instanceof AbstractGraphKeyEditor){
showEmptyPage();
return;
}
- else if(part instanceof MultiPageTaxonEditor){
- if(! part.equals(this.part)){
- IEditorInput input = ((IEditorPart) part).getEditorInput();
- showViewer(part, new StructuredSelection(input));
+ else if(partObject instanceof MultiPageTaxonEditor){
+ if(! partObject.equals(this.part)){
+ IEditorInput input = ((IEditorPart) partObject).getEditorInput();
+ showViewer(partObject, new StructuredSelection(input));
}
}
else {
@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
- Object part = workbenchPart;
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object partObject = workbenchPart;
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
// if(part instanceof ConceptGraphView){
// // ConceptGraphView is maximized
return;
}
- if(part instanceof BulkEditor){
+ if(partObject instanceof BulkEditor){
showEmptyPage();
return;
}
- if(part instanceof MultiPageTaxonEditor){
- if(! part.equals(this.part)){
- IEditorInput input = ((IEditorPart) part).getEditorInput();
- showViewer(part, new StructuredSelection(input));
+ if(partObject instanceof MultiPageTaxonEditor){
+ if(! partObject.equals(this.part)){
+ IEditorInput input = ((IEditorPart) partObject).getEditorInput();
+ showViewer(partObject, new StructuredSelection(input));
}
}
/** {@inheritDoc} */
@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
+ Object partObject = workbenchPart;
// if(AbstractUtility.getActiveE4Editor() == null){
// showEmptyPage();
// return;
// }
- if(part == this){
+ if(partObject == this){
return;
}
- Object part = workbenchPart;
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
- if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart
- || part instanceof MediaViewPart) {
+ if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart
+ || partObject instanceof MediaViewPart) {
// do not show empty page as these views are also used to edit the
// description selected in this view
return;
}
// unpackage TreeNode of DerivateView
- else if(part instanceof E4PartWrapper && ((E4PartWrapper)part).getPartName().equals("%command.label.DERIVATIVE_EDITOR")){
+ else if(partObject instanceof E4PartWrapper && ((E4PartWrapper)partObject).getPartName().equals("%command.label.DERIVATIVE_EDITOR")){
TreeNode treeNodeOfSelection = EditorUtil.getTreeNodeOfSelection(selection);
if(treeNodeOfSelection!=null){
selection = new StructuredSelection(treeNodeOfSelection.getValue());
- showViewer(part, (IStructuredSelection) selection);
+ showViewer(partObject, (IStructuredSelection) selection);
return;
}
}
- else if(part instanceof ChecklistEditor){
+ else if(partObject instanceof ChecklistEditor){
if(selection instanceof StructuredSelection && ((IStructuredSelection) selection).getFirstElement() instanceof Taxon){
Taxon taxon = (Taxon)((IStructuredSelection) selection).getFirstElement();
selection = new StructuredSelection(taxon);
}
if(selection instanceof IStructuredSelection
&& ((IStructuredSelection) selection).getFirstElement() instanceof IDescribable<?>
- && part instanceof IPartContentHasFactualData && !(((IStructuredSelection) selection).getFirstElement() instanceof SpecimenOrObservationBase && part instanceof BulkEditor)){
+ && partObject instanceof IPartContentHasFactualData && !(((IStructuredSelection) selection).getFirstElement() instanceof SpecimenOrObservationBase && partObject instanceof BulkEditor)){
featureNodeContainerCache.clear();
- showViewer(part, (IStructuredSelection) selection);
+ showViewer(partObject, (IStructuredSelection) selection);
return;
}
else{
/** {@inheritDoc} */
@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
- Object part = workbenchPart;
+ Object partObject = workbenchPart;
- if(part==this){
+ if(partObject==this){
return;
}
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
// if(AbstractUtility.getActiveE4Editor() == null){
// showEmptyPage();
// }
- if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart
- || part instanceof DescriptiveViewPart) {
+ if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart
+ || partObject instanceof DescriptiveViewPart) {
// do not show empty page as these views are also used to edit the
// description selected in this view
return;
}
- if(part instanceof IPartContentHasMedia && ((IPartContentHasMedia) part).canAttachMedia() ){
+ if(partObject instanceof IPartContentHasMedia && ((IPartContentHasMedia) partObject).canAttachMedia() ){
if(selection instanceof IStructuredSelection){
Object firstElement = ((IStructuredSelection) selection).getFirstElement();
if(firstElement instanceof TreeNode){
- showViewer(part, new StructuredSelection(((TreeNode) firstElement).getValue()));
+ showViewer(partObject, new StructuredSelection(((TreeNode) firstElement).getValue()));
return;
}
else if(firstElement!=null
&& firstElement instanceof IDescribable<?>){
- showViewer(part, (IStructuredSelection) selection);
+ showViewer(partObject, (IStructuredSelection) selection);
return;
}
}
if(structuredSelection.getFirstElement() instanceof TreeNode){
if (((TreeNode)structuredSelection.getFirstElement()).getValue() instanceof SpecimenOrObservationBase){
structuredSelection = new StructuredSelection(((TreeNode)structuredSelection.getFirstElement()).getValue());
- showViewer(part, structuredSelection);
+ showViewer(partObject, structuredSelection);
return;
}
}
@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection){
- Object part = workbenchPart;
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object partObject = workbenchPart;
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
if(AbstractUtility.getActiveE4Editor() == null && !(AbstractUtility.getActiveE4Part() instanceof IConversationEnabled)){
showEmptyPage();
//nothing
}
- if(part == this){
+ if(partObject == this){
return;
}
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if((part instanceof IEditorPart) || (part instanceof IPartContentHasDetails)) {
+ if((partObject instanceof IEditorPart) || (partObject instanceof IPartContentHasDetails)) {
if(structuredSelection.size() != 1){
showEmptyPage();
return;
return;
}
}
- showViewer(part, structuredSelection);
+ showViewer(partObject, structuredSelection);
}else{
showEmptyPage();
}
/** {@inheritDoc} */
@Override
protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
- Object part = workbenchPart;
- Object wrappedPart = WorkbenchUtility.getE4WrappedPart(part);
+ Object partObject = workbenchPart;
+ Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
if(wrappedPart!=null){
- part = wrappedPart;
+ partObject = wrappedPart;
}
if(AbstractUtility.getActiveE4Editor() == null){
showEmptyPage();
return;
}
- if(part == this){
+ if(partObject == this){
return;
}
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if((part instanceof EditorPart || part instanceof IPartContentHasSupplementalData)) {
+ if((partObject instanceof EditorPart || partObject instanceof IPartContentHasSupplementalData)) {
if(structuredSelection.size() != 1){
showEmptyPage();
return;
else if(structuredSelection.getFirstElement() instanceof GbifResponse){
structuredSelection = new StructuredSelection(((GbifResponse)structuredSelection.getFirstElement()).getDerivedUnitFacade().innerDerivedUnit());
}
- showViewer(part, structuredSelection);
+ showViewer(partObject, structuredSelection);
}else{
showEmptyPage();
}