Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / editor / TrackExperimentTimeAction.java
index 482ac3acf41180fed530cc9dc9621d3e79b50137..3faade476fa593330d4d9779079a0709dc010297 100644 (file)
@@ -1,46 +1,46 @@
-package org.simantics.charts.editor;\r
-\r
-import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.core.runtime.Status;\r
-import org.eclipse.jface.action.Action;\r
-import org.simantics.Simantics;\r
-import org.simantics.charts.Activator;\r
-import org.simantics.charts.ontology.ChartResource;\r
-import org.simantics.charts.query.SetProperty;\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class TrackExperimentTimeAction extends Action {\r
-\r
-    private Resource chart;\r
-    private Boolean currentValue;\r
-\r
-    public TrackExperimentTimeAction(String name, Resource chart, boolean currentValue) {\r
-        super(name, Action.AS_CHECK_BOX);\r
-        this.chart = chart;\r
-        this.currentValue = currentValue;\r
-        setChecked(currentValue);\r
-    }\r
-\r
-    @Override\r
-    public void run() {\r
-        setTracking(chart, !currentValue);\r
-    }\r
-\r
-    public static void setTracking(Resource chart, boolean newValue) {\r
-        try {\r
-            Session session = Simantics.getSession();\r
-            ChartResource CHART = ChartResource.getInstance(session);\r
-            session.markUndoPoint();\r
-            session.syncRequest(new SetProperty(chart, CHART.Chart_trackExperimentTime, newValue, Bindings.BOOLEAN));\r
-        } catch (DatabaseException e) {\r
-            Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to set track experiment time.", e));\r
-        }\r
-    }\r
-\r
+package org.simantics.charts.editor;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.simantics.Simantics;
+import org.simantics.charts.Activator;
+import org.simantics.charts.ontology.ChartResource;
+import org.simantics.charts.query.SetProperty;
+import org.simantics.databoard.Bindings;
+import org.simantics.db.Resource;
+import org.simantics.db.Session;
+import org.simantics.db.exception.DatabaseException;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class TrackExperimentTimeAction extends Action {
+
+    private Resource chart;
+    private Boolean currentValue;
+
+    public TrackExperimentTimeAction(String name, Resource chart, boolean currentValue) {
+        super(name, Action.AS_CHECK_BOX);
+        this.chart = chart;
+        this.currentValue = currentValue;
+        setChecked(currentValue);
+    }
+
+    @Override
+    public void run() {
+        setTracking(chart, !currentValue);
+    }
+
+    public static void setTracking(Resource chart, boolean newValue) {
+        try {
+            Session session = Simantics.getSession();
+            ChartResource CHART = ChartResource.getInstance(session);
+            session.markUndoPoint();
+            session.syncRequest(new SetProperty(chart, CHART.Chart_trackExperimentTime, newValue, Bindings.BOOLEAN));
+        } catch (DatabaseException e) {
+            Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to set track experiment time.", e));
+        }
+    }
+
 }
\ No newline at end of file