-/*******************************************************************************\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.g2d.element.handler.impl;\r
-\r
-import org.simantics.g2d.element.ElementHints;\r
-import org.simantics.g2d.element.IElement;\r
-import org.simantics.g2d.element.handler.Parent;\r
-\r
-/**\r
- * The most simple implementation of the {@link Parent} handler.\r
- * \r
- * @author Tuukka Lehtonen\r
- */\r
-public class ParentImpl implements Parent {\r
-\r
- public static final ParentImpl INSTANCE = new ParentImpl();\r
-\r
- private static final long serialVersionUID = 1L;\r
-\r
- private ParentImpl() {}\r
-\r
- /* (non-Javadoc)\r
- * @see org.simantics.g2d.element.handler.Parent#getParent(org.simantics.g2d.element.IElement)\r
- */\r
- @Override\r
- public IElement getParent(IElement element) {\r
- IElement e = element.getHint(ElementHints.KEY_PARENT_ELEMENT);\r
- return e;\r
-\r
-// if (e == null)\r
-// return null;\r
-//\r
-// Object obj = e.getHint(ElementHints.KEY_OBJECT);\r
-// if (obj == null)\r
-// return e;\r
-//\r
-// IDiagram diagram = ElementUtils.peekDiagram(element);\r
-// DataElementMap dem = diagram.getDiagramClass().getAtMostOneItemOfClass(DataElementMap.class);\r
-// if (dem == null)\r
-// return e;\r
-//\r
-// IElement mapped = dem.getElement(diagram, obj);\r
-// return mapped != null ? mapped : e;\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.g2d.element.handler.impl;
+
+import org.simantics.g2d.element.ElementHints;
+import org.simantics.g2d.element.IElement;
+import org.simantics.g2d.element.handler.Parent;
+
+/**
+ * The most simple implementation of the {@link Parent} handler.
+ *
+ * @author Tuukka Lehtonen
+ */
+public class ParentImpl implements Parent {
+
+ public static final ParentImpl INSTANCE = new ParentImpl();
+
+ private static final long serialVersionUID = 1L;
+
+ private ParentImpl() {}
+
+ /* (non-Javadoc)
+ * @see org.simantics.g2d.element.handler.Parent#getParent(org.simantics.g2d.element.IElement)
+ */
+ @Override
+ public IElement getParent(IElement element) {
+ IElement e = element.getHint(ElementHints.KEY_PARENT_ELEMENT);
+ return e;
+
+// if (e == null)
+// return null;
+//
+// Object obj = e.getHint(ElementHints.KEY_OBJECT);
+// if (obj == null)
+// return e;
+//
+// IDiagram diagram = ElementUtils.peekDiagram(element);
+// DataElementMap dem = diagram.getDiagramClass().getAtMostOneItemOfClass(DataElementMap.class);
+// if (dem == null)
+// return e;
+//
+// IElement mapped = dem.getElement(diagram, obj);
+// return mapped != null ? mapped : e;
+ }
+
+}