Project

General

Profile

« Previous | Next » 

Revision c8d6f9c4

Added by Andreas Müller over 3 years ago

cleanup

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java
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

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

  
12

  
13 11
import java.lang.reflect.Field;
14 12
import java.util.ArrayList;
15 13
import java.util.Arrays;
......
32 30
/**
33 31
 * @author n.hoffmann
34 32
 * @created Jan 22, 2010
35
 * @version 1.0
36 33
 */
37
public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity> extends CdmPreferencePage {
34
public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity> 
35
		extends CdmPreferencePage {
38 36

  
39 37
	/**
40 38
	 * Fields that will be excluded from the display
......
48 46

  
49 47
	private List<MatchMode> matchModeList;
50 48

  
51
	protected Map<String, ComboFieldEditor> matchModeCombos = new HashMap();
49
	protected Map<String, ComboFieldEditor> matchModeCombos = new HashMap<>();
52 50

  
53 51
	 @Override
54 52
	 protected Control createContents(Composite parent) {
......
60 58

  
61 59
           top.setLayoutData(layoutData);
62 60

  
63

  
64 61
//	       final GridLayout gridLayout = new GridLayout();
65 62
//	       gridLayout.numColumns = 2;
66 63
//
......
84 81
           }
85 82

  
86 83
	       return top;
87

  
88 84
	    }
89 85

  
90 86
	    @Override
......
97 93

  
98 94
	    @Override
99 95
	    public boolean performOk() {
100
	       if (matchModeCombos.size() >0){
96
	       if (matchModeCombos.size() > 0){
101 97
	           for (ComboFieldEditor editor: matchModeCombos.values()){
102 98
	               editor.store();
103 99
	           }
104 100
	       }
105 101
	       return super.performOk();
106

  
107 102
	    }
103
	    
108 104
	    @Override
109 105
	    protected void performDefaults() {
110
	        if (matchModeCombos.size() >0){
106
	        if (matchModeCombos.size() > 0){
111 107
	               for (ComboFieldEditor editor: matchModeCombos.values()){
112 108
	                   editor.loadDefault();
113 109
	               }
......
115 111
	        super.performDefaults();
116 112
	    }
117 113

  
118

  
119

  
120

  
121
//	/**
122
//	 * {@inheritDoc}
123
//	 */
124 114
//	@Override
125 115
//	protected void createFieldEditors() {
126 116
//	    if(CdmStore.isActive()) {
......
151 141

  
152 142
	/**
153 143
	 * Get names of all declared fields
154
	 *
155
	 * @return
156 144
	 */
157 145
	private List<String> getFieldNames(){
158
		List<Field> fields = new ArrayList<Field>();
146
		List<Field> fields = new ArrayList<>();
159 147

  
160 148
		fields = getAllFields(fields, clazz);
161 149
		List<String> fieldNames = new ArrayList<String>();

Also available in: Unified diff