Revision c61ea4bc
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix; |
10 | 10 |
|
11 |
import java.io.File; |
|
12 | 11 |
import java.io.FileOutputStream; |
13 | 12 |
import java.io.IOException; |
14 | 13 |
import java.util.Arrays; |
... | ... | |
56 | 55 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
57 | 56 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
58 | 57 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
59 |
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility; |
|
60 | 58 |
import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart; |
61 | 59 |
|
62 | 60 |
/** |
... | ... | |
92 | 90 |
"maxRank", //$NON-NLS-1$ |
93 | 91 |
}); |
94 | 92 |
|
95 |
private static final String CHARACTER_MATRIX_STATE_PROPERTIES = "characterMatrixState.properties"; //$NON-NLS-1$ |
|
96 |
|
|
97 | 93 |
private DescriptiveDataSet descriptiveDataSet; |
98 | 94 |
|
99 | 95 |
private Collection<UpdateResult> updateResults; |
... | ... | |
161 | 157 |
return descriptiveDataSet; |
162 | 158 |
} |
163 | 159 |
|
164 |
private File getStatePropertiesFile() { |
|
165 |
return new File(WorkbenchUtility.getBaseLocation(), CHARACTER_MATRIX_STATE_PROPERTIES); |
|
166 |
} |
|
167 |
|
|
168 | 160 |
public NatTable getNatTable() { |
169 | 161 |
return matrix.getNatTable(); |
170 | 162 |
} |
... | ... | |
226 | 218 |
dirty.setDirty(false); |
227 | 219 |
if(matrix.getNatTableState()!=null){ |
228 | 220 |
try (FileOutputStream tableStateStream = |
229 |
new FileOutputStream(getStatePropertiesFile())) { |
|
221 |
new FileOutputStream(matrix.getStatePropertiesFile())) {
|
|
230 | 222 |
matrix.getNatTableState().store(tableStateStream, null); |
231 | 223 |
} catch (IOException ioe) { |
232 | 224 |
ioe.printStackTrace(); |
Also available in: Unified diff
Remove duplicate methods