Project

General

Profile

« Previous | Next » 

Revision c7dd4e36

Added by Patrick Plitzner over 6 years ago

ref #6949 Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java
57 57
            //FIXME E4 migrate
58 58
            try{
59 59
            EPartService partService = TaxeditorStorePlugin.getDefault().getWorkbench().getService(EPartService.class);
60
            MPart detailsPart = partService.findPart("eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4");
61
            if(detailsPart!=null){
62
                ((AbstractCdmDataViewerE4) ((DetailsPartE4)detailsPart.getObject()).getViewer()).reflow();
60
            MPart mPartDetails = partService.findPart("eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4");
61
            if(mPartDetails!=null){
62
                DetailsPartE4 detailsPart = (DetailsPartE4)mPartDetails.getObject();
63
                if(detailsPart!=null && detailsPart.getViewer()!=null){
64
                    ((AbstractCdmDataViewerE4) detailsPart.getViewer()).reflow();
65
                }
63 66
            }
64
            MPart supplementalPart = partService.findPart("eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4");
65
            if(supplementalPart!=null){
66
                ((AbstractCdmDataViewerE4) ((SupplementalDataPartE4)supplementalPart.getObject()).getViewer()).reflow();
67
            MPart mPartSupplemental = partService.findPart("eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4");
68
            if(mPartSupplemental!=null){
69
                SupplementalDataPartE4 supplementalPart = (SupplementalDataPartE4)mPartSupplemental.getObject();
70
                if(supplementalPart!=null && supplementalPart.getViewer()!=null){
71
                    ((AbstractCdmDataViewerE4) (supplementalPart).getViewer()).reflow();
72
                }
67 73
            }
68 74
            }
69 75
            catch(IllegalStateException e){

Also available in: Unified diff