X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fpreferences%2FCSVPreferences.java;h=d45fff3f13e864a8b271092c056454905fc36a2a;hb=06ee0c4c71cd9e372969da1570e7fcac2c4397a5;hp=cecbb7b672e6a42dc9a779dc6c6893ae76fe6d0d;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java index cecbb7b67..d45fff3f1 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java @@ -1,48 +1,48 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.modeling.preferences; - -import org.simantics.history.csv.ExportInterpolation; - -/** - * TODO: duplicate of org.simantics.simulation.export. Reorganize to remove duplication. - */ -public class CSVPreferences { - - public static final String P_NODE = "org.simantics.modeling"; - - // Comma separated value - public static final String P_CSV_DECIMAL_SEPARATOR = "csv.decimal.separator"; //$NON-NLS-1$ - public static final String P_CSV_FILE_EXTENSION = "csv.file.extension"; //$NON-NLS-1$ - public static final String P_CSV_COLUMN_SEPARATOR = "csv.value.separator"; //$NON-NLS-1$ - public static final String P_CSV_START_TIME = "csv.start"; //$NON-NLS-1$ - public static final String P_CSV_TIME_STEP = "csv.step"; //$NON-NLS-1$ - - public static final String P_CSV_RESAMPLE = "csv.resample"; //$NON-NLS-1$ - public static final String P_CSV_SAMPLING_MODE = "csv.sampling.mode"; //$NON-NLS-1$ - - public static final String P_CSV_TIME_DIGITS = "csv.format.time.digits"; //$NON-NLS-1$ - public static final String P_CSV_FLOAT_DIGITS = "csv.format.float.digits"; //$NON-NLS-1$ - public static final String P_CSV_DOUBLE_DIGITS = "csv.format.double.digits"; //$NON-NLS-1$ - - public static final Double DEFAULT_CSV_START_TIME = 0.0; // seconds - public static final Double DEFAULT_CSV_TIME_STEP = 1.0; // seconds - public static final String DEFAULT_FILE_EXTENSION = ".txt"; - - public static final Boolean DEFAULT_CSV_RESAMPLE = true; - public static final String DEFAULT_CSV_SAMPLING_MODE = ExportInterpolation.getDefault().toPreference(); - - public static final int DEFAULT_CSV_TIME_DIGITS = 9; // From MathContext#DEFAULT_DIGITS - public static final int DEFAULT_CSV_FLOAT_DIGITS = 7; - public static final int DEFAULT_CSV_DOUBLE_DIGITS = 15; - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.modeling.preferences; + +import org.simantics.history.csv.ExportInterpolation; + +/** + * TODO: duplicate of org.simantics.simulation.export. Reorganize to remove duplication. + */ +public class CSVPreferences { + + public static final String P_NODE = "org.simantics.modeling"; + + // Comma separated value + public static final String P_CSV_DECIMAL_SEPARATOR = "csv.decimal.separator"; //$NON-NLS-1$ + public static final String P_CSV_FILE_EXTENSION = "csv.file.extension"; //$NON-NLS-1$ + public static final String P_CSV_COLUMN_SEPARATOR = "csv.value.separator"; //$NON-NLS-1$ + public static final String P_CSV_START_TIME = "csv.start"; //$NON-NLS-1$ + public static final String P_CSV_TIME_STEP = "csv.step"; //$NON-NLS-1$ + + public static final String P_CSV_RESAMPLE = "csv.resample"; //$NON-NLS-1$ + public static final String P_CSV_SAMPLING_MODE = "csv.sampling.mode"; //$NON-NLS-1$ + + public static final String P_CSV_TIME_DIGITS = "csv.format.time.digits"; //$NON-NLS-1$ + public static final String P_CSV_FLOAT_DIGITS = "csv.format.float.digits"; //$NON-NLS-1$ + public static final String P_CSV_DOUBLE_DIGITS = "csv.format.double.digits"; //$NON-NLS-1$ + + public static final Double DEFAULT_CSV_START_TIME = 0.0; // seconds + public static final Double DEFAULT_CSV_TIME_STEP = 1.0; // seconds + public static final String DEFAULT_FILE_EXTENSION = ".txt"; + + public static final Boolean DEFAULT_CSV_RESAMPLE = true; + public static final String DEFAULT_CSV_SAMPLING_MODE = ExportInterpolation.getDefault().toPreference(); + + public static final int DEFAULT_CSV_TIME_DIGITS = 9; // From MathContext#DEFAULT_DIGITS + public static final int DEFAULT_CSV_FLOAT_DIGITS = 7; + public static final int DEFAULT_CSV_DOUBLE_DIGITS = 15; + +}