Project

General

Profile

« Previous | Next » 

Revision 3f09ac44

Added by Patrick Plitzner over 6 years ago

ref #6908 Migrate polytomous key list and graph editor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/e4/DataImportViewE4.java
13 13

  
14 14
import javax.annotation.PostConstruct;
15 15
import javax.annotation.PreDestroy;
16
import javax.inject.Inject;
17
import javax.inject.Named;
18 16

  
19 17
import org.apache.log4j.Logger;
20 18
import org.eclipse.core.runtime.IProgressMonitor;
21 19
import org.eclipse.e4.ui.di.Focus;
22
import org.eclipse.e4.ui.services.IServiceConstants;
23 20
import org.eclipse.jface.viewers.CheckboxTableViewer;
24 21
import org.eclipse.jface.wizard.IWizard;
25 22
import org.eclipse.jface.wizard.WizardDialog;
......
34 31
import org.eclipse.swt.widgets.Event;
35 32
import org.eclipse.swt.widgets.Label;
36 33
import org.eclipse.swt.widgets.Listener;
37
import org.eclipse.swt.widgets.Shell;
38 34
import org.eclipse.swt.widgets.Table;
39 35
import org.eclipse.swt.widgets.TableItem;
40 36
import org.eclipse.swt.widgets.Text;
......
69 65

  
70 66
    protected final Logger logger = Logger.getLogger(DataImportViewE4.class);
71 67

  
72
    @Inject
73
    private Shell shell;
74

  
75 68
    protected Collection<T> results = new ArrayList<T>();
76 69

  
77 70
    protected boolean updated = false;
......
115 108
     */
116 109
    public DataImportViewE4() {
117 110
        CdmStore.getContextManager().addContextListener(this);
118
        if(CdmStore.isActive()){
119
            initConversation();
120
        }
111

  
121 112
    }
122 113

  
123 114
    /**
......
125 116
     * @param parent
126 117
     */
127 118
    @PostConstruct
128
    public void createPartControl(Composite parent, @Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
129
        this.shell = shell;
119
    public void createPartControl(Composite parent) {
120
        if(CdmStore.isActive()){
121
            initConversation();
122
        }
123
        else{
124
            return;
125
        }
130 126
        Composite composite = new Composite(parent, SWT.NONE);
131 127
        composite.setLayout(new GridLayout(2, false));
132 128

  
......
330 326
    @Override
331 327
	public void handleEvent(Event event) {
332 328
	    if(event.widget==btnBrowseClassification){
333
	        classification = SelectionDialogFactory.getSelectionFromDialog(Classification.class, shell, null, null);
329
	        classification = SelectionDialogFactory.getSelectionFromDialog(Classification.class, event.widget.getDisplay().getActiveShell(), null, null);
334 330
	        if(classification!=null){
335 331
	            textClassification.setText(classification.getTitleCache());
336 332
	        }

Also available in: Unified diff