]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/modifiers/VariablePropertyModifierRule.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.model / src / org / simantics / browsing / ui / model / modifiers / VariablePropertyModifierRule.java
index 8867d20b07a40c8f87aad8378c69ae91153fed8b..bcd6d3bf39c0b9fda6c59b2da962ab140bda4d6f 100644 (file)
@@ -1,48 +1,48 @@
-/*******************************************************************************\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.browsing.ui.model.modifiers;\r
-\r
-import org.simantics.browsing.ui.common.ColumnKeys;\r
-import org.simantics.browsing.ui.content.Labeler.Modifier;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.variable.Variable;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class VariablePropertyModifierRule implements ModifierRule {\r
-\r
-       String propertyName;\r
-\r
-    public VariablePropertyModifierRule(ReadGraph graph, String propertyName) throws DatabaseException {\r
-        this.propertyName = propertyName;\r
-    }\r
-\r
-    @Override\r
-    public boolean isCompatible(Class<?> contentType) {\r
-        return contentType.equals(Variable.class);\r
-    }\r
-\r
-    @Override\r
-    public Modifier getModifier(ReadGraph graph, Object content,\r
-            String columnKey) throws DatabaseException {\r
-        if(!ColumnKeys.SINGLE.equals(columnKey))\r
-            return null;\r
-        if(!(content instanceof Variable))\r
-            return null;\r
-        Variable variable = (Variable)content;\r
-        Variable propertyVariable = variable.getProperty(graph, propertyName);\r
-        return new VariableModifier2(graph, propertyVariable);\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.browsing.ui.model.modifiers;
+
+import org.simantics.browsing.ui.common.ColumnKeys;
+import org.simantics.browsing.ui.content.Labeler.Modifier;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.Variable;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class VariablePropertyModifierRule implements ModifierRule {
+
+       String propertyName;
+
+    public VariablePropertyModifierRule(ReadGraph graph, String propertyName) throws DatabaseException {
+        this.propertyName = propertyName;
+    }
+
+    @Override
+    public boolean isCompatible(Class<?> contentType) {
+        return contentType.equals(Variable.class);
+    }
+
+    @Override
+    public Modifier getModifier(ReadGraph graph, Object content,
+            String columnKey) throws DatabaseException {
+        if(!ColumnKeys.SINGLE.equals(columnKey))
+            return null;
+        if(!(content instanceof Variable))
+            return null;
+        Variable variable = (Variable)content;
+        Variable propertyVariable = variable.getProperty(graph, propertyName);
+        return new VariableModifier2(graph, propertyVariable);
+    }
+
+}