]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/FlagSynchronizer.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / synchronization / graph / FlagSynchronizer.java
index 3c835258093ba1a508478c5364a5edc0af4a5bed..0fa86c1788d62150eec2d8493970dccec80b9aec 100644 (file)
@@ -1,48 +1,48 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 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.diagram.synchronization.graph;\r
-\r
-import org.simantics.db.Resource;\r
-import org.simantics.diagram.synchronization.IModificationQueue;\r
-import org.simantics.diagram.synchronization.ISynchronizationContext;\r
-import org.simantics.g2d.elementclass.FlagClass;\r
-import org.simantics.utils.datastructures.hints.IHintObservable;\r
-import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class FlagSynchronizer extends ResourceSynchronizer {\r
-\r
-    public static final FlagSynchronizer INSTANCE = new FlagSynchronizer();\r
-\r
-    protected static final Key[] SYNCHRONIZED_HINTS = {\r
-        FlagClass.KEY_FLAG_TYPE,\r
-    };\r
-\r
-    @Override\r
-    public Key[] getSynchronizedHints() {\r
-        return SYNCHRONIZED_HINTS;\r
-    }\r
-\r
-    @Override\r
-    public boolean hintChanged(ISynchronizationContext context, IModificationQueue queue, Resource object, IHintObservable sender, Key key, Object oldValue, Object newValue) {\r
-        BasicResources br = context.get(GraphSynchronizationHints.BASIC_RESOURCES);\r
-        if (FlagClass.KEY_FLAG_TYPE.equals(key)) {\r
-            FlagClass.Type type = (FlagClass.Type) newValue;\r
-            return queue.offer(new EnumerationModification(object, br.DIA.HasFlagType, DiagramGraphUtil.toFlagTypeResource(br.DIA, type)));\r
-        }\r
-\r
-        return super.hintChanged(context, sender, key, oldValue, newValue);\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.diagram.synchronization.graph;
+
+import org.simantics.db.Resource;
+import org.simantics.diagram.synchronization.IModificationQueue;
+import org.simantics.diagram.synchronization.ISynchronizationContext;
+import org.simantics.g2d.elementclass.FlagClass;
+import org.simantics.utils.datastructures.hints.IHintObservable;
+import org.simantics.utils.datastructures.hints.IHintContext.Key;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class FlagSynchronizer extends ResourceSynchronizer {
+
+    public static final FlagSynchronizer INSTANCE = new FlagSynchronizer();
+
+    protected static final Key[] SYNCHRONIZED_HINTS = {
+        FlagClass.KEY_FLAG_TYPE,
+    };
+
+    @Override
+    public Key[] getSynchronizedHints() {
+        return SYNCHRONIZED_HINTS;
+    }
+
+    @Override
+    public boolean hintChanged(ISynchronizationContext context, IModificationQueue queue, Resource object, IHintObservable sender, Key key, Object oldValue, Object newValue) {
+        BasicResources br = context.get(GraphSynchronizationHints.BASIC_RESOURCES);
+        if (FlagClass.KEY_FLAG_TYPE.equals(key)) {
+            FlagClass.Type type = (FlagClass.Type) newValue;
+            return queue.offer(new EnumerationModification(object, br.DIA.HasFlagType, DiagramGraphUtil.toFlagTypeResource(br.DIA, type)));
+        }
+
+        return super.hintChanged(context, sender, key, oldValue, newValue);
+    }
+
+}