]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.event/src/org/simantics/event/view/preference/EventPrefs.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.event / src / org / simantics / event / view / preference / EventPrefs.java
index c7179df932cf73f6146d7a21f29671a86b712c99..44f60e4fb1da0e348bec8594ae98e2547eb1f9c6 100644 (file)
@@ -1,84 +1,84 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2011 Association for Decentralized Information Management\r
- * in 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.event.view.preference;\r
-\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.event.ontology.EventViewResource;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public final class EventPrefs {\r
-\r
-    public static boolean hideInfoEvents(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideInfoEvents);\r
-    }\r
-\r
-    public static boolean hideWarningEvents(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideWarningEvents);\r
-    }\r
-\r
-    public static boolean hideReturnEvents(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideReturnEvents);\r
-    }\r
-\r
-    public static boolean showHiddenEvents(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowHiddenEvents);\r
-    }\r
-\r
-    public static boolean showOnlyMilestones(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyMilestones);\r
-    }\r
-\r
-    public static boolean showOnlyActiveEvents(ReadGraph graph, Resource project) throws DatabaseException {\r
-        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyActiveEvents);\r
-    }\r
-\r
-    private static boolean testBoolean(ReadGraph graph, Resource project, Resource property) throws DatabaseException {\r
-        if (project == null)\r
-            return false;\r
-        return Boolean.TRUE.equals(graph.getPossibleRelatedValue(project, property, Bindings.BOOLEAN));\r
-    }\r
-\r
-    public static void setHideInfoEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).HideInfoEvents, show);\r
-    }\r
-\r
-    public static void setHideWarningEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).HideWarningEvents, show);\r
-    }\r
-\r
-    public static void setHideReturnEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).HideReturnEvents, show);\r
-    }\r
-\r
-    public static void setShowHiddenEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowHiddenEvents, show);\r
-    }\r
-\r
-    public static void setShowOnlyMilestones(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyMilestones, show);\r
-    }\r
-\r
-    public static void setShowOnlyActiveEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {\r
-        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyActiveEvents, show);\r
-    }\r
-\r
-    private static void setBoolean(WriteGraph graph, Resource project, Resource property, boolean value) throws DatabaseException {\r
-        graph.claimLiteral(project, property, value, Bindings.BOOLEAN);\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * 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.event.view.preference;
+
+import org.simantics.databoard.Bindings;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.event.ontology.EventViewResource;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public final class EventPrefs {
+
+    public static boolean hideInfoEvents(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideInfoEvents);
+    }
+
+    public static boolean hideWarningEvents(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideWarningEvents);
+    }
+
+    public static boolean hideReturnEvents(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).HideReturnEvents);
+    }
+
+    public static boolean showHiddenEvents(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowHiddenEvents);
+    }
+
+    public static boolean showOnlyMilestones(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyMilestones);
+    }
+
+    public static boolean showOnlyActiveEvents(ReadGraph graph, Resource project) throws DatabaseException {
+        return testBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyActiveEvents);
+    }
+
+    private static boolean testBoolean(ReadGraph graph, Resource project, Resource property) throws DatabaseException {
+        if (project == null)
+            return false;
+        return Boolean.TRUE.equals(graph.getPossibleRelatedValue(project, property, Bindings.BOOLEAN));
+    }
+
+    public static void setHideInfoEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).HideInfoEvents, show);
+    }
+
+    public static void setHideWarningEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).HideWarningEvents, show);
+    }
+
+    public static void setHideReturnEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).HideReturnEvents, show);
+    }
+
+    public static void setShowHiddenEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowHiddenEvents, show);
+    }
+
+    public static void setShowOnlyMilestones(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyMilestones, show);
+    }
+
+    public static void setShowOnlyActiveEvents(WriteGraph graph, Resource project, boolean show) throws DatabaseException {
+        setBoolean(graph, project, EventViewResource.getInstance(graph).ShowOnlyActiveEvents, show);
+    }
+
+    private static void setBoolean(WriteGraph graph, Resource project, Resource property, boolean value) throws DatabaseException {
+        graph.claimLiteral(project, property, value, Bindings.BOOLEAN);
+    }
+
+}