]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferenceInitializer.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / preferences / CSVPreferenceInitializer.java
index a94bb3ace741c98334e749cce598c982406f3c2d..a2daff328647ae43b3790ea7671ea7df48028dac 100644 (file)
@@ -1,55 +1,55 @@
-/*******************************************************************************\r
- * Copyright (c) 2011 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.modeling.preferences;\r
-\r
-import java.text.DecimalFormatSymbols;\r
-import java.util.Locale;\r
-\r
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;\r
-import org.eclipse.core.runtime.preferences.DefaultScope;\r
-import org.eclipse.core.runtime.preferences.IScopeContext;\r
-import org.osgi.service.prefs.Preferences;\r
-\r
-/**\r
- * @author Toni Kalajainen\r
- */\r
-public class CSVPreferenceInitializer extends AbstractPreferenceInitializer {\r
-\r
-    public void initializeDefaultPreferences() {\r
-        IScopeContext context = DefaultScope.INSTANCE;\r
-        Preferences node = context.getNode(CSVPreferences.P_NODE);\r
-        \r
-        // 1. figure decimal separator\r
-        Locale locale = Locale.getDefault();\r
-        DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance( locale );\r
-        String decimalSeparator = symbols.getDecimalSeparator()+""; \r
-        node.put( CSVPreferences.P_CSV_DECIMAL_SEPARATOR, decimalSeparator );\r
-        \r
-        // 2. Then figure out value separator\r
-        String valueSeparator = decimalSeparator.equals(",")?"\\t":",";\r
-        node.put( CSVPreferences.P_CSV_COLUMN_SEPARATOR, valueSeparator );\r
-        \r
-        node.put( CSVPreferences.P_CSV_FILE_EXTENSION, CSVPreferences.DEFAULT_FILE_EXTENSION );\r
-        \r
-        node.putDouble(CSVPreferences.P_CSV_START_TIME, CSVPreferences.DEFAULT_CSV_START_TIME);\r
-        node.putDouble(CSVPreferences.P_CSV_TIME_STEP, CSVPreferences.DEFAULT_CSV_TIME_STEP);\r
-\r
-        node.putBoolean(CSVPreferences.P_CSV_RESAMPLE, CSVPreferences.DEFAULT_CSV_RESAMPLE);\r
-        \r
-        node.put(CSVPreferences.P_CSV_SAMPLING_MODE, CSVPreferences.DEFAULT_CSV_SAMPLING_MODE);\r
-\r
-        node.putInt(CSVPreferences.P_CSV_TIME_DIGITS, CSVPreferences.DEFAULT_CSV_TIME_DIGITS);\r
-        node.putInt(CSVPreferences.P_CSV_FLOAT_DIGITS, CSVPreferences.DEFAULT_CSV_FLOAT_DIGITS);\r
-        node.putInt(CSVPreferences.P_CSV_DOUBLE_DIGITS, CSVPreferences.DEFAULT_CSV_DOUBLE_DIGITS);\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 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 java.text.DecimalFormatSymbols;
+import java.util.Locale;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.osgi.service.prefs.Preferences;
+
+/**
+ * @author Toni Kalajainen
+ */
+public class CSVPreferenceInitializer extends AbstractPreferenceInitializer {
+
+    public void initializeDefaultPreferences() {
+        IScopeContext context = DefaultScope.INSTANCE;
+        Preferences node = context.getNode(CSVPreferences.P_NODE);
+        
+        // 1. figure decimal separator
+        Locale locale = Locale.getDefault();
+        DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance( locale );
+        String decimalSeparator = symbols.getDecimalSeparator()+""; 
+        node.put( CSVPreferences.P_CSV_DECIMAL_SEPARATOR, decimalSeparator );
+        
+        // 2. Then figure out value separator
+        String valueSeparator = decimalSeparator.equals(",")?"\\t":",";
+        node.put( CSVPreferences.P_CSV_COLUMN_SEPARATOR, valueSeparator );
+        
+        node.put( CSVPreferences.P_CSV_FILE_EXTENSION, CSVPreferences.DEFAULT_FILE_EXTENSION );
+        
+        node.putDouble(CSVPreferences.P_CSV_START_TIME, CSVPreferences.DEFAULT_CSV_START_TIME);
+        node.putDouble(CSVPreferences.P_CSV_TIME_STEP, CSVPreferences.DEFAULT_CSV_TIME_STEP);
+
+        node.putBoolean(CSVPreferences.P_CSV_RESAMPLE, CSVPreferences.DEFAULT_CSV_RESAMPLE);
+        
+        node.put(CSVPreferences.P_CSV_SAMPLING_MODE, CSVPreferences.DEFAULT_CSV_SAMPLING_MODE);
+
+        node.putInt(CSVPreferences.P_CSV_TIME_DIGITS, CSVPreferences.DEFAULT_CSV_TIME_DIGITS);
+        node.putInt(CSVPreferences.P_CSV_FLOAT_DIGITS, CSVPreferences.DEFAULT_CSV_FLOAT_DIGITS);
+        node.putInt(CSVPreferences.P_CSV_DOUBLE_DIGITS, CSVPreferences.DEFAULT_CSV_DOUBLE_DIGITS);
+    }
+
+}