Project

General

Profile

« Previous | Next » 

Revision b8e0aa81

Added by Patrick Plitzner over 6 years ago

ref #6905, #6597 Move part initialisation to sub classes

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java
8 8
*/
9 9
package eu.etaxonomy.taxeditor.view.e4;
10 10

  
11
import javax.annotation.PostConstruct;
12 11
import javax.annotation.PreDestroy;
13 12

  
14 13
import org.eclipse.e4.ui.di.PersistState;
15 14
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
16 15
import org.eclipse.jface.viewers.IStructuredSelection;
17 16
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.swt.widgets.Composite;
19 17
import org.eclipse.ui.IEditorPart;
20 18

  
21 19
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
......
37 35

  
38 36
    protected MPart selectionProvidingPart;
39 37

  
40
    @PostConstruct
41
    public void create(Composite parent) {
42
        viewer = createViewer(parent);
43
    }
44

  
45 38
    /** {@inheritDoc} */
46 39
    @Override
47 40
    public void changed(Object object) {
......
143 136

  
144 137
    protected abstract String getViewName();
145 138

  
146
    protected abstract AbstractCdmDataViewerE4 createViewer(Composite parent);
147 139
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsPartE4.java
9 9
*/
10 10
package eu.etaxonomy.taxeditor.view.e4.details;
11 11

  
12
import javax.annotation.PostConstruct;
12 13
import javax.inject.Inject;
13 14
import javax.inject.Named;
14 15

  
......
23 24
import eu.etaxonomy.taxeditor.l10n.Messages;
24 25
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
25 26
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
26
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
27 27
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4;
28 28

  
29 29
/**
......
37 37
    public DetailsPartE4() {
38 38
    }
39 39

  
40
    /**
41
     * {@inheritDoc}
42
     */
43
    @Override
44
    protected AbstractCdmDataViewerE4 createViewer(Composite parent) {
45
        return new DetailsViewerE4(parent, this);
40
    @PostConstruct
41
    public void create(Composite parent) {
42
        viewer = new DetailsViewerE4(parent, this);
46 43
    }
47 44

  
48 45
    @Inject
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataPartE4.java
11 11

  
12 12
import java.util.Set;
13 13

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

  
......
31 32
import eu.etaxonomy.taxeditor.l10n.Messages;
32 33
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
33 34
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
34
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
35 35
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4;
36 36

  
37 37

  
......
47 47
    public SupplementalDataPartE4() {
48 48
    }
49 49

  
50
	@Override
51
	public AbstractCdmDataViewerE4 createViewer(Composite parent) {
52
		return new SupplementalDataViewerE4(parent, this);
50
	@PostConstruct
51
	public void create(Composite parent) {
52
		viewer = new SupplementalDataViewerE4(parent, this);
53 53
	}
54 54

  
55 55
	@Inject

Also available in: Unified diff