]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/diagram/adapter/DiagramGroup.java
Added hashcode/equals methods to generic profile Group implementations
[simantics/platform.git] / bundles / org.simantics.modeling.template2d.ui / src / org / simantics / modeling / template2d / ui / diagram / adapter / DiagramGroup.java
index 0370ff6578b4f047278555e6f091c1f950902b17..3c2756a668723d7de6fe8e3b6350ebadf936ad55 100644 (file)
@@ -1,35 +1,46 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2012 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.modeling.template2d.ui.diagram.adapter;\r
-\r
-import org.simantics.db.RequestProcessor;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.procedure.SetListener;\r
-import org.simantics.scenegraph.profile.Group;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class DiagramGroup implements Group {\r
-\r
-    @Override\r
-    public String toString() {\r
-        return "diagram";\r
-    }\r
-\r
-       @Override\r
-       public void trackItems(RequestProcessor processor, Resource runtimeDiagram, SetListener<Resource> listener) {\r
-               listener.add(runtimeDiagram);\r
-       }\r
-\r
-}\r
-\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2012 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.modeling.template2d.ui.diagram.adapter;
+
+import org.simantics.db.RequestProcessor;
+import org.simantics.db.Resource;
+import org.simantics.db.procedure.SetListener;
+import org.simantics.scenegraph.profile.Group;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class DiagramGroup implements Group {
+    
+    
+    @Override
+    public String toString() {
+        return "diagram";
+    }
+
+       @Override
+       public void trackItems(RequestProcessor processor, Resource runtimeDiagram, SetListener<Resource> listener) {
+               listener.add(runtimeDiagram);
+       }
+       
+    @Override
+    public int hashCode() {
+        return this.getClass().hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj.getClass().equals(this.getClass());
+    }
+
+}
+