Project

General

Profile

Revision 607cfd81

ID607cfd8163eba7d96ed63790f1effceff27bca31
Parent 349c3582
Child e26c2cca

Added by Patrick Plitzner over 3 years ago

ref #6694 Refactor shell access

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java
19 19
import javax.annotation.PostConstruct;
20 20
import javax.annotation.PreDestroy;
21 21
import javax.inject.Inject;
22
import javax.inject.Named;
23 22

  
24 23
import org.eclipse.core.runtime.IStatus;
25
import org.eclipse.e4.core.di.annotations.Optional;
26 24
import org.eclipse.e4.ui.di.Focus;
27 25
import org.eclipse.e4.ui.di.Persist;
28 26
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
29
import org.eclipse.e4.ui.services.IServiceConstants;
30 27
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
31 28
import org.eclipse.jface.viewers.ISelectionChangedListener;
32 29
import org.eclipse.jface.viewers.IStructuredSelection;
......
38 35
import org.eclipse.swt.events.SelectionAdapter;
39 36
import org.eclipse.swt.events.SelectionEvent;
40 37
import org.eclipse.swt.widgets.Composite;
41
import org.eclipse.swt.widgets.Shell;
42 38

  
43 39
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
44 40
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
......
82 78

  
83 79
	/** {@inheritDoc} */
84 80
    @PostConstruct
85
    public void createControl(Composite parent, @Optional@Named(IServiceConstants.ACTIVE_SHELL) Shell shell){
81
    public void createControl(Composite parent){
86 82
        if (CdmStore.isActive()){
87 83
            if(conversation == null){
88 84
                conversation = CdmStore.createConversation();
......
108 104
                            }
109 105

  
110 106
                        }
111
                        FeatureTree tree = FeatureTreeSelectionDialog.select(shell, conversation, null);
107
                        FeatureTree tree = FeatureTreeSelectionDialog.select(composite.getDisplay().getActiveShell(), conversation, null);
112 108
                        if (tree != null) {
113 109
                            composite.setSelectedTree(tree, FeatureTreeEditor.this);
114 110
                        }
115 111
                    }
116
                }, new AddButtonListener(), new RemoveSelectionListener(), new FeatureTreeExportListener(shell, composite));
112
                }, new AddButtonListener(), new RemoveSelectionListener(), new FeatureTreeExportListener(composite.getDisplay().getActiveShell(), composite));
117 113
    }
118 114

  
119 115
	public void setDirty(boolean isDirty){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)