]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.charts/src/org/simantics/charts/editor/ChartKeys.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / editor / ChartKeys.java
index ed5926c42a5bdb809040c2c3107651ea8410d991..7c70888e651e2bb4d8e91ca91ae8f9ba3e5b7d01 100644 (file)
@@ -1,72 +1,72 @@
-/*******************************************************************************\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.charts.editor;\r
-\r
-import org.simantics.databoard.util.ObjectUtils;\r
-import org.simantics.db.Resource;\r
-import org.simantics.utils.datastructures.hints.HintContext;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class ChartKeys {\r
-\r
-    /**\r
-     * //@deprecated use {@link #chartSourceKey(Resource)} with model resource as argument instead\r
-     */\r
-    //@Deprecated\r
-    //public static final Key KEY_ACTIVE_CHART_SOURCE = new HintContext.KeyOf(ChartData.class, "CHART_DATA");\r
-\r
-    public static ChartSourceKey chartSourceKey(Resource model) {\r
-        return new ChartSourceKey(model);\r
-    }\r
-\r
-    /**\r
-     * For having multiple different chart data sources. The sources are\r
-     * identified by resources.\r
-     */\r
-    public static class ChartSourceKey extends HintContext.KeyOf {\r
-\r
-        private final Resource source;\r
-\r
-        public ChartSourceKey(Resource source) {\r
-            super(ChartData.class, "CHART_DATA(" + source.getResourceId() + ")");\r
-            this.source = source;\r
-        }\r
-\r
-        public Resource getResource() {\r
-            return source;\r
-        }\r
-\r
-        @Override\r
-        public int hashCode() {\r
-            return source != null ? source.hashCode() : 0;\r
-        }\r
-\r
-        @Override\r
-        public boolean equals(Object obj) {\r
-            if (this == obj)\r
-                return true;\r
-            if (!(obj instanceof ChartSourceKey))\r
-                return false;\r
-            ChartSourceKey other = (ChartSourceKey) obj;\r
-            return ObjectUtils.objectEquals(source, other.source);\r
-        }\r
-\r
-        @Override\r
-        public String toString() {\r
-            return getClass().getSimpleName() + "[" + source + "]";\r
-        }\r
-\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.charts.editor;
+
+import org.simantics.databoard.util.ObjectUtils;
+import org.simantics.db.Resource;
+import org.simantics.utils.datastructures.hints.HintContext;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class ChartKeys {
+
+    /**
+     * //@deprecated use {@link #chartSourceKey(Resource)} with model resource as argument instead
+     */
+    //@Deprecated
+    //public static final Key KEY_ACTIVE_CHART_SOURCE = new HintContext.KeyOf(ChartData.class, "CHART_DATA");
+
+    public static ChartSourceKey chartSourceKey(Resource model) {
+        return new ChartSourceKey(model);
+    }
+
+    /**
+     * For having multiple different chart data sources. The sources are
+     * identified by resources.
+     */
+    public static class ChartSourceKey extends HintContext.KeyOf {
+
+        private final Resource source;
+
+        public ChartSourceKey(Resource source) {
+            super(ChartData.class, "CHART_DATA(" + source.getResourceId() + ")");
+            this.source = source;
+        }
+
+        public Resource getResource() {
+            return source;
+        }
+
+        @Override
+        public int hashCode() {
+            return source != null ? source.hashCode() : 0;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (!(obj instanceof ChartSourceKey))
+                return false;
+            ChartSourceKey other = (ChartSourceKey) obj;
+            return ObjectUtils.objectEquals(source, other.source);
+        }
+
+        @Override
+        public String toString() {
+            return getClass().getSimpleName() + "[" + source + "]";
+        }
+
+    }
+
+}