Project

General

Profile

« Previous | Next » 

Revision 79724bfc

Added by Katja Luther about 8 years ago

create a message dialog if a widget is disposed problem occurs

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmEditorViewPart.java
78 78
    /** {@inheritDoc} */
79 79
    @Override
80 80
    public void selectionChanged(IWorkbenchPart part, ISelection selection) {
81
    	//to avoid widget is disposed exceptions
81
    	/*to avoid widget is disposed exceptions
82 82
        if(getViewer().getControl().isDisposed()){
83 83
            return;
84
        }
84
        }*/
85 85
    	if(delaySelection==null){
86 86
            delaySelection = new DelaySelection(part, selection);
87 87
        }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java
34 34
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
35 35
import eu.etaxonomy.taxeditor.model.AbstractUtility;
36 36
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
37
import eu.etaxonomy.taxeditor.model.MessagingUtils;
37 38
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
38 39
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
39 40
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
......
109 110
        this.part = part;
110 111

  
111 112
        Object element = selection.getFirstElement();
112

  
113
        getViewer().setInput(element);
114

  
115
        showViewer();
113
        try{
114
        	getViewer().setInput(element);
115
        	showViewer();
116
        } catch(IllegalStateException e){
117
        	MessagingUtils.messageDialog("Problems during setting the focus", null, "An uncritical problem occurs while the Editor tried to set a new focus.", e);
118
        }
116 119
    }
117 120

  
118 121
    /**

Also available in: Unified diff