Project

General

Profile

« Previous | Next » 

Revision 672874ab

Added by Patrick Plitzner about 6 years ago

ref #7268 Implement own extension point for preferences

Conflicts:

eu.etaxonomy.taxeditor.workbench/fragment.e4xmi

View differences:

eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
129 129
      </fragment>
130 130
   </extension>
131 131
   <extension
132
         point="org.eclipse.ui.preferencePages">
132
         point="eu.etaxonomy.taxeditor.store.preferencePage">
133 133
      <page
134 134
            category="eu.etaxonomy.taxeditor.preferences.bulkeditor.general"
135 135
            class="eu.etaxonomy.taxeditor.bulkeditor.preference.BulkEditorMarkerPreferencePage"
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/preference/BulkEditorGeneralPreferencePage.java
10 10
package eu.etaxonomy.taxeditor.bulkeditor.preference;
11 11

  
12 12
import org.eclipse.jface.preference.BooleanFieldEditor;
13
import org.eclipse.jface.preference.FieldEditorPreferencePage;
14
import org.eclipse.ui.IWorkbench;
15
import org.eclipse.ui.IWorkbenchPreferencePage;
16 13

  
17 14
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
18
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
15
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
19 16

  
20 17
/**
21 18
 * @author n.hoffmann
22 19
 * @created Dec 13, 2010
23 20
 * @version 1.0
24 21
 */
25
public class BulkEditorGeneralPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
22
public class BulkEditorGeneralPreferencePage extends FieldEditorPreferencePageE4 {
26 23

  
27
    /* (non-Javadoc)
28
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
29
     */
30 24
    @Override
31 25
    protected void createFieldEditors() {
32 26
        addField(new BooleanFieldEditor(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS,
......
34 28
                getFieldEditorParent()));
35 29
    }
36 30

  
37
    /* (non-Javadoc)
38
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
39
	 */
40
	@Override
41
	public void init(IWorkbench workbench) {
42
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
43
	}
44

  
45

  
46 31
}
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/preference/BulkEditorMarkerPreferencePage.java
10 10
package eu.etaxonomy.taxeditor.bulkeditor.preference;
11 11

  
12 12
import org.eclipse.jface.preference.BooleanFieldEditor;
13
import org.eclipse.jface.preference.FieldEditorPreferencePage;
14
import org.eclipse.ui.IWorkbench;
15
import org.eclipse.ui.IWorkbenchPreferencePage;
16 13

  
17 14
import eu.etaxonomy.cdm.model.common.MarkerType;
18 15
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
19
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
16
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
20 17
import eu.etaxonomy.taxeditor.store.CdmStore;
21 18
import eu.etaxonomy.taxeditor.store.TermStore;
22 19

  
......
25 22
 * @created 17.08.2009
26 23
 * @version 1.0
27 24
 */
28
public class BulkEditorMarkerPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
25
public class BulkEditorMarkerPreferencePage extends FieldEditorPreferencePageE4 {
29 26

  
30 27

  
31
	@Override
32
	public void init(IWorkbench workbench) {
33
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
34
	}
35

  
36 28
    @Override
37 29
    protected void createFieldEditors() {
38 30
        if(CdmStore.isActive()){
eu.etaxonomy.taxeditor.store/plugin.xml
2 2
<?eclipse version="3.2"?>
3 3
<plugin>
4 4
   <extension-point id="eu.etaxonomy.taxeditor.store.cdmViewer" name="Cdm Viewer" schema="schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd"/>
5
   <extension-point id="eu.etaxonomy.taxeditor.store.preferencePage" name="Preference Page" schema="schema/eu.etaxonomy.taxeditor.store.preferencePage.exsd"/>
5 6
   <extension
6 7
         point="org.eclipse.ui.menus">
7 8
      <menuContribution
......
364 365
   </fragment>
365 366
</extension>
366 367
<extension
367
      point="org.eclipse.ui.preferencePages">
368
   <page
368
      point="eu.etaxonomy.taxeditor.store.preferencePage">
369
<page
369 370
         category="eu.etaxonomy.taxeditor.preferences.general"
370 371
         class="eu.etaxonomy.taxeditor.preference.DebugPreferences"
371 372
         id="eu.etaxonomy.taxeditor.preference.DebugPreferences"
eu.etaxonomy.taxeditor.store/schema/eu.etaxonomy.taxeditor.store.preferencePage.exsd
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="eu.etaxonomy.taxeditor.store" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
5
      <appInfo>
6
         <meta.schema plugin="eu.etaxonomy.taxeditor.store" id="eu.etaxonomy.taxeditor.store.preferencePage" name="Preference Page"/>
7
      </appInfo>
8
      <documentation>
9
         [Enter description of this extension point.]
10
      </documentation>
11
   </annotation>
12

  
13
   <element name="extension">
14
      <annotation>
15
         <appInfo>
16
            <meta.element />
17
         </appInfo>
18
      </annotation>
19
      <complexType>
20
         <sequence minOccurs="0" maxOccurs="unbounded">
21
            <element ref="page"/>
22
         </sequence>
23
         <attribute name="point" type="string" use="required">
24
            <annotation>
25
               <documentation>
26
                  
27
               </documentation>
28
            </annotation>
29
         </attribute>
30
         <attribute name="id" type="string">
31
            <annotation>
32
               <documentation>
33
                  
34
               </documentation>
35
            </annotation>
36
         </attribute>
37
         <attribute name="name" type="string">
38
            <annotation>
39
               <documentation>
40
                  
41
               </documentation>
42
               <appInfo>
43
                  <meta.attribute translatable="true"/>
44
               </appInfo>
45
            </annotation>
46
         </attribute>
47
      </complexType>
48
   </element>
49

  
50
   <element name="page">
51
      <annotation>
52
         <appInfo>
53
            <meta.element labelAttribute="name"/>
54
         </appInfo>
55
      </annotation>
56
      <complexType>
57
         <attribute name="id" type="string" use="required">
58
            <annotation>
59
               <documentation>
60
                  a unique name that will be used to identify this page.
61
               </documentation>
62
            </annotation>
63
         </attribute>
64
         <attribute name="name" type="string" use="required">
65
            <annotation>
66
               <documentation>
67
                  a translatable name that will be used in the UI for this page.
68
               </documentation>
69
               <appInfo>
70
                  <meta.attribute translatable="true"/>
71
               </appInfo>
72
            </annotation>
73
         </attribute>
74
         <attribute name="class" type="string" use="required">
75
            <annotation>
76
               <documentation>
77
                  a name of the fully qualified class that implements 
78
&lt;samp&gt;eu.etaxonomy.taxeditor.preference.IE4PreferencePage&lt;/samp&gt;.
79
               </documentation>
80
               <appInfo>
81
                  <meta.attribute kind="java" basedOn=":eu.etaxonomy.taxeditor.preference.IE4PreferencePage"/>
82
               </appInfo>
83
            </annotation>
84
         </attribute>
85
         <attribute name="category" type="string">
86
            <annotation>
87
               <documentation>
88
                  a path indicating the location of the page in the preference tree. The path may either be a parent node ID or a sequence
89
     of IDs separated by &apos;/&apos;, representing the full path from the root node.
90
               </documentation>
91
               <appInfo>
92
                  <meta.attribute kind="identifier" basedOn="eu.etaxonomy.taxeditor.store.preferencePage/page/@id"/>
93
               </appInfo>
94
            </annotation>
95
         </attribute>
96
      </complexType>
97
   </element>
98

  
99
   <annotation>
100
      <appInfo>
101
         <meta.section type="since"/>
102
      </appInfo>
103
      <documentation>
104
         [Enter the first release in which this extension point appears.]
105
      </documentation>
106
   </annotation>
107

  
108
   <annotation>
109
      <appInfo>
110
         <meta.section type="examples"/>
111
      </appInfo>
112
      <documentation>
113
         [Enter extension point usage example here.]
114
      </documentation>
115
   </annotation>
116

  
117
   <annotation>
118
      <appInfo>
119
         <meta.section type="apiinfo"/>
120
      </appInfo>
121
      <documentation>
122
         [Enter API information here.]
123
      </documentation>
124
   </annotation>
125

  
126
   <annotation>
127
      <appInfo>
128
         <meta.section type="implementation"/>
129
      </appInfo>
130
      <documentation>
131
         [Enter information about supplied implementation of this extension point.]
132
      </documentation>
133
   </annotation>
134

  
135

  
136
</schema>
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/EventUtility.java
14 14
import javax.inject.Inject;
15 15
import javax.inject.Named;
16 16

  
17
import org.eclipse.e4.core.commands.ECommandService;
17 18
import org.eclipse.e4.core.di.annotations.Optional;
18 19
import org.eclipse.e4.core.services.events.IEventBroker;
19 20
import org.eclipse.e4.ui.di.UIEventTopic;
......
42 43
    @Inject
43 44
    private static IEventBroker eventBroker;
44 45

  
46
    @Inject
47
    private static ECommandService commandService;
48

  
45 49
    @PostConstruct
46 50
    public void create(){
47 51
        //nothing
......
51 55
        eventBroker.post(topic, data);
52 56
    }
53 57

  
58
    public static ECommandService getCommandService() {
59
        return commandService;
60
    }
61

  
54 62
    @Inject
55 63
    @Optional
56 64
    private void updateCurrentActiveShell(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/AdminGeneralPreferences.java
9 9
package eu.etaxonomy.taxeditor.preference;
10 10

  
11 11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
12

  
13
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
15 14

  
16 15
/**
17 16
 * @author k.luther
18 17
 * @date 01.11.2016
19 18
 *
20 19
 */
21
public class AdminGeneralPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
22

  
23
    /* (non-Javadoc)
24
     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
25
     */
26
    @Override
27
    public void init(IWorkbench workbench) {
28
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
29

  
30

  
31
    }
20
public class AdminGeneralPreferences extends FieldEditorPreferencePageE4 {
32 21

  
33 22
    /* (non-Javadoc)
34 23
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/AdminPreferencesPage.java
1
/**
2
* Copyright (C) 2016 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.preference;
10

  
11
import org.eclipse.jface.preference.FieldEditorPreferencePage;
12
import org.eclipse.ui.IWorkbench;
13
import org.eclipse.ui.IWorkbenchPreferencePage;
14

  
15
/**
16
 * @author k.luther
17
 * @date 01.11.2016
18
 *
19
 */
20
public class AdminPreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
21

  
22
    /* (non-Javadoc)
23
     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
24
     */
25
    @Override
26
    public void init(IWorkbench workbench) {
27

  
28
    }
29

  
30
    /* (non-Javadoc)
31
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
32
     */
33
    @Override
34
    protected void createFieldEditors() {
35

  
36
    }
37

  
38

  
39
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java
17 17
import org.eclipse.swt.widgets.Button;
18 18
import org.eclipse.swt.widgets.Composite;
19 19
import org.eclipse.swt.widgets.Control;
20
import org.eclipse.ui.IWorkbench;
21
import org.eclipse.ui.IWorkbenchPreferencePage;
22 20

  
23 21
import eu.etaxonomy.taxeditor.store.CdmStore;
24 22
import eu.etaxonomy.taxeditor.ui.element.CommandHandlerButton;
......
28 26
 * @date 21.07.2014
29 27
 *
30 28
 */
31
public class ChecklistEditorGeneralPreference extends PreferencePage implements IWorkbenchPreferencePage {
29
public class ChecklistEditorGeneralPreference extends PreferencePage {
32 30

  
33 31
    boolean isEditorActivated;
34 32
    Composite child ;
35
    /*
36
     * (non-Javadoc)
37
     *
38
     * @see
39
     * org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors
40
     * ()
41
     */
33

  
42 34
    @Override
43 35
    protected Control createContents(Composite parent) {
44 36

  
......
129 121
        return composite;
130 122
    }
131 123

  
132
    /*
133
     * (non-Javadoc)
134
     *
135
     * @see
136
     * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
137
     */
138
    @Override
139
    public void init(IWorkbench workbench) {
140
    }
141

  
142 124
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DebugPreferences.java
9 9
package eu.etaxonomy.taxeditor.preference;
10 10

  
11 11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
12

  
13
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
15 14

  
16 15
/**
17 16
 * @author k.luther
18 17
 * @date 01.04.2016
19 18
 *
20 19
 */
21
public class DebugPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
22

  
23
    /* (non-Javadoc)
24
     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
25
     */
26
    @Override
27
    public void init(IWorkbench workbench) {
28
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
29

  
30
    }
20
public class DebugPreferences extends FieldEditorPreferencePageE4 {
31 21

  
32
    /* (non-Javadoc)
33
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
34
     */
35 22
    @Override
36 23
    protected void createFieldEditors() {
37 24
        addField(new BooleanFieldEditor(IPreferenceKeys.IS_SHOW_UP_WIDGET_IS_DISPOSED,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DefaultFeatureTreePreferenecs.java
22 22
import org.eclipse.swt.layout.GridLayout;
23 23
import org.eclipse.swt.widgets.Composite;
24 24
import org.eclipse.swt.widgets.Control;
25
import org.eclipse.ui.IWorkbench;
26
import org.eclipse.ui.IWorkbenchPreferencePage;
27 25

  
28 26
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
29 27
import eu.etaxonomy.cdm.model.description.FeatureTree;
......
40 38
 * @created Sep 16, 2010
41 39
 * @version 1.0
42 40
 */
43
public class DefaultFeatureTreePreferenecs extends CdmPreferencePage implements IWorkbenchPreferencePage {
41
public class DefaultFeatureTreePreferenecs extends CdmPreferencePage {
44 42

  
45 43
	private FeatureTree defaultFeatureTreeForTextualDescription;
46 44
	private FeatureTree defaultFeatureTreeForStructuredDescription;
47 45

  
48
	/* (non-Javadoc)
49
	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
50
	 */
51 46
	/** {@inheritDoc} */
52 47
	@Override
53 48
	protected Control createContents(Composite parent) {
......
126 121
		}
127 122
	}
128 123

  
129
	/** {@inheritDoc} */
130
	@Override
131
	public void init(IWorkbench workbench) {
132
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
133
	}
134

  
135 124
	/** {@inheritDoc} */
136 125
	@Override
137 126
	public boolean performOk() {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DescriptionPreferences.java
10 10
package eu.etaxonomy.taxeditor.preference;
11 11

  
12 12
import org.eclipse.jface.preference.BooleanFieldEditor;
13
import org.eclipse.jface.preference.FieldEditorPreferencePage;
14
import org.eclipse.ui.IWorkbench;
15
import org.eclipse.ui.IWorkbenchPreferencePage;
13

  
14
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
16 15

  
17 16
/**
18 17
 * <p>DescriptionPreferences class.</p>
......
21 20
 * @created 20.05.2008
22 21
 * @version 1.0
23 22
 */
24
public class DescriptionPreferences extends FieldEditorPreferencePage implements
25
		IWorkbenchPreferencePage {
23
public class DescriptionPreferences extends FieldEditorPreferencePageE4 {
26 24

  
27 25
	/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.preferences.desc"{trunked}</code> */
28 26
	public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.description";
29 27

  
30
	/** {@inheritDoc} */
31
	@Override
32
    public void init(IWorkbench workbench) {
33
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
34

  
35
	}
36

  
37 28
	@Override
38 29
	protected void createFieldEditors() {
39 30
	    addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_VOCABULARY_ID_FOR_TERM_LABELS,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IE4PreferencePage.java
1
// $Id$
2
/**
3
* Copyright (C) 2018 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.preference;
11

  
12
/**
13
 * Interface for e4 compatible preference extension point.
14
 * @author pplitzner
15
 * @date 14.02.2018
16
 *
17
 */
18
public interface IE4PreferencePage {
19

  
20
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
14 14

  
15 15
import org.apache.commons.lang.StringUtils;
16 16
import org.eclipse.jface.dialogs.MessageDialog;
17
import org.eclipse.jface.preference.PreferencePage;
18 17
import org.eclipse.swt.SWT;
19 18
import org.eclipse.swt.custom.CCombo;
20 19
import org.eclipse.swt.events.SelectionEvent;
......
24 23
import org.eclipse.swt.widgets.Composite;
25 24
import org.eclipse.swt.widgets.Control;
26 25
import org.eclipse.swt.widgets.Label;
27
import org.eclipse.ui.IWorkbench;
28
import org.eclipse.ui.IWorkbenchPreferencePage;
29 26
import org.eclipse.ui.PlatformUI;
30 27

  
31 28
import eu.etaxonomy.taxeditor.l10n.Messages;
32 29
import eu.etaxonomy.taxeditor.model.MessagingUtils;
30
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
33 31

  
34 32
/**
35 33
 * @author n.hoffmann
36 34
 * @created Dec 3, 2010
37 35
 * @version 1.0
38 36
 */
39
public class LanguageEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage{
37
public class LanguageEditorPreferencePage extends CdmPreferencePage {
40 38

  
41 39
    private CCombo combo;
42 40
    PreferencesUtil preferencesUtil = new PreferencesUtil();
43 41
    private boolean isSelectionChanged = false;
44 42
    private int initalSelectionIndex;
45 43

  
46
	/* (non-Javadoc)
47
	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
48
	 */
49 44
	@Override
50 45
	protected Control createContents(Composite parent) {
51 46
		Composite container = new Composite(parent, SWT.NULL);
......
143 138
        }
144 139
    }
145 140

  
146
 	/* (non-Javadoc)
147
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
148
	 */
149
	@Override
150
	public void init(IWorkbench workbench) {
151
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
152
	}
153

  
154
	/* (non-Javadoc)
155
	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
156
	 */
157 141
	@Override
158 142
	public boolean performOk() {
159 143
        try {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageRepresentationPreferencePage.java
11 11

  
12 12
import java.util.List;
13 13

  
14
import org.eclipse.jface.preference.PreferencePage;
15 14
import org.eclipse.swt.SWT;
16 15
import org.eclipse.swt.events.SelectionAdapter;
17 16
import org.eclipse.swt.events.SelectionEvent;
......
23 22
import org.eclipse.swt.widgets.Composite;
24 23
import org.eclipse.swt.widgets.Control;
25 24
import org.eclipse.swt.widgets.Label;
26
import org.eclipse.ui.IWorkbench;
27
import org.eclipse.ui.IWorkbenchPreferencePage;
28 25

  
29 26
import eu.etaxonomy.cdm.model.common.Language;
27
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
30 28
import eu.etaxonomy.taxeditor.store.CdmStore;
31 29

  
32 30
/**
......
34 32
 * @created Dec 3, 2010
35 33
 * @version 1.0
36 34
 */
37
public class LanguageRepresentationPreferencePage extends PreferencePage implements IWorkbenchPreferencePage{
35
public class LanguageRepresentationPreferencePage extends CdmPreferencePage{
38 36

  
39 37
	private boolean isMultilanguageTextEditingCapability;
40 38
	private Language globalLanguage;
......
46 44
		return composite;
47 45
	}
48 46

  
49
	/* (non-Javadoc)
50
	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
51
	 */
52 47
	@Override
53 48
	protected Control createContents(Composite parent) {
54 49
		Composite container = new Composite(parent, SWT.NULL);
......
64 59

  
65 60
	}
66 61

  
67
	/**
68
	 * @param container
69
	 */
70 62
	private void createSetDefaultLanguage(Composite parent) {
71 63
		globalLanguage = PreferencesUtil.getGlobalLanguage();
72 64

  
......
108 100
		});
109 101
	}
110 102

  
111
	/**
112
	 *
113
	 */
114 103
	private void createSetMultiLanguageTextEditingCapability(Composite parent) {
115 104
		isMultilanguageTextEditingCapability = getPreferenceStore().getBoolean(IPreferenceKeys.MULTILANGUAGE_TEXT_EDITING_CAPABILITY);
116 105

  
......
135 124
		});
136 125
	}
137 126

  
138
	/* (non-Javadoc)
139
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
140
	 */
141
	@Override
142
	public void init(IWorkbench workbench) {
143
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
144
	}
145

  
146
	/* (non-Javadoc)
147
	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
148
	 */
149 127
	@Override
150 128
	public boolean performOk() {
151 129
		getPreferenceStore().setValue(IPreferenceKeys.MULTILANGUAGE_TEXT_EDITING_CAPABILITY, isMultilanguageTextEditingCapability);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/MatchingPreferences.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference;
11 11

  
12
import org.eclipse.jface.preference.PreferencePage;
13 12
import org.eclipse.swt.SWT;
14 13
import org.eclipse.swt.layout.GridLayout;
15 14
import org.eclipse.swt.widgets.Composite;
16 15
import org.eclipse.swt.widgets.Control;
17
import org.eclipse.ui.IWorkbench;
18
import org.eclipse.ui.IWorkbenchPreferencePage;
16

  
17
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
19 18

  
20 19
/**
21 20
 * <p>MatchingPreferences class.</p>
......
24 23
 * @created Jan 22, 2010
25 24
 * @version 1.0
26 25
 */
27
public class MatchingPreferences extends PreferencePage implements
28
	IWorkbenchPreferencePage  {
26
public class MatchingPreferences extends CdmPreferencePage  {
29 27

  
30
	/* (non-Javadoc)
31
	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
32
	 */
33 28
	/** {@inheritDoc} */
34 29
	@Override
35 30
	protected Control createContents(Composite parent) {
......
40 35
		return container;
41 36
	}
42 37

  
43
	/* (non-Javadoc)
44
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
45
	 */
46
	/** {@inheritDoc} */
47
	public void init(IWorkbench workbench) {
48
		
49
	}
50
	
51
	
52 38
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/MediaPreferences.java
9 9
package eu.etaxonomy.taxeditor.preference;
10 10

  
11 11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
12

  
13
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
15 14

  
16 15
/**
17 16
 * @author pplitzner
18 17
 * @date 13.02.2014
19 18
 *
20 19
 */
21
public class MediaPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
22

  
23
    /* (non-Javadoc)
24
     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
25
     */
26
    @Override
27
    public void init(IWorkbench workbench) {
28
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
29
    }
20
public class MediaPreferences extends FieldEditorPreferencePageE4 {
30 21

  
31
    /* (non-Javadoc)
32
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
33
     */
34 22
    @Override
35 23
    protected void createFieldEditors() {
36 24
        addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_ADVANCED_MEDIA_SECTION,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/MobotOpenUrlPreferences.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference;
11 11

  
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13 12
import org.eclipse.jface.preference.IntegerFieldEditor;
14 13
import org.eclipse.jface.preference.StringFieldEditor;
15
import org.eclipse.ui.IWorkbench;
16
import org.eclipse.ui.IWorkbenchPreferencePage;
14

  
15
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
17 16

  
18 17
/**
19 18
 * @author n.hoffmann
20 19
 * @created Feb 4, 2011
21 20
 * @version 1.0
22 21
 */
23
public class MobotOpenUrlPreferences extends FieldEditorPreferencePage implements
24
		IWorkbenchPreferencePage {
22
public class MobotOpenUrlPreferences extends FieldEditorPreferencePageE4 {
25 23

  
26 24

  
27 25
    @Override
......
40 38

  
41 39
    }
42 40

  
43
    @Override
44
    public void init(IWorkbench workbench) {
45
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
46
    }
47 41
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
1 1
package eu.etaxonomy.taxeditor.preference;
2 2

  
3 3

  
4
import org.eclipse.jface.preference.PreferencePage;
5 4
import org.eclipse.swt.SWT;
6 5
import org.eclipse.swt.events.SelectionAdapter;
7 6
import org.eclipse.swt.events.SelectionEvent;
......
10 9
import org.eclipse.swt.widgets.Composite;
11 10
import org.eclipse.swt.widgets.Control;
12 11
import org.eclipse.swt.widgets.Label;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
15 12

  
16 13
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
17 14
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
18 15
import eu.etaxonomy.taxeditor.l10n.Messages;
16
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
19 17

  
20 18

  
21
public class NameDetailsViewConfiguration extends PreferencePage implements IWorkbenchPreferencePage {
22
	boolean isSimpleDetailsViewActivated;
19
public class NameDetailsViewConfiguration extends CdmPreferencePage {
20

  
21
    boolean isSimpleDetailsViewActivated;
23 22
	boolean isUseLocalSettings;
24 23
    Composite child ;
25 24
    Composite localSettings ;
26
	@Override
27
	public void init(IWorkbench workbench) {
28

  
29
	}
30 25

  
31
	/*
32
     * (non-Javadoc)
33
     *
34
     * @see
35
     * org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors
36
     * ()
37
     */
38 26
    @Override
39 27
    protected Control createContents(Composite parent) {
40 28

  
......
299 287
            label.setText("The CDM settings don't allow to set the preferences for the display of name details locally. If you need to make local settings, please ask an administrator.");
300 288
        }
301 289
        return composite;
302

  
303

  
304

  
305 290
	}
306 291

  
307 292
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java
1 1
package eu.etaxonomy.taxeditor.preference;
2 2

  
3 3
import org.eclipse.jface.dialogs.MessageDialog;
4
import org.eclipse.jface.preference.PreferencePage;
5 4
import org.eclipse.swt.SWT;
6 5
import org.eclipse.swt.events.SelectionAdapter;
7 6
import org.eclipse.swt.events.SelectionEvent;
......
10 9
import org.eclipse.swt.widgets.Composite;
11 10
import org.eclipse.swt.widgets.Control;
12 11
import org.eclipse.swt.widgets.Label;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
15 12

  
16 13
import eu.etaxonomy.taxeditor.l10n.Messages;
14
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
17 15

  
18
public class OrderPreferences extends PreferencePage implements IWorkbenchPreferencePage {
16
public class OrderPreferences extends CdmPreferencePage {
19 17

  
20 18

  
21 19
	    boolean isNaturalOrderActivated;
......
24 22
	    boolean isRestoreTaxonNavigator;
25 23
	    boolean isSelectionChanged = false;
26 24
	    boolean isStrictlyAlphabeticallyOrdered;
27
	    /*
28
	     * (non-Javadoc)
29
	     *
30
	     * @see
31
	     * org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors
32
	     * ()
33
	     */
25

  
34 26
	    @Override
35 27
	    protected Control createContents(Composite parent) {
36 28

  
......
152 144
	    }
153 145

  
154 146

  
155
		@Override
156
		public void init(IWorkbench workbench) {
157
			// TODO Auto-generated method stub
158

  
159
		}
160

  
161
		/* (non-Javadoc)
162
		 * @see org.eclipse.jface.preference.PreferencePage#performOk()
163
		 */
164 147
		@Override
165 148
		public boolean performOk() {
166 149
	       if(isSelectionChanged){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/SpecimenOrObservationPreferences.java
9 9
package eu.etaxonomy.taxeditor.preference;
10 10

  
11 11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13 12
import org.eclipse.swt.SWT;
14 13
import org.eclipse.swt.layout.GridData;
15 14
import org.eclipse.swt.widgets.Label;
16
import org.eclipse.ui.IWorkbench;
17
import org.eclipse.ui.IWorkbenchPreferencePage;
18 15

  
19 16
import eu.etaxonomy.cdm.api.application.ICdmRepository;
20 17
import eu.etaxonomy.cdm.api.service.IPreferenceService;
......
22 19
import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
23 20
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
24 21
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
22
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
25 23
import eu.etaxonomy.taxeditor.store.CdmStore;
26 24

  
27 25
/**
......
29 27
 * @date 13.02.2014
30 28
 *
31 29
 */
32
public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
30
public class SpecimenOrObservationPreferences extends FieldEditorPreferencePageE4 {
33 31

  
34 32
    public SpecimenOrObservationPreferences(){
35 33
        super();
......
43 41

  
44 42

  
45 43
    @Override
46
    public void init(IWorkbench workbench) {
44
    public void init() {
45
        super.init();
47 46
//        setPreferenceStore(PreferencesUtil.getPreferenceStore());
48 47
        ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
49 48
        if (controller != null){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java
10 10
package eu.etaxonomy.taxeditor.preference;
11 11

  
12 12
import org.eclipse.jface.preference.BooleanFieldEditor;
13
import org.eclipse.jface.preference.FieldEditorPreferencePage;
14 13
import org.eclipse.jface.preference.StringFieldEditor;
15 14
import org.eclipse.swt.SWT;
16 15
import org.eclipse.swt.layout.GridData;
17 16
import org.eclipse.swt.layout.RowLayout;
18 17
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.ui.IWorkbench;
20
import org.eclipse.ui.IWorkbenchPreferencePage;
18

  
19
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
21 20

  
22 21
/**
23 22
 * <p>
......
29 28
 * @version 1.0
30 29
 */
31 30
public class TaxonomicEditorGeneralPreferences extends
32
		FieldEditorPreferencePage implements IWorkbenchPreferencePage {
31
		FieldEditorPreferencePageE4 {
33 32

  
34
	/*
35
	 * (non-Javadoc)
36
	 *
37
	 * @see
38
	 * org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors
39
	 * ()
40
	 */
41 33
	@Override
42 34
	protected void createFieldEditors() {
43 35
		addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_DEBUG_INFORMATION,
......
105 97

  
106 98
	}
107 99

  
108
	/*
109
	 * (non-Javadoc)
110
	 *
111
	 * @see
112
	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
113
	 */
114
	@Override
115
	public void init(IWorkbench workbench) {
116
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
117
	}
118

  
119 100
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicPreferences.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference;
11 11

  
12
import org.eclipse.jface.preference.PreferencePage;
13 12
import org.eclipse.swt.SWT;
14 13
import org.eclipse.swt.layout.GridLayout;
15 14
import org.eclipse.swt.widgets.Composite;
16 15
import org.eclipse.swt.widgets.Control;
17
import org.eclipse.ui.IWorkbench;
18
import org.eclipse.ui.IWorkbenchPreferencePage;
16

  
17
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
19 18

  
20 19
/**
21 20
 * <p>TaxonomicPreferences class.</p>
......
24 23
 * @created 20.05.2008
25 24
 * @version 1.0
26 25
 */
27
public class TaxonomicPreferences extends PreferencePage implements
28
		IWorkbenchPreferencePage {
26
public class TaxonomicPreferences extends CdmPreferencePage {
29 27

  
30 28
	/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.taxonomic.prefer"{trunked}</code> */
31 29
	public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.taxonomic.preferences";
32
	
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
35
	 */
30

  
36 31
	/** {@inheritDoc} */
37 32
	@Override
38 33
	protected Control createContents(Composite parent) {
39
		
34

  
40 35
		Composite container = new Composite(parent, SWT.NULL);
41 36
		container.setLayout(new GridLayout());
42 37

  
......
44 39
		return container;
45 40
	}
46 41

  
47
	/* (non-Javadoc)
48
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
49
	 */
50
	/** {@inheritDoc} */
51
	public void init(IWorkbench workbench) {
52

  
53
	}
54 42
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TemplatePreferencePage.java
1
/**
2
* Copyright (C) 2014 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.preference;
10

  
11
import org.eclipse.jface.preference.FieldEditorPreferencePage;
12
import org.eclipse.ui.IWorkbench;
13
import org.eclipse.ui.IWorkbenchPreferencePage;
14

  
15
/**
16
 * @author a.oppermann
17
 * @date 13.08.2014
18
 *
19
 */
20
public class TemplatePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
21

  
22
    @Override
23
    public void init(IWorkbench workbench) {
24
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
25
    }
26

  
27
    /* (non-Javadoc)
28
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
29
     */
30
    @Override
31
    protected void createFieldEditors() {
32
      //  addField(new BooleanFieldEditor(IPreferenceKeys.IS_RL, "Rote Liste 2020",  getFieldEditorParent()));
33
    }
34

  
35
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java
1 1
/**
2 2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy 
3
 * European Distributed Institute of Taxonomy
4 4
 * http://www.e-taxonomy.eu
5
 * 
5
 *
6 6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
 * See LICENSE.TXT at the top of this package for the full license terms.
8 8
 */
9 9
package eu.etaxonomy.taxeditor.preference;
10 10

  
11 11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
12

  
13
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
15 14

  
16 15
/**
17 16
 * @author n.hoffmann
......
19 18
 * @created Oct 12, 2011
20 19
 * @version 1.0
21 20
 */
22
public class TypeDesignationPreferences extends FieldEditorPreferencePage
23
		implements IWorkbenchPreferencePage {
24

  
25
	/* (non-Javadoc)
26
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
27
	 */
28
	@Override
29
	public void init(IWorkbench workbench) {
30
		setPreferenceStore(PreferencesUtil.getPreferenceStore());
31
	}
21
public class TypeDesignationPreferences extends FieldEditorPreferencePageE4 {
32 22

  
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
35
	 */
36 23
	@Override
37 24
	protected void createFieldEditors() {
38 25
		addField(new BooleanFieldEditor(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java
17 17
import java.util.Map;
18 18

  
19 19
import org.eclipse.jface.preference.ComboFieldEditor;
20
import org.eclipse.jface.preference.FieldEditorPreferencePage;
21 20
import org.eclipse.swt.widgets.Combo;
22
import org.eclipse.ui.IWorkbench;
23
import org.eclipse.ui.IWorkbenchPreferencePage;
24 21

  
25 22
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
26 23
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
27 24
import eu.etaxonomy.cdm.strategy.match.MatchException;
28 25
import eu.etaxonomy.cdm.strategy.match.MatchMode;
29 26
import eu.etaxonomy.taxeditor.model.MessagingUtils;
30
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
27
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
31 28
import eu.etaxonomy.taxeditor.store.CdmStore;
32 29

  
33 30
/**
......
35 32
 * @created Jan 22, 2010
36 33
 * @version 1.0
37 34
 */
38
public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity> extends FieldEditorPreferencePage implements
39
		IWorkbenchPreferencePage {
35
public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity> extends FieldEditorPreferencePageE4 {
40 36

  
41 37
	/**
42 38
	 * Fields that will be excluded from the display
......
52 48

  
53 49
	protected Map<String, Combo> matchModeCombos = new HashMap<String, Combo>();
54 50

  
55
    @Override
56
    public void init(IWorkbench workbench) {
57
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
58
    }
59

  
60 51
	/**
61 52
	 * {@inheritDoc}
62 53
	 */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference.matching;
11 11

  
12
import org.eclipse.ui.IWorkbench;
13

  
14 12
import eu.etaxonomy.cdm.model.name.TaxonName;
15 13
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
16 14
import eu.etaxonomy.cdm.strategy.match.MatchException;
......
27 25

  
28 26
	/** {@inheritDoc} */
29 27
	@Override
30
    public void init(IWorkbench workbench) {
31
	    super.init(workbench);
28
    public void init() {
29
	    super.init();
32 30
		clazz = TaxonName.class;
33 31

  
34 32
		try {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference.matching;
11 11

  
12
import org.eclipse.ui.IWorkbench;
13

  
14 12
import eu.etaxonomy.cdm.model.reference.Reference;
15 13
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
16 14
import eu.etaxonomy.cdm.strategy.match.MatchException;
......
26 24

  
27 25
	/** {@inheritDoc} */
28 26
	@Override
29
    public void init(IWorkbench workbench) {
30
	    super.init(workbench);
27
    public void init() {
28
	    super.init();
31 29
		clazz = Reference.class;
32 30

  
33 31
		try {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/TeamOrPersonMatchingPreference.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.preference.matching;
11 11

  
12
import org.eclipse.ui.IWorkbench;
13

  
14 12
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
15 13
import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
16 14
import eu.etaxonomy.cdm.strategy.match.MatchException;
......
27 25

  
28 26
	/** {@inheritDoc} */
29 27
	@Override
30
    public void init(IWorkbench workbench) {
31
	    super.init(workbench);
28
    public void init() {
29
	    super.init();
32 30
		clazz = TeamOrPersonBase.class;
33 31

  
34 32
		try {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
29 29
import org.eclipse.swt.widgets.Button;
30 30
import org.eclipse.swt.widgets.Composite;
31 31
import org.eclipse.swt.widgets.Control;
32
import org.eclipse.ui.IWorkbench;
33
import org.eclipse.ui.IWorkbenchPreferencePage;
34 32
import org.eclipse.ui.commands.ICommandService;
35 33
import org.eclipse.ui.handlers.IHandlerService;
36 34

  
......
51 49
 * @created 12.06.2009
52 50
 * @version 1.0
53 51
 */
54
public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends CdmPreferencePage implements
55
		IWorkbenchPreferencePage, IConversationEnabled{
52
public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends CdmPreferencePage implements IConversationEnabled{
56 53

  
57 54
	private Button toggleButton;
58 55
	protected HashMap<DefinedTermBase<T>, Button> menuButtons;
......
84 81
		super(title);
85 82
		vocabularyIsEditable = editable;
86 83
		setDescription(description);
84
		init();
87 85
	}
88 86

  
89 87
	protected List<T> getTerms(){
......
220 218

  
221 219
	/** {@inheritDoc} */
222 220
	@Override
223
    public void init(IWorkbench workbench) {
221
    public void init() {
224 222
	    setPreferenceStore(PreferencesUtil.getPreferenceStore());
225 223
	    if(!CdmStore.isActive()) {
226 224
	        MessagingUtils.noDataSourceWarningDialog(null);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java
16 16
import org.eclipse.jface.resource.ImageDescriptor;
17 17

  
18 18
import eu.etaxonomy.cdm.model.common.CdmBase;
19
import eu.etaxonomy.taxeditor.preference.IE4PreferencePage;
20
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
19 21
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
20 22
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
21 23
import eu.etaxonomy.taxeditor.store.CdmStore;
......
25 27
 * @date 30 Jul 2015
26 28
 *
27 29
 */
28
public abstract class CdmPreferencePage extends PreferencePage implements ICdmEntitySessionEnabled {
30
public abstract class CdmPreferencePage extends PreferencePage implements ICdmEntitySessionEnabled, IE4PreferencePage {
29 31

  
30 32
    private ICdmEntitySession previousCdmEntitySession;
31 33
    private boolean isApply;
32 34

  
33 35
    public CdmPreferencePage() {
34
        initSession();
36
        this(null, null);
35 37
    }
36 38

  
37 39
    public CdmPreferencePage(String title) {
38
        super(title);
39
        initSession();
40
        this(title, null);
40 41
    }
41 42

  
42 43
    public CdmPreferencePage(String title, ImageDescriptor image) {
43 44
        super(title, image);
44 45
        initSession();
46
        init();
47
    }
48

  
49
    public void init() {
50
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
45 51
    }
46 52

  
47 53
    private void initSession() {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/FieldEditorPreferencePageE4.java
1
// $Id$
2
/**
3
* Copyright (C) 2018 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.preference.menu;
11

  
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13

  
14
import eu.etaxonomy.taxeditor.preference.IE4PreferencePage;
15
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
16

  
17
/**
18
 * @author pplitzner
19
 * @date 14.02.2018
20
 *
21
 */
22
public abstract class FieldEditorPreferencePageE4 extends FieldEditorPreferencePage implements IE4PreferencePage{
23

  
24
    public FieldEditorPreferencePageE4() {
25
        init();
26
    }
27

  
28
    protected void init(){
29
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
30
    }
31
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java
12 12

  
13 13
import org.eclipse.jface.preference.BooleanFieldEditor;
14 14
import org.eclipse.jface.preference.ComboFieldEditor;
15
import org.eclipse.jface.preference.FieldEditorPreferencePage;
16
import org.eclipse.ui.IWorkbench;
17
import org.eclipse.ui.IWorkbenchPreferencePage;
18 15

  
19 16
import eu.etaxonomy.cdm.api.application.ICdmRepository;
20 17
import eu.etaxonomy.cdm.api.service.IPreferenceService;
......
27 24
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
28 25
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
29 26
import eu.etaxonomy.taxeditor.store.CdmStore;
30
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
31 27

  
32 28
/**
33 29
 * <p>
......
37 33
 * @author p.ciardelli
38 34
 * @created 16.09.2008
39 35
 */
40
public class NomenclaturalCodePreferences extends FieldEditorPreferencePage
41
		implements IWorkbenchPreferencePage {
36
public class NomenclaturalCodePreferences extends FieldEditorPreferencePageE4 {
42 37

  
43 38
	@Override
44 39
	protected void createFieldEditors() {
......
80 75
	 *
81 76
	 * Initialize the preference page
82 77
	 */
83
	@Override
84
    public void init(IWorkbench workbench) {
85

  
86
	        setPreferenceStore(TaxeditorStorePlugin.getDefault()
87
				.getPreferenceStore());
88

  
78
    @Override
79
    public void init() {
80
        super.init();
89 81
	      ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
90 82
          if (controller != null){
91 83
              IPreferenceService service = controller.getPreferenceService();
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PresenceAbsenceMenuPreferences.java
9 9

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff